Zeile 293 | Zeile 293 |
---|
}
// do some type filtering
|
}
// do some type filtering
|
$mybb->input['type'] = str_replace("\n", "", $mybb->input['type']); if(strtolower(substr($mybb->input['type'], 0, 3)) == "php")
| $mybb->input['type'] = $mybb->get_input('type'); if(!ctype_alnum($mybb->input['type']) || strtolower($mybb->input['type']) == "php")
|
{ $mybb->input['type'] = ""; }
| { $mybb->input['type'] = ""; }
|
Zeile 306 | Zeile 306 |
---|
if(!$errors) {
|
if(!$errors) {
|
if($mybb->input['type'] == "custom") { $options_code = $mybb->input['extra']; } else if($mybb->input['extra'])
| if($mybb->input['extra'])
|
{ $options_code = "{$mybb->input['type']}\n{$mybb->input['extra']}"; }
| { $options_code = "{$mybb->input['type']}\n{$mybb->input['extra']}"; }
|
Zeile 500 | Zeile 496 |
---|
}
// do some type filtering
|
}
// do some type filtering
|
$mybb->input['type'] = str_replace("\n", "", $mybb->input['type']); if(strtolower(substr($mybb->input['type'], 0, 3)) == "php")
| $mybb->input['type'] = $mybb->get_input('type'); if(!ctype_alnum($mybb->input['type']) || strtolower($mybb->input['type']) == "php")
|
{ $mybb->input['type'] = ""; }
| { $mybb->input['type'] = ""; }
|
Zeile 513 | Zeile 509 |
---|
if(!$errors) {
|
if(!$errors) {
|
if($mybb->input['type'] == "custom") { $options_code = $mybb->input['extra']; } else if($mybb->input['extra'])
| if($mybb->input['extra'])
|
{ $options_code = "{$mybb->input['type']}\n{$mybb->input['extra']}"; }
| { $options_code = "{$mybb->input['type']}\n{$mybb->input['extra']}"; }
|
Zeile 559 | Zeile 551 |
---|
flash_message($lang->success_setting_updated, 'success'); admin_redirect("index.php?module=config-settings&action=manage");
|
flash_message($lang->success_setting_updated, 'success'); admin_redirect("index.php?module=config-settings&action=manage");
|
}
| }
|
}
|
}
|
|
|
$page->add_breadcrumb_item($lang->edit_setting); $page->output_header($lang->board_settings." - ".$lang->edit_setting);
$sub_tabs['change_settings'] = array( 'title' => $lang->change_settings, 'link' => "index.php?module=config-settings",
|
$page->add_breadcrumb_item($lang->edit_setting); $page->output_header($lang->board_settings." - ".$lang->edit_setting);
$sub_tabs['change_settings'] = array( 'title' => $lang->change_settings, 'link' => "index.php?module=config-settings",
|
);
| );
|
$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"
|
);
| );
|
$sub_tabs['modify_setting'] = array( 'title' => $lang->modify_existing_settings, 'link' => "index.php?module=config-settings&action=manage",
| $sub_tabs['modify_setting'] = array( 'title' => $lang->modify_existing_settings, 'link' => "index.php?module=config-settings&action=manage",
|
Zeile 679 | Zeile 671 |
---|
{ $query = $db->simple_select("settings", "*", "sid='".$mybb->get_input('sid', MyBB::INPUT_INT)."'"); $setting = $db->fetch_array($query);
|
{ $query = $db->simple_select("settings", "*", "sid='".$mybb->get_input('sid', MyBB::INPUT_INT)."'"); $setting = $db->fetch_array($query);
|
|
|
// Does the setting not exist? if(empty($setting['sid'])) { flash_message($lang->error_invalid_sid, 'error');
|
// Does the setting not exist? if(empty($setting['sid'])) { flash_message($lang->error_invalid_sid, 'error');
|
admin_redirect("index.php?module=config-settings&action=manage"); }
| admin_redirect("index.php?module=config-settings&action=manage"); }
|
// Prevent editing of default if($setting['isdefault'] == 1)
|
// Prevent editing of default if($setting['isdefault'] == 1)
|
{
| {
|
flash_message($lang->error_cannot_edit_default, 'error'); admin_redirect("index.php?module=config-settings&action=manage"); }
|
flash_message($lang->error_cannot_edit_default, 'error'); admin_redirect("index.php?module=config-settings&action=manage"); }
|
// User clicked no if($mybb->get_input('no')) { admin_redirect("index.php?module=config-settings&action=manage"); }
$plugins->run_hooks("admin_config_settings_delete");
| // User clicked no if($mybb->get_input('no')) { admin_redirect("index.php?module=config-settings&action=manage"); }
$plugins->run_hooks("admin_config_settings_delete");
|
if($mybb->request_method == "post") { // Delete the setting
| if($mybb->request_method == "post") { // Delete the setting
|
Zeile 812 | Zeile 804 |
---|
if(!empty($lang->$group_lang_var)) { $group_title = htmlspecialchars_uni($lang->$group_lang_var);
|
if(!empty($lang->$group_lang_var)) { $group_title = htmlspecialchars_uni($lang->$group_lang_var);
|
} else {
| } else {
|
$group_title = htmlspecialchars_uni($group['title']); } $table->construct_cell("<strong>{$group_title}</strong>", array('id' => "group{$group['gid']}"));
| $group_title = htmlspecialchars_uni($group['title']); } $table->construct_cell("<strong>{$group_title}</strong>", array('id' => "group{$group['gid']}"));
|
Zeile 860 | Zeile 852 |
---|
else { $table->construct_cell('');
|
else { $table->construct_cell('');
|
}
| }
|
$table->construct_row(array('no_alt_row' => 1, 'class' => "group{$group['gid']}")); } }
| $table->construct_row(array('no_alt_row' => 1, 'class' => "group{$group['gid']}")); } }
|
Zeile 972 | Zeile 964 |
---|
isset($mybb->input['upsetting']['minnamelength'], $mybb->input['upsetting']['maxnamelength']) && $mybb->input['upsetting']['minnamelength'] > 0 && $mybb->input['upsetting']['maxnamelength'] > 0 && $mybb->input['upsetting']['minnamelength'] > $mybb->input['upsetting']['maxnamelength'])
|
isset($mybb->input['upsetting']['minnamelength'], $mybb->input['upsetting']['maxnamelength']) && $mybb->input['upsetting']['minnamelength'] > 0 && $mybb->input['upsetting']['maxnamelength'] > 0 && $mybb->input['upsetting']['minnamelength'] > $mybb->input['upsetting']['maxnamelength'])
|
{
| {
|
flash_message($lang->error_field_minnamelength, 'error');
|
flash_message($lang->error_field_minnamelength, 'error');
|
admin_redirect("index.php?module=config-settings&action=change&gid=".$gid); }
| admin_redirect("index.php?module=config-settings&action=change&gid=".$gid); }
|
if ( isset($mybb->input['upsetting']['minpasswordlength'], $mybb->input['upsetting']['maxpasswordlength']) && $mybb->input['upsetting']['minpasswordlength'] > 0 && $mybb->input['upsetting']['maxpasswordlength'] > 0 && $mybb->input['upsetting']['minpasswordlength'] > $mybb->input['upsetting']['maxpasswordlength']
|
if ( isset($mybb->input['upsetting']['minpasswordlength'], $mybb->input['upsetting']['maxpasswordlength']) && $mybb->input['upsetting']['minpasswordlength'] > 0 && $mybb->input['upsetting']['maxpasswordlength'] > 0 && $mybb->input['upsetting']['minpasswordlength'] > $mybb->input['upsetting']['maxpasswordlength']
|
)
| )
|
{ flash_message($lang->error_field_minpasswordlength, 'error'); admin_redirect("index.php?module=config-settings&action=change&gid=".$gid);
| { flash_message($lang->error_field_minpasswordlength, 'error'); admin_redirect("index.php?module=config-settings&action=change&gid=".$gid);
|
Zeile 994 | Zeile 986 |
---|
{ flash_message($lang->error_field_minpasswordlength_complex, 'error'); admin_redirect("index.php?module=config-settings&action=change&gid=".$gid);
|
{ flash_message($lang->error_field_minpasswordlength_complex, 'error'); admin_redirect("index.php?module=config-settings&action=change&gid=".$gid);
|
}
| }
|
} require_once MYBB_ROOT.'inc/class_captcha.php';
| } require_once MYBB_ROOT.'inc/class_captcha.php';
|
Zeile 1040 | Zeile 1032 |
---|
$hcaptchapublickey = $mybb->settings['hcaptchapublickey'];
if(in_array($captchaimage, array(captcha::NOCAPTCHA_RECAPTCHA, captcha::RECAPTCHA_INVISIBLE)) && (!$recaptchaprivatekey || !$recaptchapublickey))
|
$hcaptchapublickey = $mybb->settings['hcaptchapublickey'];
if(in_array($captchaimage, array(captcha::NOCAPTCHA_RECAPTCHA, captcha::RECAPTCHA_INVISIBLE)) && (!$recaptchaprivatekey || !$recaptchapublickey))
|
{
| {
|
$set_captcha_image = true; } else if(in_array($captchaimage, array(captcha::RECAPTCHA_V3)) && (!$recaptchaprivatekey || !$recaptchapublickey || !$recaptchascore))
| $set_captcha_image = true; } else if(in_array($captchaimage, array(captcha::RECAPTCHA_V3)) && (!$recaptchaprivatekey || !$recaptchapublickey || !$recaptchascore))
|
Zeile 1291 | Zeile 1283 |
---|
{ my_unsetcookie("adminsid"); $mybb->settings['cookieprefix'] = $mybb->input['upsetting']['cookieprefix'];
|
{ my_unsetcookie("adminsid"); $mybb->settings['cookieprefix'] = $mybb->input['upsetting']['cookieprefix'];
|
my_setcookie("adminsid", $admin_session['sid'], '', true, "lax");
| my_setcookie("adminsid", $admin_session['sid'], '', true, "strict");
|
}
if(isset($mybb->input['upsetting']['statstopreferrer']) && $mybb->input['upsetting']['statstopreferrer'] != $mybb->settings['statstopreferrer'])
| }
if(isset($mybb->input['upsetting']['statstopreferrer']) && $mybb->input['upsetting']['statstopreferrer'] != $mybb->settings['statstopreferrer'])
|
Zeile 1411 | Zeile 1403 |
---|
{ $groupinfo['title'] = $lang->$group_lang_var; }
|
{ $groupinfo['title'] = $lang->$group_lang_var; }
|
| $groupinfo['title'] = htmlspecialchars_uni($groupinfo['title']);
|
// Page header $page->add_breadcrumb_item($groupinfo['title']);
| // Page header $page->add_breadcrumb_item($groupinfo['title']);
|
Zeile 1453 | Zeile 1447 |
---|
if(isset($lang->$group_lang_var)) { $groupinfo['title'] = $lang->$group_lang_var;
|
if(isset($lang->$group_lang_var)) { $groupinfo['title'] = $lang->$group_lang_var;
|
}
$form_container = new FormContainer($groupinfo['title']);
| }
$groupinfo['title'] = htmlspecialchars_uni($groupinfo['title']);
$form_container = new FormContainer($groupinfo['title']);
|
if(empty($cache_settings[$groupinfo['gid']])) {
| if(empty($cache_settings[$groupinfo['gid']])) {
|
Zeile 1470 | Zeile 1466 |
---|
foreach($cache_settings[$groupinfo['gid']] as $setting) {
|
foreach($cache_settings[$groupinfo['gid']] as $setting) {
|
| $setting['name'] = htmlspecialchars_uni($setting['name']);
|
$options = ""; $type = explode("\n", $setting['optionscode']); $type[0] = trim($type[0]);
| $options = ""; $type = explode("\n", $setting['optionscode']); $type[0] = trim($type[0]);
|
Zeile 1706 | Zeile 1704 |
---|
$multivalue = explode(',', $setting['value']); }
|
$multivalue = explode(',', $setting['value']); }
|
| $option_list = array();
|
for($i = 0; $i < $typecount; $i++) { $optionsexp = explode("=", $type[$i]); if(!isset($optionsexp[1])) { continue;
|
for($i = 0; $i < $typecount; $i++) { $optionsexp = explode("=", $type[$i]); if(!isset($optionsexp[1])) { continue;
|
}
| }
|
$title_lang = "setting_{$setting['name']}_{$optionsexp[0]}"; if(isset($lang->$title_lang)) {
| $title_lang = "setting_{$setting['name']}_{$optionsexp[0]}"; if(isset($lang->$title_lang)) {
|
Zeile 1726 | Zeile 1725 |
---|
else if($type[0] == "radio") { if($setting['value'] == $optionsexp[0])
|
else if($type[0] == "radio") { if($setting['value'] == $optionsexp[0])
|
{
| {
|
$option_list[$i] = $form->generate_radio_button($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, "checked" => 1, 'class' => $element_id));
|
$option_list[$i] = $form->generate_radio_button($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, "checked" => 1, 'class' => $element_id));
|
}
| }
|
else { $option_list[$i] = $form->generate_radio_button($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id));
|
else { $option_list[$i] = $form->generate_radio_button($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id));
|
} }
| } }
|
else if($type[0] == "checkbox") { if(in_array($optionsexp[0], $multivalue))
| else if($type[0] == "checkbox") { if(in_array($optionsexp[0], $multivalue))
|
Zeile 1760 | Zeile 1759 |
---|
$setting_code .= $form->generate_hidden_field("isvisible_{$setting['name']}", 1); } }
|
$setting_code .= $form->generate_hidden_field("isvisible_{$setting['name']}", 1); } }
|
$option_list = array();
| |
}
// Do we have a custom language variable for this title or description?
| }
// Do we have a custom language variable for this title or description?
|
Zeile 1930 | Zeile 1928 |
---|
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 1940 | Zeile 1938 |
---|
}
$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); }
|