Vergleich admin/modules/config/settings.php - 1.8.21 - 1.8.22

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 425Zeile 425
		"checkbox" => $lang->checkbox,
"language" => $lang->language_selection_box,
"adminlanguage" => $lang->adminlanguage,

		"checkbox" => $lang->checkbox,
"language" => $lang->language_selection_box,
"adminlanguage" => $lang->adminlanguage,

		"cpstyle" => $lang->cpstyle


		"cpstyle" => $lang->cpstyle,
"prefixselect" => $lang->prefix_selection_box

		//"php" => $lang->php // Internal Use Only
);


		//"php" => $lang->php // Internal Use Only
);


Zeile 643Zeile 644
		"checkbox" => $lang->checkbox,
"language" => $lang->language_selection_box,
"adminlanguage" => $lang->adminlanguage,

		"checkbox" => $lang->checkbox,
"language" => $lang->language_selection_box,
"adminlanguage" => $lang->adminlanguage,

		"cpstyle" => $lang->cpstyle


		"cpstyle" => $lang->cpstyle,
"prefixselect" => $lang->prefix_selection_box

		//"php" => $lang->php // Internal Use Only
);


		//"php" => $lang->php // Internal Use Only
);


Zeile 966Zeile 968

// Get settings which optionscode is a forum/group select, checkbox or numeric
// We cannot rely on user input to decide this


// Get settings which optionscode is a forum/group select, checkbox or numeric
// We cannot rely on user input to decide this

		$checkbox_settings = $forum_group_select = array();
$query = $db->simple_select('settings', 'name, optionscode', "optionscode IN('forumselect', 'groupselect') OR optionscode LIKE 'checkbox%' OR optionscode LIKE 'numeric%'");

		$checkbox_settings = $forum_group_select = $prefix_select = array();
$query = $db->simple_select('settings', 'name, optionscode', "optionscode IN('forumselect', 'groupselect', 'prefixselect') OR optionscode LIKE 'checkbox%' OR optionscode LIKE 'numeric%'");


while($multisetting = $db->fetch_array($query))
{


while($multisetting = $db->fetch_array($query))
{

Zeile 1039Zeile 1041
			}
}


			}
}


 
		// reject dangerous/unsupported upload paths

		$fields = array(
'uploadspath',
'cdnpath',
'avataruploadpath',
);

		$fields = array(
'uploadspath',
'cdnpath',
'avataruploadpath',
);

		










$dynamic_include_directories = array(
MYBB_ROOT.'cache/',
MYBB_ROOT.'inc/plugins/',
MYBB_ROOT.'inc/languages/',
MYBB_ROOT.'inc/tasks/',
);
$dynamic_include_directories_realpath = array_map('realpath', $dynamic_include_directories);


		foreach($fields as $field)
{
if(

		foreach($fields as $field)
{
if(

Zeile 1053Zeile 1064
				strpos($mybb->input['upsetting'][$field], '://') !== false)
{
unset($mybb->input['upsetting'][$field]);

				strpos($mybb->input['upsetting'][$field], '://') !== false)
{
unset($mybb->input['upsetting'][$field]);

 
				continue;
}

$realpath = realpath(MYBB_ROOT.$mybb->input['upsetting'][$field]);

if ($realpath === false) {
unset($mybb->input['upsetting'][$field]);
continue;
}

foreach ($dynamic_include_directories_realpath as $forbidden_realpath)
{
if ($realpath === $forbidden_realpath || strpos($realpath, $forbidden_realpath.DIRECTORY_SEPARATOR) === 0)
{
unset($mybb->input['upsetting'][$field]);
continue 2;
}

			}
}

			}
}

 



if(is_array($mybb->input['upsetting']))
{


if(is_array($mybb->input['upsetting']))
{

Zeile 1086Zeile 1115
					else
{
$value = '';

					else
{
$value = '';

					}
}

					}
}

				elseif($checkbox_settings && in_array($name, $checkbox_settings))
{
$value = '';

				elseif($checkbox_settings && in_array($name, $checkbox_settings))
{
$value = '';

Zeile 1099Zeile 1128
				}

$db->update_query("settings", array('value' => $db->escape_string($value)), "name='".$db->escape_string($name)."'");

				}

