Vergleich admin/modules/config/settings.php - 1.8.30 - 1.8.37

  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 1283Zeile 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 1403Zeile 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 1428Zeile 1430
		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;

		}


		}


		// 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}");
}





	// Build individual forms as per settings group
foreach($cache_groups as $groupinfo)
{

	// Build individual forms as per settings group
foreach($cache_groups as $groupinfo)
{

Zeile 1445Zeile 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']]))
{
$form_container->output_cell($lang->error_no_settings_found);
$form_container->construct_row();


if(empty($cache_settings[$groupinfo['gid']]))
{
$form_container->output_cell($lang->error_no_settings_found);
$form_container->construct_row();





			$form_container->end();
echo '<br />';


			$form_container->end();
echo '<br />';


Zeile 1462Zeile 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 1491Zeile 1497
					}
}
$setting_code = $form->generate_numeric_field($element_name, $setting['value'], $field_options);

					}
}
$setting_code = $form->generate_numeric_field($element_name, $setting['value'], $field_options);

			}

			}

			else if($type[0] == "textarea")
{
$setting_code = $form->generate_text_area($element_name, $setting['value'], array('id' => $element_id));

			else if($type[0] == "textarea")
{
$setting_code = $form->generate_text_area($element_name, $setting['value'], array('id' => $element_id));

Zeile 1578Zeile 1584
							<tr>
<td valign=\"top\"><small>{$lang->forums_colon}</small></td>
<td>".$form->generate_forum_select('select['.$setting['name'].'][]', $selected_values, array('id' => $element_id, 'multiple' => true, 'size' => 5))."</td>

							<tr>
<td valign=\"top\"><small>{$lang->forums_colon}</small></td>
<td>".$form->generate_forum_select('select['.$setting['name'].'][]', $selected_values, array('id' => $element_id, 'multiple' => true, 'size' => 5))."</td>

							</tr>

							</tr>

						</table>
</dd>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"{$element_name}\" value=\"none\" {$forum_checked['none']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->none}</strong></label></dt>

						</table>
</dd>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"{$element_name}\" value=\"none\" {$forum_checked['none']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->none}</strong></label></dt>

Zeile 1586Zeile 1592
				<script type=\"text/javascript\">
checkAction('{$element_id}');
</script>";

				<script type=\"text/javascript\">
checkAction('{$element_id}');
</script>";

			}

			}

			else if($type[0] == "forumselectsingle")
{
$selected_value = (int)$setting['value']; // No need to check if empty, int will give 0

			else if($type[0] == "forumselectsingle")
{
$selected_value = (int)$setting['value']; // No need to check if empty, int will give 0

Zeile 1604Zeile 1610
						$value = (int)$value;
}
unset($value);

						$value = (int)$value;
}
unset($value);

				}

				}


$group_checked = array('all' => '', 'custom' => '', 'none' => '');
if($setting['value'] == -1)


$group_checked = array('all' => '', 'custom' => '', 'none' => '');
if($setting['value'] == -1)

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

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

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

print_selection_javascript();

$setting_code = "

				}
else
{
$group_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\" {$group_checked['all']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->all_groups}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"{$element_name}\" value=\"custom\" {$group_checked['custom']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->select_groups}</strong></label></dt>

				<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%\">
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"{$element_name}\" value=\"all\" {$group_checked['all']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->all_groups}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"{$element_name}\" value=\"custom\" {$group_checked['custom']} class=\"{$element_id}_forums_groups_check\" onclick=\"checkAction('{$element_id}');\" style=\"vertical-align: middle;\" /> <strong>{$lang->select_groups}</strong></label></dt>

Zeile 1639Zeile 1645
				<script type=\"text/javascript\">
checkAction('{$element_id}');
</script>";

				<script type=\"text/javascript\">
checkAction('{$element_id}');
</script>";

			}

			}

			else if($type[0] == "groupselectsingle")
{
$selected_value = (int)$setting['value']; // No need to check if empty, int will give 0

			else if($type[0] == "groupselectsingle")
{
$selected_value = (int)$setting['value']; // No need to check if empty, int will give 0

Zeile 1649Zeile 1655
			{
$selected_values = '';
if($setting['value'] != '' && $setting['value'] != -1)

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

				{

				{

					$selected_values = explode(',', (string)$setting['value']);
foreach($selected_values as &$value)
{

					$selected_values = explode(',', (string)$setting['value']);
foreach($selected_values as &$value)
{

Zeile 1665Zeile 1671
				elseif($setting['value'] != '')
{
$prefix_checked['custom'] = 'checked="checked"';

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

				}

				}

				else
{
$prefix_checked['none'] = 'checked="checked"';

				else
{
$prefix_checked['none'] = 'checked="checked"';

Zeile 1698Zeile 1704
					$multivalue = explode(',', $setting['value']);
}


					$multivalue = explode(',', $setting['value']);
}


 
				$option_list = array();

				for($i = 0; $i < $typecount; $i++)
{
$optionsexp = explode("=", $type[$i]);

				for($i = 0; $i < $typecount; $i++)
{
$optionsexp = explode("=", $type[$i]);

Zeile 1709Zeile 1716
					if(isset($lang->$title_lang))
{
$optionsexp[1] = $lang->$title_lang;

					if(isset($lang->$title_lang))
{
$optionsexp[1] = $lang->$title_lang;

					}

					}


if($type[0] == "select")
{


if($type[0] == "select")
{

Zeile 1720Zeile 1727
						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));

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

						}

						}

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

Zeile 1731Zeile 1738
						if(in_array($optionsexp[0], $multivalue))
{
$option_list[$i] = $form->generate_check_box("{$element_name}[]", $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, "checked" => 1, 'class' => $element_id));

						if(in_array($optionsexp[0], $multivalue))
{
$option_list[$i] = $form->generate_check_box("{$element_name}[]", $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, "checked" => 1, 'class' => $element_id));

						}

						}

						else
{
$option_list[$i] = $form->generate_check_box("{$element_name}[]", $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id));
}

						else
{
$option_list[$i] = $form->generate_check_box("{$element_name}[]", $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id));
}

					}

					}

				}

if($type[0] == "select")
{
$setting_code = $form->generate_select_box($element_name, $option_list, $setting['value'], array('id' => $element_id));

				}

if($type[0] == "select")
{
$setting_code = $form->generate_select_box($element_name, $option_list, $setting['value'], array('id' => $element_id));

				}

				}

				else
{
$setting_code = implode("<br />", $option_list);

				else
{
$setting_code = implode("<br />", $option_list);

Zeile 1752Zeile 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?