Vergleich admin/inc/functions.php - 1.8.21 - 1.8.27

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 205Zeile 205

reset($pforumcache);
reset($pforumcache[$fid]);


reset($pforumcache);
reset($pforumcache[$fid]);

 

$navigation = '';


foreach($pforumcache[$fid] as $key => $forum)
{
if($fid == $forum['fid'])
{


foreach($pforumcache[$fid] as $key => $forum)
{
if($fid == $forum['fid'])
{

			if($pforumcache[$forum['pid']])

			if(!empty($pforumcache[$forum['pid']]))

			{
$navigation = make_parent_list($forum['pid'], $navsep).$navigation;
}

			{
$navigation = make_parent_list($forum['pid'], $navsep).$navigation;
}

Zeile 439Zeile 441
		return my_unserialize($db->fetch_field($query, "permissions"));
}
else

		return my_unserialize($db->fetch_field($query, "permissions"));
}
else

	{

	{

		// A user and/or group

$options = array(

		// A user and/or group

$options = array(

Zeile 459Zeile 461
		while($perm = $db->fetch_array($query))
{
$perm['permissions'] = my_unserialize($perm['permissions']);

		while($perm = $db->fetch_array($query))
{
$perm['permissions'] = my_unserialize($perm['permissions']);





			// Sorting out which permission is which
if($perm['uid'] > 0)
{

			// Sorting out which permission is which
if($perm['uid'] > 0)
{

Zeile 478Zeile 480

// Figure out group permissions...ugh.
foreach($perms_group as $gperms)


// Figure out group permissions...ugh.
foreach($perms_group as $gperms)

		{

		{

			if(!isset($final_group_perms))
{
// Use this group as the base for admin group permissions

			if(!isset($final_group_perms))
{
// Use this group as the base for admin group permissions

Zeile 502Zeile 504
		{
return $final_group_perms;
}

		{
return $final_group_perms;
}

		else

		elseif(isset($perms_def))

		{
return $perms_def;
}

		{
return $perms_def;
}

 

return array();

	}
}


	}
}


Zeile 516Zeile 520
 * @return string The iconv/mb encoding
*/
function fetch_iconv_encoding($mysql_encoding)

 * @return string The iconv/mb encoding
*/
function fetch_iconv_encoding($mysql_encoding)

{

{

    $mysql_encoding = explode("_", $mysql_encoding);
switch($mysql_encoding[0])
{

    $mysql_encoding = explode("_", $mysql_encoding);
switch($mysql_encoding[0])
{

Zeile 605Zeile 609
	{
$query = $db->simple_select("adminoptions", "loginattempts, loginlockoutexpiry", "uid='".(int)$uid."'", 1);
$attempts = $db->fetch_array($query);

	{
$query = $db->simple_select("adminoptions", "loginattempts, loginlockoutexpiry", "uid='".(int)$uid."'", 1);
$attempts = $db->fetch_array($query);

	}








if(!$attempts)
{
return false;
}
}


	if($attempts['loginattempts'] <= 0)
{
return false;
}

if($mybb->settings['maxloginattempts'] > 0 && $attempts['loginattempts'] >= $mybb->settings['maxloginattempts'])

	if($attempts['loginattempts'] <= 0)
{
return false;
}

if($mybb->settings['maxloginattempts'] > 0 && $attempts['loginattempts'] >= $mybb->settings['maxloginattempts'])

	{

	{

		// Has the expiry dateline been set yet?
if($attempts['loginlockoutexpiry'] == 0 && $return_num == false)
{

		// Has the expiry dateline been set yet?
if($attempts['loginlockoutexpiry'] == 0 && $return_num == false)
{

Zeile 630Zeile 639
		{
return true;
}

		{
return true;
}

	}

	}


return false;
}


return false;
}

Zeile 662Zeile 671

// System calls via backtick
if(preg_match('#\$\s*\{#', $template))


// System calls via backtick
if(preg_match('#\$\s*\{#', $template))

	{
return true;

	{
return true;

	}

// Any other malicious acts?

	}

// Any other malicious acts?

Zeile 671Zeile 680
	if(preg_match("~\\{\\$.+?\\}~s", preg_replace('~\\{\\$+[a-zA-Z_][a-zA-Z_0-9]*((?:-\\>|\\:\\:)\\$*[a-zA-Z_][a-zA-Z_0-9]*|\\[\s*\\$*([\'"]?)[a-zA-Z_ 0-9 ]+\\2\\]\s*)*\\}~', '', $template)))
{
return true;

	if(preg_match("~\\{\\$.+?\\}~s", preg_replace('~\\{\\$+[a-zA-Z_][a-zA-Z_0-9]*((?:-\\>|\\:\\:)\\$*[a-zA-Z_][a-zA-Z_0-9]*|\\[\s*\\$*([\'"]?)[a-zA-Z_ 0-9 ]+\\2\\]\s*)*\\}~', '', $template)))
{
return true;

	}

	}


return false;
}


return false;
}

Zeile 724Zeile 733
		{
while($post = $db->fetch_array($query))
{

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

				if($post['usepostcounts'] != 0 && $post['visible'] != 0)

				if($post['usepostcounts'] != 0 && $post['visible'] == 1)

				{
++$post_count;
}

				{
++$post_count;
}

Zeile 827Zeile 836

return $values;
}


return $values;
}

 
}

/**
* Output the auto redirect block.
*
* @param \Form $form An existing form instance to wrap the redirect within.
* @param string $prompt The prompt to show.
*/
function output_auto_redirect($form, $prompt)
{
global $lang;

echo <<<HTML
<div class="confirm_action">
<p>{$prompt}</p>
<br />
<script type="text/javascript">
$(function() {
var button = $("#proceed_button");
if (button.length > 0) {
// create a temporary div element to render the text within, un-escaping HTML entities
var textElement = $('<div/>').html('{$lang->automatically_redirecting}');

button.val(textElement.text());
button.attr("disabled", true);
button.css("color", "#aaa");
button.css("borderColor", "#aaa");

var parent_form = button.closest('form');

if (parent_form.length > 0) {
parent_form.submit();
}
}
});
</script>
<p class="buttons">
{$form->generate_submit_button($lang->proceed, array('class' => 'button_yes', 'id' => 'proceed_button'))}
</p>
</div>
HTML;

}

}