$db->update_query("settings", array('value' => $db->escape_string($value)), "name='".$db->escape_string($name)."'");

			}
}


			}
}


		// 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")
{

Zeile 1123Zeile 1152

// Have we changed our cookie prefix? If so, update our adminsid so we're not logged out
if(isset($mybb->input['upsetting']['cookieprefix']) && $mybb->input['upsetting']['cookieprefix'] != $mybb->settings['cookieprefix'])


// Have we changed our cookie prefix? If so, update our adminsid so we're not logged out
if(isset($mybb->input['upsetting']['cookieprefix']) && $mybb->input['upsetting']['cookieprefix'] != $mybb->settings['cookieprefix'])

		{

		{

			my_unsetcookie("adminsid");
$mybb->settings['cookieprefix'] = $mybb->input['upsetting']['cookieprefix'];
my_setcookie("adminsid", $admin_session['sid'], '', true, "lax");
}

if(isset($mybb->input['upsetting']['statstopreferrer']) && $mybb->input['upsetting']['statstopreferrer'] != $mybb->settings['statstopreferrer'])

			my_unsetcookie("adminsid");
$mybb->settings['cookieprefix'] = $mybb->input['upsetting']['cookieprefix'];
my_setcookie("adminsid", $admin_session['sid'], '', true, "lax");
}

if(isset($mybb->input['upsetting']['statstopreferrer']) && $mybb->input['upsetting']['statstopreferrer'] != $mybb->settings['statstopreferrer'])

		{

		{

			$cache->update_statistics();
}

			$cache->update_statistics();
}





		$statslimit = $mybb->settings['statslimit'];

rebuild_settings();

		$statslimit = $mybb->settings['statslimit'];

rebuild_settings();





		if(isset($mybb->input['upsetting']['statslimit']) && $mybb->input['upsetting']['statslimit'] != $statslimit)
{
$cache->update_most_replied_threads();

		if(isset($mybb->input['upsetting']['statslimit']) && $mybb->input['upsetting']['statslimit'] != $statslimit)
{
$cache->update_most_replied_threads();

Zeile 1158Zeile 1187
	if(isset($mybb->input['search']))
{
// Search

	if(isset($mybb->input['search']))
{
// Search





		// Search for settings
$search = $db->escape_string_like($mybb->input['search']);
$query = $db->query("

		// Search for settings
$search = $db->escape_string_like($mybb->input['search']);
$query = $db->query("

Zeile 1186Zeile 1215
			}
$lang_var = "setting_group_{$setting['gname']}_desc";
if(isset($lang->$lang_var))

			}
$lang_var = "setting_group_{$setting['gname']}_desc";
if(isset($lang->$lang_var))

			{

			{

				$setting["gdescription"] = $lang->$lang_var;
}
$lang_var = $setting["title"] . " " . $setting["description"] . " " . $setting["gtitle"] . " " . $setting["gdescription"];

				$setting["gdescription"] = $lang->$lang_var;
}
$lang_var = $setting["title"] . " " . $setting["description"] . " " . $setting["gtitle"] . " " . $setting["gdescription"];

Zeile 1214Zeile 1243
		$groups = array_keys($cache_settings);
$groups = implode(',', $groups);
$query = $db->simple_select("settinggroups", "*", "gid IN ({$groups})", array('order_by' => 'disporder'));

		$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))

		while($group = $db->fetch_array($query))

		{
$cache_groups[$group['gid']] = $group;
}

		{
$cache_groups[$group['gid']] = $group;
}

Zeile 1227Zeile 1256
		}
}
elseif($mybb->input['gid'])

		}
}
elseif($mybb->input['gid'])

	{

	{

		// Group listing
// Cache groups
$query = $db->simple_select("settinggroups", "*", "gid = '".$mybb->get_input('gid', MyBB::INPUT_INT)."'");
$groupinfo = $db->fetch_array($query);
$cache_groups[$groupinfo['gid']] = $groupinfo;

		// Group listing
// Cache groups
$query = $db->simple_select("settinggroups", "*", "gid = '".$mybb->get_input('gid', MyBB::INPUT_INT)."'");
$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 1270Zeile 1299
		while($group = $db->fetch_array($query))
{
$cache_groups[$group['gid']] = $group;

		while($group = $db->fetch_array($query))
{
$cache_groups[$group['gid']] = $group;

		}


		}


		if(!$db->num_rows($query))
{
$page->output_error($lang->error_invalid_gid2);

		if(!$db->num_rows($query))
{
$page->output_error($lang->error_invalid_gid2);

Zeile 1498Zeile 1527
			{
$selected_value = (int)$setting['value']; // No need to check if empty, int will give 0
$setting_code = $form->generate_group_select($element_name, $selected_value, array('id' => $element_id, 'main_option' => $lang->none));

			{
$selected_value = (int)$setting['value']; // No need to check if empty, int will give 0
$setting_code = $form->generate_group_select($element_name, $selected_value, array('id' => $element_id, 'main_option' => $lang->none));

 
			}
else if($type[0] == "prefixselect")
{
$selected_values = '';
if($setting['value'] != '' && $setting['value'] != -1)
{
$selected_values = explode(',', (string)$setting['value']);
foreach($selected_values as &$value)
{
$value = (int)$value;
}
unset($value);
}
$prefix_checked = array('all' => '', 'custom' => '', 'none' => '');
if($setting['value'] == -1)
{
$prefix_checked['all'] = 'checked="checked"';
}
elseif($setting['value'] != '')
{
$prefix_checked['custom'] = 'checked="checked"';
}
else
{
$prefix_checked['none'] = 'checked="checked"';
}
print_selection_javascript();
$setting_code = "
<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%\">
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"{$element_name}\" value=\"all\" {$prefix_checked['all']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->all_prefix}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"{$element_name}\" value=\"custom\" {$prefix_checked['custom']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->select_prefix}</strong></label></dt>
<dd style=\"margin-top: 4px;\" id=\"{$element_id}_forums_groups_custom\" class=\"{$element_id}_forums_groups\">
<table cellpadding=\"4\">
<tr>
<td valign=\"top\"><small>{$lang->prefix_colon}</small></td>
<td>".$form->generate_prefix_select('select['.$setting['name'].'][]', $selected_values, array('id' => $element_id, 'multiple' => true, 'size' => 5))."</td>
</tr>
</table>
</dd>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"{$element_name}\" value=\"none\" {$prefix_checked['none']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->none}</strong></label></dt>
</dl>
<script type=\"text/javascript\">
checkAction('{$element_id}');
</script>";

			}
else
{

			}
else
{