Vergleich admin/modules/config/settings.php - 1.8.17 - 1.8.18

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 927Zeile 927
			}

$lang->success_settings_updated .= $lang->sprintf($lang->success_settings_updated_hiddencaptchaimage, htmlspecialchars_uni($mybb->input['upsetting']['hiddencaptchaimagefield']), htmlspecialchars_uni($wrong_value));

			}

$lang->success_settings_updated .= $lang->sprintf($lang->success_settings_updated_hiddencaptchaimage, htmlspecialchars_uni($mybb->input['upsetting']['hiddencaptchaimagefield']), htmlspecialchars_uni($wrong_value));

 
		}

// Validate avatar dimension inputs
$gid = (int)$mybb->input['gid'];
$dimfields = array(
8 => array('postmaxavatarsize'),
10 => array('useravatardims', 'maxavatardims'),
13 => array('memberlistmaxavatarsize')
);
if(in_array($gid, array_keys($dimfields)))
{
foreach($dimfields[$gid] as $field)
{
if(isset($mybb->input['upsetting'][$field]))
{
if(preg_match("/\b\d+[|x]{1}\d+\b/i", $mybb->input['upsetting'][$field]) || ($field == 'maxavatardims' && trim($mybb->input['upsetting'][$field]) == ""))
{
// If pipe (|) is used normalize to 'x'
$mybb->input['upsetting'][$field] = str_replace('|', 'x', my_strtolower($mybb->input['upsetting'][$field]));
}
else
{
flash_message($lang->sprintf($lang->error_format_dimension, $lang->{'error_field_'.$field}), 'error');
admin_redirect("index.php?module=config-settings&action=change&gid=".$gid);
}
}
}

		}

// Have we opted for a reCAPTCHA and not set a public/private key?

		}

// Have we opted for a reCAPTCHA and not set a public/private key?

Zeile 947Zeile 974
			$options = array();

if(substr($multisetting['optionscode'], 0, 8) == 'checkbox')

			$options = array();

if(substr($multisetting['optionscode'], 0, 8) == 'checkbox')

			{

			{

				$checkbox_settings[] = $multisetting['name'];

// All checkboxes deselected = no $mybb->input['upsetting'] for them, we need to initialize it manually then, but only on pages where the setting is shown
if(empty($mybb->input['upsetting'][$multisetting['name']]) && isset($mybb->input["isvisible_{$multisetting['name']}"]))

				$checkbox_settings[] = $multisetting['name'];

// All checkboxes deselected = no $mybb->input['upsetting'] for them, we need to initialize it manually then, but only on pages where the setting is shown
if(empty($mybb->input['upsetting'][$multisetting['name']]) && isset($mybb->input["isvisible_{$multisetting['name']}"]))

				{

				{

					$mybb->input['upsetting'][$multisetting['name']] = array();
}
}

					$mybb->input['upsetting'][$multisetting['name']] = array();
}
}

Zeile 966Zeile 993
						$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')))

						{

						{

							if($opt[0] != 'step' || $opt[1] != 'any')
{
$opt[1] = (float)$opt[1];
}
$options[$opt[0]] = $opt[1];
}

							if($opt[0] != 'step' || $opt[1] != 'any')
{
$opt[1] = (float)$opt[1];
}
$options[$opt[0]] = $opt[1];
}

					}

$value = (float)$mybb->input['upsetting'][$multisetting['name']];


					}

