Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: settings.php 5466 2011-05-17 11:45:17Z dvb $
| * $Id$
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 898 | Zeile 898 |
---|
$mybb->settings['cookieprefix'] = $mybb->input['upsetting']['cookieprefix']; my_setcookie("adminsid", $admin_session['sid']); }
|
$mybb->settings['cookieprefix'] = $mybb->input['upsetting']['cookieprefix']; my_setcookie("adminsid", $admin_session['sid']); }
|
| // Have we opted for a reCAPTCHA and not set a public/private key? if($mybb->input['upsetting']['captchaimage'] == 2 && !$mybb->input['upsetting']['captchaprivatekey'] && !$mybb->input['upsetting']['captchapublickey']) { $db->update_query("settings", array("value" => 1), "name = 'captchaimage'"); }
|
rebuild_settings(); $plugins->run_hooks("admin_config_settings_change_commit");
| rebuild_settings(); $plugins->run_hooks("admin_config_settings_change_commit");
|
Zeile 912 | Zeile 918 |
---|
// What type of page $cache_groups = $cache_settings = array();
|
// What type of page $cache_groups = $cache_settings = array();
|
if($mybb->input['search'])
| if(isset($mybb->input['search']))
|
{ // Search
|
{ // Search
|
|
|
// Search for settings $search = $db->escape_string($mybb->input['search']); $query = $db->query("
| // Search for settings $search = $db->escape_string($mybb->input['search']); $query = $db->query("
|
Zeile 941 | Zeile 947 |
---|
{ flash_message($lang->error_no_settings_found, 'error'); admin_redirect("index.php?module=config-settings");
|
{ flash_message($lang->error_no_settings_found, 'error'); admin_redirect("index.php?module=config-settings");
|
} }
| } }
|
// Cache groups $groups = array_keys($cache_settings); $groups = implode(',', $groups); $query = $db->simple_select("settinggroups", "*", "gid IN ({$groups})", array('order_by' => 'disporder')); while($group = $db->fetch_array($query))
|
// Cache groups $groups = array_keys($cache_settings); $groups = implode(',', $groups); $query = $db->simple_select("settinggroups", "*", "gid IN ({$groups})", array('order_by' => 'disporder')); while($group = $db->fetch_array($query))
|
{
| {
|
$cache_groups[$group['gid']] = $group; } // Page header only if not AJAX if(!isset($mybb->input['ajax_search']))
|
$cache_groups[$group['gid']] = $group; } // Page header only if not AJAX if(!isset($mybb->input['ajax_search']))
|
{
| {
|
$page->add_breadcrumb_item($lang->settings_search); $page->output_header($lang->board_settings." - {$lang->settings_search}"); }
| $page->add_breadcrumb_item($lang->settings_search); $page->output_header($lang->board_settings." - {$lang->settings_search}"); }
|
Zeile 971 | Zeile 977 |
---|
$query = $db->simple_select("settinggroups", "*", "gid = '".intval($mybb->input['gid'])."'"); $groupinfo = $db->fetch_array($query); $cache_groups[$groupinfo['gid']] = $groupinfo;
|
$query = $db->simple_select("settinggroups", "*", "gid = '".intval($mybb->input['gid'])."'"); $groupinfo = $db->fetch_array($query); $cache_groups[$groupinfo['gid']] = $groupinfo;
|
if(!$db->num_rows($query))
| if(!$db->num_rows($query))
|
{ $page->output_error($lang->error_invalid_gid2); }
| { $page->output_error($lang->error_invalid_gid2); }
|
Zeile 988 | Zeile 994 |
---|
{ flash_message($lang->error_no_settings_found, 'error'); admin_redirect("index.php?module=config-settings");
|
{ flash_message($lang->error_no_settings_found, 'error'); admin_redirect("index.php?module=config-settings");
|
}
| }
|
$group_lang_var = "setting_group_{$groupinfo['name']}";
|
$group_lang_var = "setting_group_{$groupinfo['name']}";
|
if($lang->$group_lang_var)
| if(isset($lang->$group_lang_var))
|
{ $groupinfo['title'] = $lang->$group_lang_var; }
| { $groupinfo['title'] = $lang->$group_lang_var; }
|
Zeile 1038 | Zeile 1044 |
---|
foreach($cache_groups as $groupinfo) { $group_lang_var = "setting_group_{$groupinfo['name']}";
|
foreach($cache_groups as $groupinfo) { $group_lang_var = "setting_group_{$groupinfo['name']}";
|
if($lang->$group_lang_var)
| if(isset($lang->$group_lang_var))
|
{ $groupinfo['title'] = $lang->$group_lang_var; }
| { $groupinfo['title'] = $lang->$group_lang_var; }
|
Zeile 1068 | Zeile 1074 |
---|
$setting_code = $form->generate_text_box($element_name, $setting['value'], array('id' => $element_id)); } else if($type[0] == "textarea")
|
$setting_code = $form->generate_text_box($element_name, $setting['value'], array('id' => $element_id)); } else if($type[0] == "textarea")
|
{
| {
|
$setting_code = $form->generate_text_area($element_name, $setting['value'], array('id' => $element_id)); } else if($type[0] == "yesno")
| $setting_code = $form->generate_text_area($element_name, $setting['value'], array('id' => $element_id)); } else if($type[0] == "yesno")
|
Zeile 1078 | Zeile 1084 |
---|
else if($type[0] == "onoff") { $setting_code = $form->generate_on_off_radio($element_name, $setting['value'], true, array('id' => $element_id.'_on', 'class' => $element_id), array('id' => $element_id.'_off', 'class' => $element_id));
|
else if($type[0] == "onoff") { $setting_code = $form->generate_on_off_radio($element_name, $setting['value'], true, array('id' => $element_id.'_on', 'class' => $element_id), array('id' => $element_id.'_off', 'class' => $element_id));
|
}
| }
|
else if($type[0] == "cpstyle") { $dir = @opendir(MYBB_ROOT.$config['admin_dir']."/styles");
| else if($type[0] == "cpstyle") { $dir = @opendir(MYBB_ROOT.$config['admin_dir']."/styles");
|
Zeile 1117 | Zeile 1123 |
---|
for($i=0; $i < count($type); $i++) { $optionsexp = explode("=", $type[$i]);
|
for($i=0; $i < count($type); $i++) { $optionsexp = explode("=", $type[$i]);
|
if(!$optionsexp[1])
| if(!isset($optionsexp[1]))
|
{ continue; } $title_lang = "setting_{$setting['name']}_{$optionsexp[0]}";
|
{ continue; } $title_lang = "setting_{$setting['name']}_{$optionsexp[0]}";
|
if($lang->$title_lang)
| if(isset($lang->$title_lang))
|
{ $optionsexp[1] = $lang->$title_lang;
|
{ $optionsexp[1] = $lang->$title_lang;
|
}
| }
|
if($type[0] == "select") {
| if($type[0] == "select") {
|
Zeile 1167 | Zeile 1173 |
---|
// Do we have a custom language variable for this title or description? $title_lang = "setting_".$setting['name']; $desc_lang = $title_lang."_desc";
|
// Do we have a custom language variable for this title or description? $title_lang = "setting_".$setting['name']; $desc_lang = $title_lang."_desc";
|
if($lang->$title_lang)
| if(isset($lang->$title_lang))
|
{ $setting['title'] = $lang->$title_lang; }
|
{ $setting['title'] = $lang->$title_lang; }
|
if($lang->$desc_lang)
| if(isset($lang->$desc_lang))
|
{ $setting['description'] = $lang->$desc_lang; }
| { $setting['description'] = $lang->$desc_lang; }
|
Zeile 1197 | Zeile 1203 |
---|
$plugins->run_hooks("admin_config_settings_start"); $page->output_header($lang->board_settings);
|
$plugins->run_hooks("admin_config_settings_start"); $page->output_header($lang->board_settings);
|
if($message)
| if(isset($message))
|
{ $page->output_inline_message($message); }
| { $page->output_inline_message($message); }
|
Zeile 1262 | Zeile 1268 |
---|
while($group = $db->fetch_array($query)) { $group_lang_var = "setting_group_{$group['name']}";
|
while($group = $db->fetch_array($query)) { $group_lang_var = "setting_group_{$group['name']}";
|
if($lang->$group_lang_var)
| if(isset($lang->$group_lang_var))
|
{ $group_title = htmlspecialchars_uni($lang->$group_lang_var); }
| { $group_title = htmlspecialchars_uni($lang->$group_lang_var); }
|
Zeile 1272 | Zeile 1278 |
---|
} $group_desc_lang_var = "setting_group_{$group['name']}_desc";
|
} $group_desc_lang_var = "setting_group_{$group['name']}_desc";
|
if($lang->$group_desc_lang_var)
| if(isset($lang->$group_desc_lang_var))
|
{ $group_desc = htmlspecialchars_uni($lang->$group_desc_lang_var); }
| { $group_desc = htmlspecialchars_uni($lang->$group_desc_lang_var); }
|
Zeile 1388 | Zeile 1394 |
---|
new Peeker($$(".setting_showsimilarthreads"), $("row_setting_similarityrating"), /1/, true); new Peeker($$(".setting_showsimilarthreads"), $("row_setting_similarlimit"), /1/, true); new Peeker($$(".setting_disableregs"), $("row_setting_regtype"), /0/, true);
|
new Peeker($$(".setting_showsimilarthreads"), $("row_setting_similarityrating"), /1/, true); new Peeker($$(".setting_showsimilarthreads"), $("row_setting_similarlimit"), /1/, true); new Peeker($$(".setting_disableregs"), $("row_setting_regtype"), /0/, true);
|
| new Peeker($$(".setting_hiddencaptchaimage"), $("row_setting_hiddencaptchaimagefield"), /1/, true);
|
new Peeker($$(".setting_showsimilarthreads"), $("row_setting_similarlimit"), /1/, true); new Peeker($("setting_failedlogincount"), $("row_setting_failedlogintime"), /[^0]/, false); new Peeker($("setting_failedlogincount"), $("row_setting_failedlogintext"), /[^0]/, false);
| new Peeker($$(".setting_showsimilarthreads"), $("row_setting_similarlimit"), /1/, true); new Peeker($("setting_failedlogincount"), $("row_setting_failedlogintime"), /[^0]/, false); new Peeker($("setting_failedlogincount"), $("row_setting_failedlogintext"), /[^0]/, false);
|
Zeile 1415 | Zeile 1422 |
---|
new Peeker($("setting_mail_handler"), $("row_setting_smtp_pass"), /smtp/, false); new Peeker($("setting_mail_handler"), $("row_setting_secure_smtp"), /smtp/, false); new Peeker($("setting_mail_handler"), $("row_setting_mail_parameters"), /mail/, false);
|
new Peeker($("setting_mail_handler"), $("row_setting_smtp_pass"), /smtp/, false); new Peeker($("setting_mail_handler"), $("row_setting_secure_smtp"), /smtp/, false); new Peeker($("setting_mail_handler"), $("row_setting_mail_parameters"), /mail/, false);
|
| new Peeker($("setting_captchaimage"), $("row_setting_captchapublickey"), 2, false); new Peeker($("setting_captchaimage"), $("row_setting_captchaprivatekey"), 2, false);
|
} </script>'; }
| } </script>'; }
|