Vergleich admin/modules/config/settings.php - 1.8.32 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 118Zeile 118
	$group = $db->fetch_array($query);

// Does the setting not exist?

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

// Does the setting not exist?

	if(!$group['gid'])

	if(!$group)

	{
flash_message($lang->error_invalid_gid2, 'error');
admin_redirect("index.php?module=config-settings&action=manage");

	{
flash_message($lang->error_invalid_gid2, 'error');
admin_redirect("index.php?module=config-settings&action=manage");

Zeile 220Zeile 220
	$group = $db->fetch_array($query);

// Does the setting group not exist?

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

// Does the setting group not exist?

	if(!$group['gid'])

	if(!$group)

	{
flash_message($lang->error_invalid_gid2, 'error');
admin_redirect("index.php?module=config-settings&action=manage");

	{
flash_message($lang->error_invalid_gid2, 'error');
admin_redirect("index.php?module=config-settings&action=manage");

Zeile 454Zeile 454
	$setting = $db->fetch_array($query);

// Does the setting not exist?

	$setting = $db->fetch_array($query);

// Does the setting not exist?

	if(!$setting['sid'])

	if(!$setting)

	{
flash_message($lang->error_invalid_sid, 'error');
admin_redirect("index.php?module=config-settings");

	{
flash_message($lang->error_invalid_sid, 'error');
admin_redirect("index.php?module=config-settings");

Zeile 673Zeile 673
	$setting = $db->fetch_array($query);

// Does the setting not exist?

	$setting = $db->fetch_array($query);

// Does the setting not exist?

	if(empty($setting['sid']))

	if(!$setting)

	{
flash_message($lang->error_invalid_sid, 'error');
admin_redirect("index.php?module=config-settings&action=manage");

	{
flash_message($lang->error_invalid_sid, 'error');
admin_redirect("index.php?module=config-settings&action=manage");

Zeile 1208Zeile 1208
			}
}


			}
}


 
		// reject dangerous/unsupported file paths
$field = 'errorloglocation';

if(isset($mybb->input['upsetting'][$field]) && is_string($mybb->input['upsetting'][$field]))
{
if(
strpos($mybb->input['upsetting'][$field], '://') !== false ||
substr($mybb->input['upsetting'][$field], -4) === '.php'
)
{
unset($mybb->input['upsetting'][$field]);
}
}


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


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

Zeile 1252Zeile 1265
				}

$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

		}

// Check if we need to create our fulltext index after changing the search mode

Zeile 1276Zeile 1289
		if(isset($mybb->input['upsetting']['delayedthreadviews']) && $mybb->settings['delayedthreadviews'] != $mybb->input['upsetting']['delayedthreadviews'])
{
$db->update_query("tasks", array('enabled' => (int)$mybb->input['upsetting']['delayedthreadviews']), "file='threadviews'");

		if(isset($mybb->input['upsetting']['delayedthreadviews']) && $mybb->settings['delayedthreadviews'] != $mybb->input['upsetting']['delayedthreadviews'])
{
$db->update_query("tasks", array('enabled' => (int)$mybb->input['upsetting']['delayedthreadviews']), "file='threadviews'");

		}


		}


		// 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'])
{

Zeile 1483Zeile 1496
				if(count($type) > 1)
{
for($i=1; $i < count($type); $i++)

				if(count($type) > 1)
{
for($i=1; $i < count($type); $i++)

					{

					{

						$optionsexp = explode("=", $type[$i]);
$opt = array_map('trim', $optionsexp);
if(in_array($opt[0], array('min', 'max', 'step')))

						$optionsexp = explode("=", $type[$i]);
$opt = array_map('trim', $optionsexp);
if(in_array($opt[0], array('min', 'max', 'step')))

Zeile 1529Zeile 1542
			else if($type[0] == "language")
{
$languages = $lang->get_languages();

			else if($type[0] == "language")
{
$languages = $lang->get_languages();

				$setting_code = $form->generate_select_box($element_name, $languages, $setting['value'], array('id' => $element_id));
}

				$setting_code = $form->generate_select_box($element_name, $languages, $setting['value'], array('id' => $element_id));
}

			else if($type[0] == "adminlanguage")
{
$languages = $lang->get_languages(1);

			else if($type[0] == "adminlanguage")
{
$languages = $lang->get_languages(1);

Zeile 1546Zeile 1559
				eval("\$setting_code = \"".$setting['optionscode']."\";");
}
else if($type[0] == "forumselect")

				eval("\$setting_code = \"".$setting['optionscode']."\";");
}
else if($type[0] == "forumselect")

			{
$selected_values = '';
if($setting['value'] != '' && $setting['value'] != -1)
{
$selected_values = explode(',', (string)$setting['value']);

foreach($selected_values as &$value)

			{
$selected_values = '';
if($setting['value'] != '' && $setting['value'] != -1)
{
$selected_values = explode(',', (string)$setting['value']);

foreach($selected_values as &$value)

					{
$value = (int)$value;
}

					{
$value = (int)$value;
}

Zeile 1560Zeile 1573
				}

$forum_checked = array('all' => '', 'custom' => '', 'none' => '');

				}

$forum_checked = array('all' => '', 'custom' => '', 'none' => '');

				if($setting['value'] == -1)
{

				if($setting['value'] == -1)
{

					$forum_checked['all'] = 'checked="checked"';
}
elseif($setting['value'] != '')

					$forum_checked['all'] = 'checked="checked"';
}
elseif($setting['value'] != '')

Zeile 1604Zeile 1617
				if($setting['value'] != '' && $setting['value'] != -1)
{
$selected_values = explode(',', (string)$setting['value']);

				if($setting['value'] != '' && $setting['value'] != -1)
{
$selected_values = explode(',', (string)$setting['value']);





					foreach($selected_values as &$value)
{
$value = (int)$value;

					foreach($selected_values as &$value)
{
$value = (int)$value;

Zeile 1620Zeile 1633
				elseif($setting['value'] != '')
{
$group_checked['custom'] = 'checked="checked"';

				elseif($setting['value'] != '')
{
$group_checked['custom'] = 'checked="checked"';

				}
else

				}
else

				{
$group_checked['none'] = 'checked="checked"';
}

				{
$group_checked['none'] = 'checked="checked"';
}

Zeile 1704Zeile 1717
					$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 1724Zeile 1738
					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 1758Zeile 1772
						$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?