$value = (float)$mybb->input['upsetting'][$multisetting['name']];


					if(isset($options['min']))
{
$value = max($value, $options['min']);

					if(isset($options['min']))
{
$value = max($value, $options['min']);

					}


					}


					if(isset($options['max']))
{
$value = min($value, $options['max']);

					if(isset($options['max']))
{
$value = min($value, $options['max']);

Zeile 1004Zeile 1031
			{
$mybb->input['upsetting']['username_method'] = 0;
$lang->success_settings_updated .= $lang->success_settings_updated_username_method;

			{
$mybb->input['upsetting']['username_method'] = 0;
$lang->success_settings_updated .= $lang->success_settings_updated_username_method;

			}

			}

			else
{
$mybb->input['upsetting']['allowmultipleemails'] = 0;

			else
{
$mybb->input['upsetting']['allowmultipleemails'] = 0;

Zeile 1019Zeile 1046
				if($forum_group_select && in_array($name, $forum_group_select))
{
if($value == 'all')

				if($forum_group_select && in_array($name, $forum_group_select))
{
if($value == 'all')

					{

					{

						$value = -1;
}
elseif($value == 'custom')

						$value = -1;
}
elseif($value == 'custom')

					{

					{

						if(isset($mybb->input['select'][$name]) && is_array($mybb->input['select'][$name]))
{
foreach($mybb->input['select'][$name] as &$val)

						if(isset($mybb->input['select'][$name]) && is_array($mybb->input['select'][$name]))
{
foreach($mybb->input['select'][$name] as &$val)

Zeile 1033Zeile 1060
							unset($val);

$value = implode(',', $mybb->input['select'][$name]);

							unset($val);

$value = implode(',', $mybb->input['select'][$name]);

						}

						}

						else
{
$value = '';

						else
{
$value = '';

Zeile 1042Zeile 1069
					else
{
$value = '';

					else
{
$value = '';

					}

					}

				}
elseif($checkbox_settings && in_array($name, $checkbox_settings))
{

				}
elseif($checkbox_settings && in_array($name, $checkbox_settings))
{

Zeile 1158Zeile 1185
			$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}");
}


$form = new Form("index.php?module=config-settings&action=change", "post", "change");

echo $form->generate_hidden_field("gid", $group['gid']);

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

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

Zeile 1181Zeile 1204
		while($setting = $db->fetch_array($query))
{
$cache_settings[$setting['gid']][$setting['sid']] = $setting;

		while($setting = $db->fetch_array($query))
{
$cache_settings[$setting['gid']][$setting['sid']] = $setting;

		}

		}


if(!$db->num_rows($query))
{


if(!$db->num_rows($query))
{

Zeile 1193Zeile 1216
		if(isset($lang->$group_lang_var))
{
$groupinfo['title'] = $lang->$group_lang_var;

		if(isset($lang->$group_lang_var))
{
$groupinfo['title'] = $lang->$group_lang_var;

		}

// Page header

		}

// Page header

		$page->add_breadcrumb_item($groupinfo['title']);
$page->output_header($lang->board_settings." - {$groupinfo['title']}");

		$page->add_breadcrumb_item($groupinfo['title']);
$page->output_header($lang->board_settings." - {$groupinfo['title']}");


$form = new Form("index.php?module=config-settings&action=change", "post", "change");

echo $form->generate_hidden_field("gid", $groupinfo['gid']);

 
	}
else
{

	}
else
{

Zeile 1224Zeile 1243
		{
$cache_settings[$setting['gid']][$setting['sid']] = $setting;
}

		{
$cache_settings[$setting['gid']][$setting['sid']] = $setting;
}





		// Page header
$page->add_breadcrumb_item($lang->show_all_settings);
$page->output_header($lang->board_settings." - {$lang->show_all_settings}");

		// Page header
$page->add_breadcrumb_item($lang->show_all_settings);
$page->output_header($lang->board_settings." - {$lang->show_all_settings}");


$form = new Form("index.php?module=config-settings&action=change", "post", "change");

 
	}


	}


	// Build rest of page
$buttons[] = $form->generate_submit_button($lang->save_settings);

	// Build individual forms as per settings group


	foreach($cache_groups as $groupinfo)
{

	foreach($cache_groups as $groupinfo)
{

 
		$form = new Form("index.php?module=config-settings&action=change", "post", "change");
echo $form->generate_hidden_field("gid", $groupinfo['gid']);
$buttons = array($form->generate_submit_button($lang->save_settings));

		$group_lang_var = "setting_group_{$groupinfo['name']}";
if(isset($lang->$group_lang_var))
{

		$group_lang_var = "setting_group_{$groupinfo['name']}";
if(isset($lang->$group_lang_var))
{

Zeile 1522Zeile 1541
		$form_container->end();

$form->output_submit_wrapper($buttons);

		$form_container->end();

$form->output_submit_wrapper($buttons);

 
		$form->end();

		echo '<br />';
}

		echo '<br />';
}

	$form->end();

 

print_setting_peekers();



print_setting_peekers();