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 5380 2011-02-21 12:04:43Z Tomm $
| * $Id$
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 845 | Zeile 845 |
---|
if($mybb->request_method == "post") {
|
if($mybb->request_method == "post") {
|
| if(!is_writable(MYBB_ROOT.'inc/settings.php')) { flash_message($lang->error_chmod_settings_file, 'error'); admin_redirect("index.php?module=config-settings"); }
|
if(is_array($mybb->input['upsetting'])) { foreach($mybb->input['upsetting'] as $name => $value)
| if(is_array($mybb->input['upsetting'])) { foreach($mybb->input['upsetting'] as $name => $value)
|
Zeile 856 | Zeile 862 |
---|
// Check if we need to create our fulltext index after changing the search mode if($mybb->settings['searchtype'] != $mybb->input['upsetting']['searchtype'] && $mybb->input['upsetting']['searchtype'] == "fulltext")
|
// Check if we need to create our fulltext index after changing the search mode if($mybb->settings['searchtype'] != $mybb->input['upsetting']['searchtype'] && $mybb->input['upsetting']['searchtype'] == "fulltext")
|
{
| {
|
if(!$db->is_fulltext("posts") && $db->supports_fulltext_boolean("posts")) { $db->create_fulltext_index("posts", "message"); } if(!$db->is_fulltext("posts") && $db->supports_fulltext("threads"))
|
if(!$db->is_fulltext("posts") && $db->supports_fulltext_boolean("posts")) { $db->create_fulltext_index("posts", "message"); } if(!$db->is_fulltext("posts") && $db->supports_fulltext("threads"))
|
{
| {
|
$db->create_fulltext_index("threads", "subject"); } }
| $db->create_fulltext_index("threads", "subject"); } }
|
Zeile 874 | Zeile 880 |
---|
{ $updated_task = array( "enabled" => 0
|
{ $updated_task = array( "enabled" => 0
|
);
| );
|
} else {
| } else {
|
Zeile 892 | 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 906 | 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
|
Zeile 985 | Zeile 997 |
---|
} $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 1032 | 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 1111 | 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; }
|
Zeile 1161 | 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 1191 | 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 1205 | Zeile 1217 |
---|
$sub_tabs['add_setting'] = array( 'title' => $lang->add_new_setting, 'link' => "index.php?module=config-settings&action=add"
|
$sub_tabs['add_setting'] = array( 'title' => $lang->add_new_setting, 'link' => "index.php?module=config-settings&action=add"
|
);
| );
|
$sub_tabs['add_setting_group'] = array( 'title' => $lang->add_new_setting_group, 'link' => "index.php?module=config-settings&action=addgroup"
| $sub_tabs['add_setting_group'] = array( 'title' => $lang->add_new_setting_group, 'link' => "index.php?module=config-settings&action=addgroup"
|
Zeile 1236 | Zeile 1248 |
---|
switch($db->type) { case "pgsql":
|
switch($db->type) { case "pgsql":
|
$query = $db->query(" SELECT g.*, COUNT(s.sid) AS settingcount FROM ".TABLE_PREFIX."settinggroups g
| $query = $db->query(" SELECT g.*, COUNT(s.sid) AS settingcount FROM ".TABLE_PREFIX."settinggroups g
|
LEFT JOIN ".TABLE_PREFIX."settings s ON (s.gid=g.gid) GROUP BY ".$db->build_fields_string("settinggroups", "g.")." ORDER BY g.disporder
| LEFT JOIN ".TABLE_PREFIX."settings s ON (s.gid=g.gid) GROUP BY ".$db->build_fields_string("settinggroups", "g.")." ORDER BY g.disporder
|
Zeile 1256 | 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 1266 | 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 1382 | 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 1409 | 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>'; }
|