[ Index ]

PHP Cross Reference of phpBB-3.3.0-deutsch

title

Body

[close]

/includes/acp/ -> acp_board.php (source)

   1  <?php
   2  /**
   3  *
   4  * This file is part of the phpBB Forum Software package.
   5  *
   6  * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7  * @license GNU General Public License, version 2 (GPL-2.0)
   8  *
   9  * For full copyright and license information, please see
  10  * the docs/CREDITS.txt file.
  11  *
  12  */
  13  
  14  /**
  15  * @todo add cron intervals to server settings? (database_gc, queue_interval, session_gc, search_gc, cache_gc, warnings_gc)
  16  */
  17  
  18  /**
  19  * @ignore
  20  */
  21  if (!defined('IN_PHPBB'))
  22  {
  23      exit;
  24  }
  25  
  26  class acp_board
  27  {
  28      var $u_action;
  29      var $new_config;
  30  
  31  	function main($id, $mode)
  32      {
  33          global $user, $template, $request, $language;
  34          global $config, $phpbb_root_path, $phpEx;
  35          global $cache, $phpbb_container, $phpbb_dispatcher, $phpbb_log;
  36  
  37          /** @var \phpbb\language\language $language Language object */
  38          $language = $phpbb_container->get('language');
  39  
  40          $user->add_lang('acp/board');
  41  
  42          $submit = (isset($_POST['submit']) || isset($_POST['allow_quick_reply_enable'])) ? true : false;
  43  
  44          $form_key = 'acp_board';
  45          add_form_key($form_key);
  46  
  47          /**
  48          *    Validation types are:
  49          *        string, int, bool,
  50          *        script_path (absolute path in url - beginning with / and no trailing slash),
  51          *        rpath (relative), rwpath (realtive, writable), path (relative path, but able to escape the root), wpath (writable)
  52          */
  53          switch ($mode)
  54          {
  55              case 'settings':
  56                  $display_vars = array(
  57                      'title'    => 'ACP_BOARD_SETTINGS',
  58                      'vars'    => array(
  59                          'legend1'                => 'ACP_BOARD_SETTINGS',
  60                          'sitename'                => array('lang' => 'SITE_NAME',                'validate' => 'string',    'type' => 'text:40:255', 'explain' => false),
  61                          'site_desc'                => array('lang' => 'SITE_DESC',                'validate' => 'string',    'type' => 'text:40:255', 'explain' => false),
  62                          'site_home_url'            => array('lang' => 'SITE_HOME_URL',            'validate' => 'url',    'type' => 'url:40:255', 'explain' => true),
  63                          'site_home_text'        => array('lang' => 'SITE_HOME_TEXT',        'validate' => 'string',    'type' => 'text:40:255', 'explain' => true),
  64                          'board_index_text'        => array('lang' => 'BOARD_INDEX_TEXT',        'validate' => 'string',    'type' => 'text:40:255', 'explain' => true),
  65                          'board_disable'            => array('lang' => 'DISABLE_BOARD',            'validate' => 'bool',    'type' => 'custom', 'method' => 'board_disable', 'explain' => true),
  66                          'board_disable_msg'        => false,
  67                          'default_lang'            => array('lang' => 'DEFAULT_LANGUAGE',        'validate' => 'lang',    'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
  68                          'default_dateformat'    => array('lang' => 'DEFAULT_DATE_FORMAT',    'validate' => 'string',    'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true),
  69                          'board_timezone'        => array('lang' => 'SYSTEM_TIMEZONE',        'validate' => 'timezone',    'type' => 'custom', 'method' => 'timezone_select', 'explain' => true),
  70  
  71                          'legend2'                => 'BOARD_STYLE',
  72                          'default_style'            => array('lang' => 'DEFAULT_STYLE',            'validate' => 'int',    'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => true),
  73                          'guest_style'            => array('lang' => 'GUEST_STYLE',            'validate' => 'int',    'type' => 'select', 'function' => 'style_select', 'params' => array($this->guest_style_get(), false), 'explain' => true),
  74                          'override_user_style'    => array('lang' => 'OVERRIDE_STYLE',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
  75  
  76                          'legend3'                => 'WARNINGS',
  77                          'warnings_expire_days'    => array('lang' => 'WARNINGS_EXPIRE',        'validate' => 'int:0:9999',    'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
  78  
  79                          'legend4'                    => 'ACP_SUBMIT_CHANGES',
  80                      )
  81                  );
  82              break;
  83  
  84              case 'features':
  85                  $display_vars = array(
  86                      'title'    => 'ACP_BOARD_FEATURES',
  87                      'vars'    => array(
  88                          'legend1'                        => 'ACP_BOARD_FEATURES',
  89                          'allow_privmsg'                    => array('lang' => 'BOARD_PM',                        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
  90                          'allow_topic_notify'            => array('lang' => 'ALLOW_TOPIC_NOTIFY',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
  91                          'allow_forum_notify'            => array('lang' => 'ALLOW_FORUM_NOTIFY',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
  92                          'allow_namechange'                => array('lang' => 'ALLOW_NAME_CHANGE',                'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
  93                          'allow_attachments'                => array('lang' => 'ALLOW_ATTACHMENTS',                'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
  94                          'allow_pm_attach'                => array('lang' => 'ALLOW_PM_ATTACHMENTS',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
  95                          'allow_pm_report'                => array('lang' => 'ALLOW_PM_REPORT',                'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
  96                          'allow_bbcode'                    => array('lang' => 'ALLOW_BBCODE',                    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
  97                          'allow_smilies'                    => array('lang' => 'ALLOW_SMILIES',                    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
  98                          'allow_sig'                        => array('lang' => 'ALLOW_SIG',                        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
  99                          'allow_board_notifications'        => array('lang' => 'ALLOW_BOARD_NOTIFICATIONS',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 100                          'allow_nocensors'                => array('lang' => 'ALLOW_NO_CENSORS',                'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 101                          'allow_bookmarks'                => array('lang' => 'ALLOW_BOOKMARKS',                'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 102                          'allow_birthdays'                => array('lang' => 'ALLOW_BIRTHDAYS',                'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 103                          'display_last_subject'            => array('lang' => 'DISPLAY_LAST_SUBJECT',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 104                          'display_unapproved_posts'        => array('lang' => 'DISPLAY_UNAPPROVED_POSTS',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 105                          'allow_quick_reply'                => array('lang' => 'ALLOW_QUICK_REPLY',                'validate' => 'bool',    'type' => 'custom', 'method' => 'quick_reply', 'explain' => true),
 106  
 107                          'legend2'                            => 'ACP_SUBMIT_CHANGES',
 108                      )
 109                  );
 110              break;
 111  
 112              case 'avatar':
 113                  /* @var $phpbb_avatar_manager \phpbb\avatar\manager */
 114                  $phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
 115                  $avatar_drivers = $phpbb_avatar_manager->get_all_drivers();
 116  
 117                  $avatar_vars = array();
 118                  foreach ($avatar_drivers as $current_driver)
 119                  {
 120                      /** @var \phpbb\avatar\driver\driver_interface $driver */
 121                      $driver = $phpbb_avatar_manager->get_driver($current_driver, false);
 122  
 123                      /*
 124                      * First grab the settings for enabling/disabling the avatar
 125                      * driver and afterwards grab additional settings the driver
 126                      * might have.
 127                      */
 128                      $avatar_vars += $phpbb_avatar_manager->get_avatar_settings($driver);
 129                      $avatar_vars += $driver->prepare_form_acp($user);
 130                  }
 131  
 132                  $display_vars = array(
 133                      'title'    => 'ACP_AVATAR_SETTINGS',
 134                      'vars'    => array(
 135                          'legend1'                => 'ACP_AVATAR_SETTINGS',
 136  
 137                          'avatar_min_width'        => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false),
 138                          'avatar_min_height'        => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false),
 139                          'avatar_max_width'        => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false),
 140                          'avatar_max_height'        => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false),
 141  
 142                          'allow_avatar'            => array('lang' => 'ALLOW_AVATARS',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 143                          'avatar_min'            => array('lang' => 'MIN_AVATAR_SIZE',        'validate' => 'int:0',    'type' => 'dimension:0', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
 144                          'avatar_max'            => array('lang' => 'MAX_AVATAR_SIZE',        'validate' => 'int:0',    'type' => 'dimension:0', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
 145                      )
 146                  );
 147  
 148                  if (!empty($avatar_vars))
 149                  {
 150                      $display_vars['vars'] += $avatar_vars;
 151                  }
 152              break;
 153  
 154              case 'message':
 155                  $display_vars = array(
 156                      'title'    => 'ACP_MESSAGE_SETTINGS',
 157                      'lang'    => 'ucp',
 158                      'vars'    => array(
 159                          'legend1'                => 'GENERAL_SETTINGS',
 160                          'allow_privmsg'            => array('lang' => 'BOARD_PM',                'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 161                          'pm_max_boxes'            => array('lang' => 'BOXES_MAX',                'validate' => 'int:0:9999',    'type' => 'number:0:9999', 'explain' => true),
 162                          'pm_max_msgs'            => array('lang' => 'BOXES_LIMIT',            'validate' => 'int:0:9999',    'type' => 'number:0:9999', 'explain' => true),
 163                          'full_folder_action'    => array('lang' => 'FULL_FOLDER_ACTION',    'validate' => 'int',    'type' => 'select', 'method' => 'full_folder_select', 'explain' => true),
 164                          'pm_edit_time'            => array('lang' => 'PM_EDIT_TIME',            'validate' => 'int:0:99999',    'type' => 'number:0:99999', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
 165                          'pm_max_recipients'        => array('lang' => 'PM_MAX_RECIPIENTS',        'validate' => 'int:0:99999',    'type' => 'number:0:99999', 'explain' => true),
 166  
 167                          'legend2'                => 'GENERAL_OPTIONS',
 168                          'allow_mass_pm'            => array('lang' => 'ALLOW_MASS_PM',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 169                          'auth_bbcode_pm'        => array('lang' => 'ALLOW_BBCODE_PM',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 170                          'auth_smilies_pm'        => array('lang' => 'ALLOW_SMILIES_PM',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 171                          'allow_pm_attach'        => array('lang' => 'ALLOW_PM_ATTACHMENTS',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 172                          'allow_sig_pm'            => array('lang' => 'ALLOW_SIG_PM',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 173                          'print_pm'                => array('lang' => 'ALLOW_PRINT_PM',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 174                          'forward_pm'            => array('lang' => 'ALLOW_FORWARD_PM',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 175                          'auth_img_pm'            => array('lang' => 'ALLOW_IMG_PM',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 176                          'auth_flash_pm'            => array('lang' => 'ALLOW_FLASH_PM',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 177                          'enable_pm_icons'        => array('lang' => 'ENABLE_PM_ICONS',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 178  
 179                          'legend3'                    => 'ACP_SUBMIT_CHANGES',
 180                      )
 181                  );
 182              break;
 183  
 184              case 'post':
 185                  $display_vars = array(
 186                      'title'    => 'ACP_POST_SETTINGS',
 187                      'vars'    => array(
 188                          'legend1'                => 'GENERAL_OPTIONS',
 189                          'allow_topic_notify'    => array('lang' => 'ALLOW_TOPIC_NOTIFY',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 190                          'allow_forum_notify'    => array('lang' => 'ALLOW_FORUM_NOTIFY',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 191                          'allow_bbcode'            => array('lang' => 'ALLOW_BBCODE',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 192                          'allow_post_flash'        => array('lang' => 'ALLOW_POST_FLASH',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 193                          'allow_smilies'            => array('lang' => 'ALLOW_SMILIES',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 194                          'allow_post_links'        => array('lang' => 'ALLOW_POST_LINKS',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 195                          'allowed_schemes_links'    => array('lang' => 'ALLOWED_SCHEMES_LINKS',    'validate' => 'string',    'type' => 'text:0:255', 'explain' => true),
 196                          'allow_nocensors'        => array('lang' => 'ALLOW_NO_CENSORS',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 197                          'allow_bookmarks'        => array('lang' => 'ALLOW_BOOKMARKS',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 198                          'enable_post_confirm'    => array('lang' => 'VISUAL_CONFIRM_POST',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 199                          'allow_quick_reply'        => array('lang' => 'ALLOW_QUICK_REPLY',        'validate' => 'bool',    'type' => 'custom', 'method' => 'quick_reply', 'explain' => true),
 200  
 201                          'legend2'                => 'POSTING',
 202                          'bump_type'                => false,
 203                          'edit_time'                => array('lang' => 'EDIT_TIME',                'validate' => 'int:0:99999',        'type' => 'number:0:99999', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
 204                          'delete_time'            => array('lang' => 'DELETE_TIME',            'validate' => 'int:0:99999',        'type' => 'number:0:99999', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
 205                          'display_last_edited'    => array('lang' => 'DISPLAY_LAST_EDITED',    'validate' => 'bool',        'type' => 'radio:yes_no', 'explain' => true),
 206                          'flood_interval'        => array('lang' => 'FLOOD_INTERVAL',        'validate' => 'int:0:9999999999',        'type' => 'number:0:9999999999', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
 207                          'bump_interval'            => array('lang' => 'BUMP_INTERVAL',            'validate' => 'int:0',        'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),
 208                          'topics_per_page'        => array('lang' => 'TOPICS_PER_PAGE',        'validate' => 'int:1:9999',        'type' => 'number:1:9999', 'explain' => false),
 209                          'posts_per_page'        => array('lang' => 'POSTS_PER_PAGE',        'validate' => 'int:1:9999',        'type' => 'number:1:9999', 'explain' => false),
 210                          'smilies_per_page'        => array('lang' => 'SMILIES_PER_PAGE',        'validate' => 'int:1:9999',        'type' => 'number:1:9999', 'explain' => false),
 211                          'hot_threshold'            => array('lang' => 'HOT_THRESHOLD',            'validate' => 'int:0:9999',        'type' => 'number:0:9999', 'explain' => true),
 212                          'max_poll_options'        => array('lang' => 'MAX_POLL_OPTIONS',        'validate' => 'int:2:127',    'type' => 'number:2:127', 'explain' => false),
 213                          'max_post_chars'        => array('lang' => 'CHAR_LIMIT',            'validate' => 'int:0:999999',        'type' => 'number:0:999999', 'explain' => true),
 214                          'min_post_chars'        => array('lang' => 'MIN_CHAR_LIMIT',        'validate' => 'int:1:999999',        'type' => 'number:1:999999', 'explain' => true),
 215                          'max_post_smilies'        => array('lang' => 'SMILIES_LIMIT',            'validate' => 'int:0:9999',        'type' => 'number:0:9999', 'explain' => true),
 216                          'max_post_urls'            => array('lang' => 'MAX_POST_URLS',            'validate' => 'int:0:9999',        'type' => 'number:0:9999', 'explain' => true),
 217                          'max_post_font_size'    => array('lang' => 'MAX_POST_FONT_SIZE',    'validate' => 'int:0:9999',        'type' => 'number:0:9999', 'explain' => true, 'append' => ' %'),
 218                          'max_quote_depth'        => array('lang' => 'QUOTE_DEPTH_LIMIT',        'validate' => 'int:0:9999',        'type' => 'number:0:9999', 'explain' => true),
 219                          'max_post_img_width'    => array('lang' => 'MAX_POST_IMG_WIDTH',    'validate' => 'int:0:9999',        'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
 220                          'max_post_img_height'    => array('lang' => 'MAX_POST_IMG_HEIGHT',    'validate' => 'int:0:9999',        'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
 221  
 222                          'legend3'                    => 'ACP_SUBMIT_CHANGES',
 223                      )
 224                  );
 225              break;
 226  
 227              case 'signature':
 228                  $display_vars = array(
 229                      'title'    => 'ACP_SIGNATURE_SETTINGS',
 230                      'vars'    => array(
 231                          'legend1'                => 'GENERAL_OPTIONS',
 232                          'allow_sig'                => array('lang' => 'ALLOW_SIG',                'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 233                          'allow_sig_bbcode'        => array('lang' => 'ALLOW_SIG_BBCODE',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 234                          'allow_sig_img'            => array('lang' => 'ALLOW_SIG_IMG',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 235                          'allow_sig_flash'        => array('lang' => 'ALLOW_SIG_FLASH',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 236                          'allow_sig_smilies'        => array('lang' => 'ALLOW_SIG_SMILIES',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 237                          'allow_sig_links'        => array('lang' => 'ALLOW_SIG_LINKS',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 238  
 239                          'legend2'                => 'GENERAL_SETTINGS',
 240                          'max_sig_chars'            => array('lang' => 'MAX_SIG_LENGTH',        'validate' => 'int:0:9999',    'type' => 'number:0:9999', 'explain' => true),
 241                          'max_sig_urls'            => array('lang' => 'MAX_SIG_URLS',            'validate' => 'int:0:9999',    'type' => 'number:0:9999', 'explain' => true),
 242                          'max_sig_font_size'        => array('lang' => 'MAX_SIG_FONT_SIZE',        'validate' => 'int:0:9999',    'type' => 'number:0:9999', 'explain' => true, 'append' => ' %'),
 243                          'max_sig_smilies'        => array('lang' => 'MAX_SIG_SMILIES',        'validate' => 'int:0:9999',    'type' => 'number:0:9999', 'explain' => true),
 244                          'max_sig_img_width'        => array('lang' => 'MAX_SIG_IMG_WIDTH',        'validate' => 'int:0:9999',    'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
 245                          'max_sig_img_height'    => array('lang' => 'MAX_SIG_IMG_HEIGHT',    'validate' => 'int:0:9999',    'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
 246  
 247                          'legend3'                    => 'ACP_SUBMIT_CHANGES',
 248                      )
 249                  );
 250              break;
 251  
 252              case 'registration':
 253                  $display_vars = array(
 254                      'title'    => 'ACP_REGISTER_SETTINGS',
 255                      'vars'    => array(
 256                          'legend1'                => 'GENERAL_SETTINGS',
 257                          'max_name_chars'        => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:8:180', 'type' => false, 'method' => false, 'explain' => false,),
 258  
 259                          'require_activation'    => array('lang' => 'ACC_ACTIVATION',    'validate' => 'int',    'type' => 'select', 'method' => 'select_acc_activation', 'explain' => true),
 260                          'new_member_post_limit'    => array('lang' => 'NEW_MEMBER_POST_LIMIT', 'validate' => 'int:0:255', 'type' => 'number:0:255', 'explain' => true, 'append' => ' ' . $user->lang['POSTS']),
 261                          'new_member_group_default'=> array('lang' => 'NEW_MEMBER_GROUP_DEFAULT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
 262                          'min_name_chars'        => array('lang' => 'USERNAME_LENGTH',    'validate' => 'int:1',    'type' => 'custom:5:180', 'method' => 'username_length', 'explain' => true),
 263                          'min_pass_chars'        => array('lang' => 'PASSWORD_LENGTH',    'validate' => 'int:1',    'type' => 'custom', 'method' => 'password_length', 'explain' => true),
 264                          'allow_name_chars'        => array('lang' => 'USERNAME_CHARS',    'validate' => 'string',    'type' => 'select', 'method' => 'select_username_chars', 'explain' => true),
 265                          'pass_complex'            => array('lang' => 'PASSWORD_TYPE',        'validate' => 'string',    'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
 266                          'chg_passforce'            => array('lang' => 'FORCE_PASS_CHANGE',    'validate' => 'int:0:999',    'type' => 'number:0:999', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
 267  
 268                          'legend2'                => 'GENERAL_OPTIONS',
 269                          'allow_namechange'        => array('lang' => 'ALLOW_NAME_CHANGE',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 270                          'allow_emailreuse'        => array('lang' => 'ALLOW_EMAIL_REUSE',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 271                          'enable_confirm'        => array('lang' => 'VISUAL_CONFIRM_REG',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 272                          'max_login_attempts'    => array('lang' => 'MAX_LOGIN_ATTEMPTS',    'validate' => 'int:0:999',    'type' => 'number:0:999', 'explain' => true),
 273                          'max_reg_attempts'        => array('lang' => 'REG_LIMIT',                'validate' => 'int:0:9999',    'type' => 'number:0:9999', 'explain' => true),
 274  
 275                          'legend3'            => 'COPPA',
 276                          'coppa_enable'        => array('lang' => 'ENABLE_COPPA',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 277                          'coppa_mail'        => array('lang' => 'COPPA_MAIL',        'validate' => 'string',    'type' => 'textarea:5:40', 'explain' => true),
 278                          'coppa_fax'            => array('lang' => 'COPPA_FAX',            'validate' => 'string',    'type' => 'text:25:100', 'explain' => false),
 279  
 280                          'legend4'            => 'ACP_SUBMIT_CHANGES',
 281                      )
 282                  );
 283              break;
 284  
 285              case 'feed':
 286                  $display_vars = array(
 287                      'title'    => 'ACP_FEED_MANAGEMENT',
 288                      'vars'    => array(
 289                          'legend1'                    => 'ACP_FEED_GENERAL',
 290                          'feed_enable'                => array('lang' => 'ACP_FEED_ENABLE',                'validate' => 'bool',    'type' => 'radio:enabled_disabled',    'explain' => true ),
 291                          'feed_item_statistics'        => array('lang' => 'ACP_FEED_ITEM_STATISTICS',        'validate' => 'bool',    'type' => 'radio:enabled_disabled',    'explain' => true),
 292                          'feed_http_auth'            => array('lang' => 'ACP_FEED_HTTP_AUTH',            'validate' => 'bool',    'type' => 'radio:enabled_disabled',    'explain' => true),
 293  
 294                          'legend2'                    => 'ACP_FEED_POST_BASED',
 295                          'feed_limit_post'            => array('lang' => 'ACP_FEED_LIMIT',                'validate' => 'int:5:9999',    'type' => 'number:5:9999',                'explain' => true),
 296                          'feed_overall'                => array('lang' => 'ACP_FEED_OVERALL',                'validate' => 'bool',    'type' => 'radio:enabled_disabled',    'explain' => true ),
 297                          'feed_forum'                => array('lang' => 'ACP_FEED_FORUM',                'validate' => 'bool',    'type' => 'radio:enabled_disabled',    'explain' => true ),
 298                          'feed_topic'                => array('lang' => 'ACP_FEED_TOPIC',                'validate' => 'bool',    'type' => 'radio:enabled_disabled',    'explain' => true ),
 299  
 300                          'legend3'                    => 'ACP_FEED_TOPIC_BASED',
 301                          'feed_limit_topic'            => array('lang' => 'ACP_FEED_LIMIT',                'validate' => 'int:5:9999',    'type' => 'number:5:9999',                'explain' => true),
 302                          'feed_topics_new'            => array('lang' => 'ACP_FEED_TOPICS_NEW',            'validate' => 'bool',    'type' => 'radio:enabled_disabled',    'explain' => true ),
 303                          'feed_topics_active'        => array('lang' => 'ACP_FEED_TOPICS_ACTIVE',        'validate' => 'bool',    'type' => 'radio:enabled_disabled',    'explain' => true ),
 304                          'feed_news_id'                => array('lang' => 'ACP_FEED_NEWS',                    'validate' => 'string',    'type' => 'custom', 'method' => 'select_news_forums', 'explain' => true),
 305  
 306                          'legend4'                    => 'ACP_FEED_SETTINGS_OTHER',
 307                          'feed_overall_forums'        => array('lang'    => 'ACP_FEED_OVERALL_FORUMS',        'validate' => 'bool',    'type' => 'radio:enabled_disabled',    'explain' => true ),
 308                          'feed_exclude_id'            => array('lang' => 'ACP_FEED_EXCLUDE_ID',            'validate' => 'string',    'type' => 'custom', 'method' => 'select_exclude_forums', 'explain' => true),
 309                      )
 310                  );
 311              break;
 312  
 313              case 'cookie':
 314                  $display_vars = array(
 315                      'title'    => 'ACP_COOKIE_SETTINGS',
 316                      'vars'    => array(
 317                          'legend1'        => 'ACP_COOKIE_SETTINGS',
 318                          'cookie_domain'    => array('lang' => 'COOKIE_DOMAIN',    'validate' => 'string',    'type' => 'text::255', 'explain' => true),
 319                          'cookie_name'    => array('lang' => 'COOKIE_NAME',    'validate' => 'string',    'type' => 'text::16', 'explain' => true),
 320                          'cookie_path'    => array('lang'    => 'COOKIE_PATH',    'validate' => 'string',    'type' => 'text::255', 'explain' => true),
 321                          'cookie_secure'    => array('lang' => 'COOKIE_SECURE',    'validate' => 'bool',    'type' => 'radio:enabled_disabled', 'explain' => true),
 322                          'cookie_notice'    => array('lang' => 'COOKIE_NOTICE',    'validate' => 'bool',    'type' => 'radio:enabled_disabled', 'explain' => true),
 323                      )
 324                  );
 325              break;
 326  
 327              case 'load':
 328                  $display_vars = array(
 329                      'title'    => 'ACP_LOAD_SETTINGS',
 330                      'vars'    => array(
 331                          'legend1'            => 'GENERAL_SETTINGS',
 332                          'limit_load'        => array('lang' => 'LIMIT_LOAD',        'validate' => 'int:0:9999',    'type' => 'number:0:9999', 'explain' => true),
 333                          'session_length'    => array('lang' => 'SESSION_LENGTH',    'validate' => 'int:60:9999999999',    'type' => 'number:60:9999999999', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
 334                          'active_sessions'    => array('lang' => 'LIMIT_SESSIONS',    'validate' => 'int:0:9999',    'type' => 'number:0:9999', 'explain' => true),
 335                          'load_online_time'    => array('lang' => 'ONLINE_LENGTH',        'validate' => 'int:0:999',    'type' => 'number:0:999', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
 336                          'read_notification_expire_days'    => array('lang' => 'READ_NOTIFICATION_EXPIRE_DAYS',    'validate' => 'int:0',    'type' => 'number:0', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
 337  
 338                          'legend2'                => 'GENERAL_OPTIONS',
 339                          'load_notifications'    => array('lang' => 'LOAD_NOTIFICATIONS',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 340                          'load_db_track'            => array('lang' => 'YES_POST_MARKING',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 341                          'load_db_lastread'        => array('lang' => 'YES_READ_MARKING',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 342                          'load_anon_lastread'    => array('lang' => 'YES_ANON_READ_MARKING',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 343                          'load_online'            => array('lang' => 'YES_ONLINE',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 344                          'load_online_guests'    => array('lang' => 'YES_ONLINE_GUESTS',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 345                          'load_onlinetrack'        => array('lang' => 'YES_ONLINE_TRACK',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 346                          'load_birthdays'        => array('lang' => 'YES_BIRTHDAYS',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 347                          'load_unreads_search'    => array('lang' => 'YES_UNREAD_SEARCH',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 348                          'load_moderators'        => array('lang' => 'YES_MODERATORS',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 349                          'load_jumpbox'            => array('lang' => 'YES_JUMPBOX',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 350                          'load_user_activity'    => array('lang' => 'LOAD_USER_ACTIVITY',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 351                          'load_user_activity_limit'        => array('lang' => 'LOAD_USER_ACTIVITY_LIMIT',        'validate' => 'int:0:99999999',    'type' => 'number:0:99999999', 'explain' => true),
 352                          'load_tplcompile'        => array('lang' => 'RECOMPILE_STYLES',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 353                          'allow_cdn'                => array('lang' => 'ALLOW_CDN',                'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 354                          'enable_accurate_pm_button'    => array('lang' => 'YES_ACCURATE_PM_BUTTON',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 355                          'allow_live_searches'    => array('lang' => 'ALLOW_LIVE_SEARCHES',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 356  
 357                          'legend3'                => 'CUSTOM_PROFILE_FIELDS',
 358                          'load_cpf_memberlist'    => array('lang' => 'LOAD_CPF_MEMBERLIST',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 359                          'load_cpf_pm'            => array('lang' => 'LOAD_CPF_PM',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain'    => false),
 360                          'load_cpf_viewprofile'    => array('lang' => 'LOAD_CPF_VIEWPROFILE',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 361                          'load_cpf_viewtopic'    => array('lang' => 'LOAD_CPF_VIEWTOPIC',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => false),
 362  
 363                          'legend4'                    => 'ACP_SUBMIT_CHANGES',
 364                      )
 365                  );
 366              break;
 367  
 368              case 'auth':
 369                  $display_vars = array(
 370                      'title'    => 'ACP_AUTH_SETTINGS',
 371                      'vars'    => array(
 372                          'legend1'        => 'ACP_AUTH_SETTINGS',
 373                          'auth_method'    => array('lang' => 'AUTH_METHOD',    'validate' => 'string',    'type' => 'select:1:toggable', 'method' => 'select_auth_method', 'explain' => false),
 374                      )
 375                  );
 376              break;
 377  
 378              case 'server':
 379                  $display_vars = array(
 380                      'title'    => 'ACP_SERVER_SETTINGS',
 381                      'vars'    => array(
 382                          'legend1'                => 'ACP_SERVER_SETTINGS',
 383                          'gzip_compress'            => array('lang' => 'ENABLE_GZIP',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 384                          'use_system_cron'        => array('lang' => 'USE_SYSTEM_CRON',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 385  
 386                          'legend2'                => 'PATH_SETTINGS',
 387                          'enable_mod_rewrite'    => array('lang' => 'MOD_REWRITE_ENABLE',    'validate' => 'bool',    'type' => 'custom', 'method' => 'enable_mod_rewrite', 'explain' => true),
 388                          'smilies_path'            => array('lang' => 'SMILIES_PATH',        'validate' => 'rpath',    'type' => 'text:20:255', 'explain' => true),
 389                          'icons_path'            => array('lang' => 'ICONS_PATH',        'validate' => 'rpath',    'type' => 'text:20:255', 'explain' => true),
 390                          'upload_icons_path'        => array('lang' => 'UPLOAD_ICONS_PATH',    'validate' => 'rpath',    'type' => 'text:20:255', 'explain' => true),
 391                          'ranks_path'            => array('lang' => 'RANKS_PATH',        'validate' => 'rpath',    'type' => 'text:20:255', 'explain' => true),
 392  
 393                          'legend3'                => 'SERVER_URL_SETTINGS',
 394                          'force_server_vars'        => array('lang' => 'FORCE_SERVER_VARS',    'validate' => 'bool',            'type' => 'radio:yes_no', 'explain' => true),
 395                          'server_protocol'        => array('lang' => 'SERVER_PROTOCOL',    'validate' => 'string',            'type' => 'text:10:10', 'explain' => true),
 396                          'server_name'            => array('lang' => 'SERVER_NAME',        'validate' => 'string',            'type' => 'text:40:255', 'explain' => true),
 397                          'server_port'            => array('lang' => 'SERVER_PORT',        'validate' => 'int:0:99999',            'type' => 'number:0:99999', 'explain' => true),
 398                          'script_path'            => array('lang' => 'SCRIPT_PATH',        'validate' => 'script_path',    'type' => 'text::255', 'explain' => true),
 399  
 400                          'legend4'                    => 'ACP_SUBMIT_CHANGES',
 401                      )
 402                  );
 403              break;
 404  
 405              case 'security':
 406                  $display_vars = array(
 407                      'title'    => 'ACP_SECURITY_SETTINGS',
 408                      'vars'    => array(
 409                          'legend1'                => 'ACP_SECURITY_SETTINGS',
 410                          'allow_autologin'        => array('lang' => 'ALLOW_AUTOLOGIN',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 411                          'allow_password_reset'    => array('lang' => 'ALLOW_PASSWORD_RESET',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 412                          'max_autologin_time'    => array('lang' => 'AUTOLOGIN_LENGTH',        'validate' => 'int:0:99999',    'type' => 'number:0:99999',    'explain' => true,    'append' => ' ' . $user->lang['DAYS']),
 413                          'ip_check'                => array('lang' => 'IP_VALID',                'validate' => 'int',    'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true),
 414                          'browser_check'            => array('lang' => 'BROWSER_VALID',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 415                          'forwarded_for_check'    => array('lang' => 'FORWARDED_FOR_VALID',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 416                          'referer_validation'    => array('lang' => 'REFERRER_VALID',        'validate' => 'int:0:3','type' => 'custom', 'method' => 'select_ref_check', 'explain' => true),
 417                          'remote_upload_verify'    => array('lang' => 'UPLOAD_CERT_VALID',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 418                          'check_dnsbl'            => array('lang' => 'CHECK_DNSBL',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 419                          'email_check_mx'        => array('lang' => 'EMAIL_CHECK_MX',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 420                          'min_pass_chars'        => array('lang' => 'PASSWORD_LENGTH',    'validate' => 'int:1',    'type' => 'custom', 'method' => 'password_length', 'explain' => true),
 421                          'pass_complex'            => array('lang' => 'PASSWORD_TYPE',            'validate' => 'string',    'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
 422                          'chg_passforce'            => array('lang' => 'FORCE_PASS_CHANGE',        'validate' => 'int:0:999',    'type' => 'number:0:999', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
 423                          'max_login_attempts'    => array('lang' => 'MAX_LOGIN_ATTEMPTS',    'validate' => 'int:0:999',    'type' => 'number:0:999', 'explain' => true),
 424                          'ip_login_limit_max'    => array('lang' => 'IP_LOGIN_LIMIT_MAX',    'validate' => 'int:0:999',    'type' => 'number:0:999', 'explain' => true),
 425                          'ip_login_limit_time'    => array('lang' => 'IP_LOGIN_LIMIT_TIME',    'validate' => 'int:0:99999',    'type' => 'number:0:99999', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
 426                          'ip_login_limit_use_forwarded'    => array('lang' => 'IP_LOGIN_LIMIT_USE_FORWARDED',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 427                          'tpl_allow_php'            => array('lang' => 'TPL_ALLOW_PHP',            'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 428                          'form_token_lifetime'    => array('lang' => 'FORM_TIME_MAX',            'validate' => 'int:-1:99999',    'type' => 'number:-1:99999', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
 429                          'form_token_sid_guests'    => array('lang' => 'FORM_SID_GUESTS',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 430  
 431                      )
 432                  );
 433              break;
 434  
 435              case 'email':
 436                  $display_vars = array(
 437                      'title'    => 'ACP_EMAIL_SETTINGS',
 438                      'vars'    => array(
 439                          'legend1'                => 'GENERAL_SETTINGS',
 440                          'email_enable'            => array('lang' => 'ENABLE_EMAIL',            'validate' => 'bool',    'type' => 'radio:enabled_disabled', 'explain' => true),
 441                          'board_email_form'        => array('lang' => 'BOARD_EMAIL_FORM',        'validate' => 'bool',    'type' => 'radio:enabled_disabled', 'explain' => true),
 442                          'email_package_size'    => array('lang' => 'EMAIL_PACKAGE_SIZE',    'validate' => 'int:0',    'type' => 'number:0:99999', 'explain' => true),
 443                          'email_max_chunk_size'    => array('lang' => 'EMAIL_MAX_CHUNK_SIZE',    'validate' => 'int:1:99999',    'type' => 'number:1:99999', 'explain' => true),
 444                          'board_contact'            => array('lang' => 'CONTACT_EMAIL',            'validate' => 'email',    'type' => 'email:25:100', 'explain' => true),
 445                          'board_contact_name'    => array('lang' => 'CONTACT_EMAIL_NAME',    'validate' => 'string',    'type' => 'text:25:50', 'explain' => true),
 446                          'board_email'            => array('lang' => 'ADMIN_EMAIL',            'validate' => 'email',    'type' => 'email:25:100', 'explain' => true),
 447                          'email_force_sender'    => array('lang' => 'EMAIL_FORCE_SENDER',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 448                          'board_email_sig'        => array('lang' => 'EMAIL_SIG',                'validate' => 'string',    'type' => 'textarea:5:30', 'explain' => true),
 449                          'board_hide_emails'        => array('lang' => 'BOARD_HIDE_EMAILS',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 450                          'send_test_email'        => array('lang' => 'SEND_TEST_EMAIL',        'validate' => 'bool',    'type' => 'custom', 'method' => 'send_test_email', 'explain' => true),
 451  
 452                          'legend2'                => 'SMTP_SETTINGS',
 453                          'smtp_delivery'            => array('lang' => 'USE_SMTP',                'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 454                          'smtp_host'                => array('lang' => 'SMTP_SERVER',            'validate' => 'string',    'type' => 'text:25:50', 'explain' => true),
 455                          'smtp_port'                => array('lang' => 'SMTP_PORT',                'validate' => 'int:0:99999',    'type' => 'number:0:99999', 'explain' => true),
 456                          'smtp_auth_method'        => array('lang' => 'SMTP_AUTH_METHOD',        'validate' => 'string',    'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),
 457                          'smtp_username'            => array('lang' => 'SMTP_USERNAME',            'validate' => 'string',    'type' => 'text:25:255', 'explain' => true),
 458                          'smtp_password'            => array('lang' => 'SMTP_PASSWORD',            'validate' => 'string',    'type' => 'password:25:255', 'explain' => true),
 459                          'smtp_verify_peer'        => array('lang' => 'SMTP_VERIFY_PEER',        'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 460                          'smtp_verify_peer_name'    => array('lang' => 'SMTP_VERIFY_PEER_NAME',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 461                          'smtp_allow_self_signed'=> array('lang' => 'SMTP_ALLOW_SELF_SIGNED','validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
 462  
 463                          'legend3'                    => 'ACP_SUBMIT_CHANGES',
 464                      )
 465                  );
 466              break;
 467  
 468              default:
 469                  trigger_error('NO_MODE', E_USER_ERROR);
 470              break;
 471          }
 472  
 473          /**
 474          * Event to add and/or modify acp_board configurations
 475          *
 476          * @event core.acp_board_config_edit_add
 477          * @var    array    display_vars    Array of config values to display and process
 478          * @var    string    mode            Mode of the config page we are displaying
 479          * @var    boolean    submit            Do we display the form or process the submission
 480          * @since 3.1.0-a4
 481          */
 482          $vars = array('display_vars', 'mode', 'submit');
 483          extract($phpbb_dispatcher->trigger_event('core.acp_board_config_edit_add', compact($vars)));
 484  
 485          if (isset($display_vars['lang']))
 486          {
 487              $user->add_lang($display_vars['lang']);
 488          }
 489  
 490          $this->new_config = clone $config;
 491          $cfg_array = (isset($_REQUEST['config'])) ? $request->variable('config', array('' => ''), true) : $this->new_config;
 492          $error = array();
 493  
 494          // We validate the complete config if wished
 495          validate_config_vars($display_vars['vars'], $cfg_array, $error);
 496  
 497          if ($submit && !check_form_key($form_key))
 498          {
 499              $error[] = $user->lang['FORM_INVALID'];
 500          }
 501          // Do not write values if there is an error
 502          if (count($error))
 503          {
 504              $submit = false;
 505          }
 506  
 507          // We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
 508          foreach ($display_vars['vars'] as $config_name => $data)
 509          {
 510              if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
 511              {
 512                  continue;
 513              }
 514  
 515              if ($config_name == 'auth_method' || $config_name == 'feed_news_id' || $config_name == 'feed_exclude_id')
 516              {
 517                  continue;
 518              }
 519  
 520              if ($config_name == 'guest_style')
 521              {
 522                  if (isset($cfg_array[$config_name]))
 523                  {
 524                      $this->guest_style_set($cfg_array[$config_name]);
 525                  }
 526                  continue;
 527              }
 528  
 529              $this->new_config[$config_name] = $config_value = $cfg_array[$config_name];
 530  
 531              if ($submit)
 532              {
 533                  if (isset($data['type']) && strpos($data['type'], 'password') === 0 && $config_value === '********')
 534                  {
 535                      /**
 536                       * Do not update password fields if the content is ********,
 537                       * because that is the password replacement we use to not
 538                       * send the password to the output
 539                       */
 540                      continue;
 541                  }
 542  
 543                  $config->set($config_name, $config_value);
 544  
 545                  if ($config_name == 'allow_quick_reply' && isset($_POST['allow_quick_reply_enable']))
 546                  {
 547                      enable_bitfield_column_flag(FORUMS_TABLE, 'forum_flags', round(log(FORUM_FLAG_QUICK_REPLY, 2)));
 548                  }
 549              }
 550          }
 551  
 552          // Invalidate the text_formatter cache when posting options are changed
 553          if ($mode == 'post' && $submit)
 554          {
 555              $phpbb_container->get('text_formatter.cache')->invalidate();
 556          }
 557  
 558          // Store news and exclude ids
 559          if ($mode == 'feed' && $submit)
 560          {
 561              $cache->destroy('_feed_news_forum_ids');
 562              $cache->destroy('_feed_excluded_forum_ids');
 563  
 564              $this->store_feed_forums(FORUM_OPTION_FEED_NEWS, 'feed_news_id');
 565              $this->store_feed_forums(FORUM_OPTION_FEED_EXCLUDE, 'feed_exclude_id');
 566          }
 567  
 568          if ($mode == 'auth')
 569          {
 570              // Retrieve a list of auth plugins and check their config values
 571              /* @var $auth_providers \phpbb\auth\provider_collection */
 572              $auth_providers = $phpbb_container->get('auth.provider_collection');
 573  
 574              $updated_auth_settings = false;
 575              $old_auth_config = array();
 576              foreach ($auth_providers as $provider)
 577              {
 578                  /** @var \phpbb\auth\provider\provider_interface $provider */
 579                  if ($fields = $provider->acp())
 580                  {
 581                      // Check if we need to create config fields for this plugin and save config when submit was pressed
 582                      foreach ($fields as $field)
 583                      {
 584                          if (!isset($config[$field]))
 585                          {
 586                              $config->set($field, '');
 587                          }
 588  
 589                          if (!isset($cfg_array[$field]) || strpos($field, 'legend') !== false)
 590                          {
 591                              continue;
 592                          }
 593  
 594                          if (substr($field, -9) === '_password' && $cfg_array[$field] === '********')
 595                          {
 596                              // Do not update password fields if the content is ********,
 597                              // because that is the password replacement we use to not
 598                              // send the password to the output
 599                              continue;
 600                          }
 601  
 602                          $old_auth_config[$field] = $this->new_config[$field];
 603                          $config_value = $cfg_array[$field];
 604                          $this->new_config[$field] = $config_value;
 605  
 606                          if ($submit)
 607                          {
 608                              $updated_auth_settings = true;
 609                              $config->set($field, $config_value);
 610                          }
 611                      }
 612                  }
 613                  unset($fields);
 614              }
 615  
 616              if ($submit && (($cfg_array['auth_method'] != $this->new_config['auth_method']) || $updated_auth_settings))
 617              {
 618                  $method = basename($cfg_array['auth_method']);
 619                  if (array_key_exists('auth.provider.' . $method, $auth_providers))
 620                  {
 621                      $provider = $auth_providers['auth.provider.' . $method];
 622                      if ($error = $provider->init())
 623                      {
 624                          foreach ($old_auth_config as $config_name => $config_value)
 625                          {
 626                              $config->set($config_name, $config_value);
 627                          }
 628                          trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
 629                      }
 630                      $config->set('auth_method', basename($cfg_array['auth_method']));
 631                  }
 632                  else
 633                  {
 634                      trigger_error('NO_AUTH_PLUGIN', E_USER_ERROR);
 635                  }
 636              }
 637          }
 638  
 639          if ($mode == 'email' && $request->is_set_post('send_test_email'))
 640          {
 641              if ($config['email_enable'])
 642              {
 643                  include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
 644  
 645                  $messenger = new messenger(false);
 646                  $messenger->template('test');
 647                  $messenger->set_addresses($user->data);
 648                  $messenger->anti_abuse_headers($config, $user);
 649                  $messenger->assign_vars(array(
 650                      'USERNAME'    => htmlspecialchars_decode($user->data['username']),
 651                  ));
 652                  $messenger->send(NOTIFY_EMAIL);
 653  
 654                  trigger_error($user->lang('TEST_EMAIL_SENT') . adm_back_link($this->u_action));
 655              }
 656              else
 657              {
 658                  $user->add_lang('memberlist');
 659                  trigger_error($user->lang('EMAIL_DISABLED') . adm_back_link($this->u_action), E_USER_WARNING);
 660              }
 661          }
 662  
 663          if ($submit)
 664          {
 665              $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_CONFIG_' . strtoupper($mode));
 666  
 667              $message = $user->lang('CONFIG_UPDATED');
 668              $message_type = E_USER_NOTICE;
 669              if (!$config['email_enable'] && in_array($mode, array('email', 'registration')) &&
 670                  in_array($config['require_activation'], array(USER_ACTIVATION_SELF, USER_ACTIVATION_ADMIN)))
 671              {
 672                  $message .= '<br /><br />' . $user->lang('ACC_ACTIVATION_WARNING');
 673                  $message_type = E_USER_WARNING;
 674              }
 675              trigger_error($message . adm_back_link($this->u_action), $message_type);
 676          }
 677  
 678          $this->tpl_name = 'acp_board';
 679          $this->page_title = $display_vars['title'];
 680  
 681          $template->assign_vars(array(
 682              'L_TITLE'            => $user->lang[$display_vars['title']],
 683              'L_TITLE_EXPLAIN'    => $user->lang[$display_vars['title'] . '_EXPLAIN'],
 684  
 685              'S_ERROR'            => (count($error)) ? true : false,
 686              'ERROR_MSG'            => implode('<br />', $error),
 687  
 688              'U_ACTION'            => $this->u_action)
 689          );
 690  
 691          // Output relevant page
 692          foreach ($display_vars['vars'] as $config_key => $vars)
 693          {
 694              if (!is_array($vars) && strpos($config_key, 'legend') === false)
 695              {
 696                  continue;
 697              }
 698  
 699              if (strpos($config_key, 'legend') !== false)
 700              {
 701                  $template->assign_block_vars('options', array(
 702                      'S_LEGEND'        => true,
 703                      'LEGEND'        => (isset($user->lang[$vars])) ? $user->lang[$vars] : $vars)
 704                  );
 705  
 706                  continue;
 707              }
 708  
 709              $type = explode(':', $vars['type']);
 710  
 711              $l_explain = '';
 712              if ($vars['explain'] && isset($vars['lang_explain']))
 713              {
 714                  $l_explain = (isset($user->lang[$vars['lang_explain']])) ? $user->lang[$vars['lang_explain']] : $vars['lang_explain'];
 715              }
 716              else if ($vars['explain'])
 717              {
 718                  $l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '';
 719              }
 720  
 721              $content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars);
 722  
 723              if (empty($content))
 724              {
 725                  continue;
 726              }
 727  
 728              $template->assign_block_vars('options', array(
 729                  'KEY'            => $config_key,
 730                  'TITLE'            => (isset($user->lang[$vars['lang']])) ? $user->lang[$vars['lang']] : $vars['lang'],
 731                  'S_EXPLAIN'        => $vars['explain'] && !empty($l_explain),
 732                  'TITLE_EXPLAIN'    => $l_explain,
 733                  'CONTENT'        => $content,
 734                  )
 735              );
 736  
 737              unset($display_vars['vars'][$config_key]);
 738          }
 739  
 740          if ($mode == 'auth')
 741          {
 742              $template->assign_var('S_AUTH', true);
 743  
 744              foreach ($auth_providers as $provider)
 745              {
 746                  $auth_tpl = $provider->get_acp_template($this->new_config);
 747                  if ($auth_tpl)
 748                  {
 749                      if (array_key_exists('BLOCK_VAR_NAME', $auth_tpl))
 750                      {
 751                          foreach ($auth_tpl['BLOCK_VARS'] as $block_vars)
 752                          {
 753                              $template->assign_block_vars($auth_tpl['BLOCK_VAR_NAME'], $block_vars);
 754                          }
 755                      }
 756                      $template->assign_vars($auth_tpl['TEMPLATE_VARS']);
 757                      $template->assign_block_vars('auth_tpl', array(
 758                          'TEMPLATE_FILE'    => $auth_tpl['TEMPLATE_FILE'],
 759                      ));
 760                  }
 761              }
 762          }
 763      }
 764  
 765      /**
 766      * Select auth method
 767      */
 768  	function select_auth_method($selected_method, $key = '')
 769      {
 770          global $phpbb_container;
 771  
 772          /* @var $auth_providers \phpbb\auth\provider_collection */
 773          $auth_providers = $phpbb_container->get('auth.provider_collection');
 774          $auth_plugins = array();
 775  
 776          foreach ($auth_providers as $key => $value)
 777          {
 778              if (!($value instanceof \phpbb\auth\provider\provider_interface))
 779              {
 780                  continue;
 781              }
 782              $auth_plugins[] = str_replace('auth.provider.', '', $key);
 783          }
 784  
 785          sort($auth_plugins);
 786  
 787          $auth_select = '';
 788          foreach ($auth_plugins as $method)
 789          {
 790              $selected = ($selected_method == $method) ? ' selected="selected"' : '';
 791              $auth_select .= "<option value=\"$method\"$selected data-toggle-setting=\"#auth_{$method}_settings\">" . ucfirst($method) . '</option>';
 792          }
 793  
 794          return $auth_select;
 795      }
 796  
 797      /**
 798      * Select mail authentication method
 799      */
 800  	function mail_auth_select($selected_method, $key = '')
 801      {
 802          global $user;
 803  
 804          $auth_methods = array('PLAIN', 'LOGIN', 'CRAM-MD5', 'DIGEST-MD5', 'POP-BEFORE-SMTP');
 805          $s_smtp_auth_options = '';
 806  
 807          foreach ($auth_methods as $method)
 808          {
 809              $s_smtp_auth_options .= '<option value="' . $method . '"' . (($selected_method == $method) ? ' selected="selected"' : '') . '>' . $user->lang['SMTP_' . str_replace('-', '_', $method)] . '</option>';
 810          }
 811  
 812          return $s_smtp_auth_options;
 813      }
 814  
 815      /**
 816      * Select full folder action
 817      */
 818  	function full_folder_select($value, $key = '')
 819      {
 820          global $user;
 821  
 822          return '<option value="1"' . (($value == 1) ? ' selected="selected"' : '') . '>' . $user->lang['DELETE_OLDEST_MESSAGES'] . '</option><option value="2"' . (($value == 2) ? ' selected="selected"' : '') . '>' . $user->lang['HOLD_NEW_MESSAGES_SHORT'] . '</option>';
 823      }
 824  
 825      /**
 826      * Select ip validation
 827      */
 828  	function select_ip_check($value, $key = '')
 829      {
 830          $radio_ary = array(4 => 'ALL', 3 => 'CLASS_C', 2 => 'CLASS_B', 0 => 'NO_IP_VALIDATION');
 831  
 832          return h_radio('config[ip_check]', $radio_ary, $value, $key);
 833      }
 834  
 835      /**
 836      * Select referer validation
 837      */
 838  	function select_ref_check($value, $key = '')
 839      {
 840          $radio_ary = array(REFERER_VALIDATE_PATH => 'REF_PATH', REFERER_VALIDATE_HOST => 'REF_HOST', REFERER_VALIDATE_NONE => 'NO_REF_VALIDATION');
 841  
 842          return h_radio('config[referer_validation]', $radio_ary, $value, $key);
 843      }
 844  
 845      /**
 846      * Select account activation method
 847      */
 848  	function select_acc_activation($selected_value, $value)
 849      {
 850          global $user, $config;
 851  
 852          $act_ary = array(
 853              'ACC_DISABLE'    => array(true, USER_ACTIVATION_DISABLE),
 854              'ACC_NONE'        => array(true, USER_ACTIVATION_NONE),
 855              'ACC_USER'        => array($config['email_enable'], USER_ACTIVATION_SELF),
 856              'ACC_ADMIN'        => array($config['email_enable'], USER_ACTIVATION_ADMIN),
 857          );
 858  
 859          $act_options = '';
 860          foreach ($act_ary as $key => $data)
 861          {
 862              list($available, $value) = $data;
 863              $selected = ($selected_value == $value) ? ' selected="selected"' : '';
 864              $class = (!$available) ? ' class="disabled-option"' : '';
 865              $act_options .= '<option value="' . $value . '"' . $selected . $class . '>' . $user->lang($key) . '</option>';
 866          }
 867  
 868          return $act_options;
 869      }
 870  
 871      /**
 872      * Maximum/Minimum username length
 873      */
 874  	function username_length($value, $key = '')
 875      {
 876          global $user;
 877  
 878          return '<input id="' . $key . '" type="number" min="1" max="999" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="number" min="8" max="180" name="config[max_name_chars]" value="' . $this->new_config['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
 879      }
 880  
 881      /**
 882      * Allowed chars in usernames
 883      */
 884  	function select_username_chars($selected_value, $key)
 885      {
 886          global $user;
 887  
 888          $user_char_ary = array('USERNAME_CHARS_ANY', 'USERNAME_ALPHA_ONLY', 'USERNAME_ALPHA_SPACERS', 'USERNAME_LETTER_NUM', 'USERNAME_LETTER_NUM_SPACERS', 'USERNAME_ASCII');
 889          $user_char_options = '';
 890          foreach ($user_char_ary as $user_type)
 891          {
 892              $selected = ($selected_value == $user_type) ? ' selected="selected"' : '';
 893              $user_char_options .= '<option value="' . $user_type . '"' . $selected . '>' . $user->lang[$user_type] . '</option>';
 894          }
 895  
 896          return $user_char_options;
 897      }
 898  
 899      /**
 900      * Minimum password length
 901      */
 902  	function password_length($value, $key)
 903      {
 904          global $user;
 905  
 906          return '<input id="' . $key . '" type="number" min="1" max="999" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'];
 907      }
 908  
 909      /**
 910      * Required chars in passwords
 911      */
 912  	function select_password_chars($selected_value, $key)
 913      {
 914          global $user;
 915  
 916          $pass_type_ary = array('PASS_TYPE_ANY', 'PASS_TYPE_CASE', 'PASS_TYPE_ALPHA', 'PASS_TYPE_SYMBOL');
 917          $pass_char_options = '';
 918          foreach ($pass_type_ary as $pass_type)
 919          {
 920              $selected = ($selected_value == $pass_type) ? ' selected="selected"' : '';
 921              $pass_char_options .= '<option value="' . $pass_type . '"' . $selected . '>' . $user->lang[$pass_type] . '</option>';
 922          }
 923  
 924          return $pass_char_options;
 925      }
 926  
 927      /**
 928      * Select bump interval
 929      */
 930  	function bump_interval($value, $key)
 931      {
 932          global $user;
 933  
 934          $s_bump_type = '';
 935          $types = array('m' => 'MINUTES', 'h' => 'HOURS', 'd' => 'DAYS');
 936          foreach ($types as $type => $lang)
 937          {
 938              $selected = ($this->new_config['bump_type'] == $type) ? ' selected="selected"' : '';
 939              $s_bump_type .= '<option value="' . $type . '"' . $selected . '>' . $user->lang[$lang] . '</option>';
 940          }
 941  
 942          return '<input id="' . $key . '" type="text" size="3" maxlength="4" name="config[bump_interval]" value="' . $value . '" />&nbsp;<select name="config[bump_type]">' . $s_bump_type . '</select>';
 943      }
 944  
 945      /**
 946      * Board disable option and message
 947      */
 948  	function board_disable($value, $key)
 949      {
 950          $radio_ary = array(1 => 'YES', 0 => 'NO');
 951  
 952          return h_radio('config[board_disable]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[board_disable_msg]" maxlength="255" size="40" value="' . $this->new_config['board_disable_msg'] . '" />';
 953      }
 954  
 955      /**
 956      * Global quick reply enable/disable setting and button to enable in all forums
 957      */
 958  	function quick_reply($value, $key)
 959      {
 960          global $user;
 961  
 962          $radio_ary = array(1 => 'YES', 0 => 'NO');
 963  
 964          return h_radio('config[allow_quick_reply]', $radio_ary, $value) .
 965              '<br /><br /><input class="button2" type="submit" id="' . $key . '_enable" name="' . $key . '_enable" value="' . $user->lang['ALLOW_QUICK_REPLY_BUTTON'] . '" />';
 966      }
 967  
 968      /**
 969      * Select guest timezone
 970      */
 971  	function timezone_select($value, $key)
 972      {
 973          global $template, $user;
 974  
 975          $timezone_select = phpbb_timezone_select($template, $user, $value, true);
 976  
 977          return '<select name="config[' . $key . ']" id="' . $key . '">' . $timezone_select . '</select>';
 978      }
 979  
 980      /**
 981      * Get guest style
 982      */
 983  	public function guest_style_get()
 984      {
 985          global $db;
 986  
 987          $sql = 'SELECT user_style
 988              FROM ' . USERS_TABLE . '
 989              WHERE user_id = ' . ANONYMOUS;
 990          $result = $db->sql_query($sql);
 991  
 992          $style = (int) $db->sql_fetchfield('user_style');
 993          $db->sql_freeresult($result);
 994  
 995          return $style;
 996      }
 997  
 998      /**
 999      * Set guest style
1000      *
1001      * @param    int        $style_id    The style ID
1002      */
1003  	public function guest_style_set($style_id)
1004      {
1005          global $db;
1006  
1007          $sql = 'UPDATE ' . USERS_TABLE . '
1008              SET user_style = ' . (int) $style_id . '
1009              WHERE user_id = ' . ANONYMOUS;
1010          $db->sql_query($sql);
1011      }
1012  
1013      /**
1014      * Select default dateformat
1015      */
1016  	function dateformat_select($value, $key)
1017      {
1018          global $user, $config;
1019  
1020          // Let the format_date function operate with the acp values
1021          $old_tz = $user->timezone;
1022          try
1023          {
1024              $user->timezone = new DateTimeZone($config['board_timezone']);
1025          }
1026          catch (\Exception $e)
1027          {
1028              // If the board timezone is invalid, we just use the users timezone.
1029          }
1030  
1031          $dateformat_options = '';
1032  
1033          foreach ($user->lang['dateformats'] as $format => $null)
1034          {
1035              $dateformat_options .= '<option value="' . $format . '"' . (($format == $value) ? ' selected="selected"' : '') . '>';
1036              $dateformat_options .= $user->format_date(time(), $format, false) . ((strpos($format, '|') !== false) ? $user->lang['VARIANT_DATE_SEPARATOR'] . $user->format_date(time(), $format, true) : '');
1037              $dateformat_options .= '</option>';
1038          }
1039  
1040          $dateformat_options .= '<option value="custom"';
1041          if (!isset($user->lang['dateformats'][$value]))
1042          {
1043              $dateformat_options .= ' selected="selected"';
1044          }
1045          $dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
1046  
1047          // Reset users date options
1048          $user->timezone = $old_tz;
1049  
1050          return "<select name=\"dateoptions\" id=\"dateoptions\" onchange=\"if (this.value == 'custom') { document.getElementById('" . addslashes($key) . "').value = '" . addslashes($value) . "'; } else { document.getElementById('" . addslashes($key) . "').value = this.value; }\">$dateformat_options</select>
1051          <input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"64\" />";
1052      }
1053  
1054      /**
1055      * Select multiple forums
1056      */
1057  	function select_news_forums($value, $key)
1058      {
1059          $forum_list = make_forum_select(false, false, true, true, true, false, true);
1060  
1061          // Build forum options
1062          $s_forum_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
1063          foreach ($forum_list as $f_id => $f_row)
1064          {
1065              $f_row['selected'] = phpbb_optionget(FORUM_OPTION_FEED_NEWS, $f_row['forum_options']);
1066  
1067              $s_forum_options .= '<option value="' . $f_id . '"' . (($f_row['selected']) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
1068          }
1069          $s_forum_options .= '</select>';
1070  
1071          return $s_forum_options;
1072      }
1073  
1074  	function select_exclude_forums($value, $key)
1075      {
1076          $forum_list = make_forum_select(false, false, true, true, true, false, true);
1077  
1078          // Build forum options
1079          $s_forum_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
1080          foreach ($forum_list as $f_id => $f_row)
1081          {
1082              $f_row['selected'] = phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $f_row['forum_options']);
1083  
1084              $s_forum_options .= '<option value="' . $f_id . '"' . (($f_row['selected']) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
1085          }
1086          $s_forum_options .= '</select>';
1087  
1088          return $s_forum_options;
1089      }
1090  
1091  	function store_feed_forums($option, $key)
1092      {
1093          global $db, $cache, $request;
1094  
1095          // Get key
1096          $values = $request->variable($key, array(0 => 0));
1097  
1098          // Empty option bit for all forums
1099          $sql = 'UPDATE ' . FORUMS_TABLE . '
1100              SET forum_options = forum_options - ' . (1 << $option) . '
1101              WHERE ' . $db->sql_bit_and('forum_options', $option, '<> 0');
1102          $db->sql_query($sql);
1103  
1104          // Already emptied for all...
1105          if (count($values))
1106          {
1107              // Set for selected forums
1108              $sql = 'UPDATE ' . FORUMS_TABLE . '
1109                  SET forum_options = forum_options + ' . (1 << $option) . '
1110                  WHERE ' . $db->sql_in_set('forum_id', $values);
1111              $db->sql_query($sql);
1112          }
1113  
1114          // Empty sql cache for forums table because options changed
1115          $cache->destroy('sql', FORUMS_TABLE);
1116      }
1117  
1118      /**
1119      * Option to enable/disable removal of 'app.php' from URLs
1120      *
1121      * Note that if mod_rewrite is on, URLs without app.php will still work,
1122      * but any paths generated by the controller helper url() method will not
1123      * contain app.php.
1124      *
1125      * @param int $value The current config value
1126      * @param string $key The config key
1127      * @return string The HTML for the form field
1128      */
1129  	function enable_mod_rewrite($value, $key)
1130      {
1131          global $user;
1132  
1133          // Determine whether mod_rewrite is enabled on the server
1134          // NOTE: This only works on Apache servers on which PHP is NOT
1135          // installed as CGI. In that case, there is no way for PHP to
1136          // determine whether or not the Apache module is enabled.
1137          //
1138          // To be clear on the value of $mod_rewite:
1139          // null = Cannot determine whether or not the server has mod_rewrite
1140          //        enabled
1141          // false = Can determine that the server does NOT have mod_rewrite
1142          //         enabled
1143          // true = Can determine that the server DOES have mod_rewrite_enabled
1144          $mod_rewrite = null;
1145          if (function_exists('apache_get_modules'))
1146          {
1147              $mod_rewrite = (bool) in_array('mod_rewrite', apache_get_modules());
1148          }
1149  
1150          // If $message is false, mod_rewrite is enabled.
1151          // Otherwise, it is not and we need to:
1152          // 1) disable the form field
1153          // 2) make sure the config value is set to 0
1154          // 3) append the message to the return
1155          $value = ($mod_rewrite === false) ? 0 : $value;
1156          $message = $mod_rewrite === null ? 'MOD_REWRITE_INFORMATION_UNAVAILABLE' : ($mod_rewrite === false ? 'MOD_REWRITE_DISABLED' : false);
1157  
1158          // Let's do some friendly HTML injection if we want to disable the
1159          // form field because h_radio() has no pretty way of doing so
1160          $field_name = 'config[enable_mod_rewrite]' . ($message === 'MOD_REWRITE_DISABLED' ? '" disabled="disabled' : '');
1161  
1162          return h_radio($field_name, array(1 => 'YES', 0 => 'NO'), $value) .
1163              ($message !== false ? '<br /><span>' . $user->lang($message) . '</span>' : '');
1164      }
1165  
1166  	function send_test_email($value, $key)
1167      {
1168          global $user;
1169  
1170          return '<input class="button2" type="submit" id="' . $key . '" name="' . $key . '" value="' . $user->lang['SEND_TEST_EMAIL'] . '" />';
1171      }
1172  }


Generated: Tue Apr 7 19:44:41 2020 Cross-referenced by PHPXref 0.7.1