Vergleich inc/functions.php - 1.8.9 - 1.8.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 343Zeile 343
	{
if(isset($mybb->user['uid']) && $mybb->user['uid'] != 0 && array_key_exists("timezone", $mybb->user))
{

	{
if(isset($mybb->user['uid']) && $mybb->user['uid'] != 0 && array_key_exists("timezone", $mybb->user))
{

			$offset = $mybb->user['timezone'];

			$offset = (float)$mybb->user['timezone'];

			$dstcorrection = $mybb->user['dst'];
}
elseif(defined("IN_ADMINCP"))
{

			$dstcorrection = $mybb->user['dst'];
}
elseif(defined("IN_ADMINCP"))
{

			$offset =  $mybbadmin['timezone'];

			$offset = (float)$mybbadmin['timezone'];

			$dstcorrection = $mybbadmin['dst'];
}
else
{

			$dstcorrection = $mybbadmin['dst'];
}
else
{

			$offset = $mybb->settings['timezoneoffset'];

			$offset = (float)$mybb->settings['timezoneoffset'];

			$dstcorrection = $mybb->settings['dstcorrection'];
}


			$dstcorrection = $mybb->settings['dstcorrection'];
}


Zeile 7640Zeile 7640
	global $mybb, $checksums, $bad_verify_files;

// We don't need to check these types of files

	global $mybb, $checksums, $bad_verify_files;

// We don't need to check these types of files

	$ignore = array(".", "..", ".svn", "config.php", "settings.php", "Thumb.db", "config.default.php", "lock", "htaccess.txt", "logo.gif", "logo.png");

	$ignore = array(".", "..", ".svn", "config.php", "settings.php", "Thumb.db", "config.default.php", "lock", "htaccess.txt", "htaccess-nginx.txt", "logo.gif", "logo.png");

	$ignore_ext = array("attach");

if(substr($path, -1, 1) == "/")

	$ignore_ext = array("attach");

if(substr($path, -1, 1) == "/")

Zeile 8488Zeile 8488
	}

return false;

	}

return false;

 
}

/**
* Strip html tags from string, also removes <script> and <style> contents.
*
* @param string $string String to stripe
* @param string $allowable_tags Allowed html tags
*
* @return string Striped string
*/
function my_strip_tags($string, $allowable_tags = '')
{
$pattern = array(
'@(&lt;)style[^(&gt;)]*?(&gt;).*?(&lt;)/style(&gt;)@siu',
'@(&lt;)script[^(&gt;)]*?.*?(&lt;)/script(&gt;)@siu',
'@<style[^>]*?>.*?</style>@siu',
'@<script[^>]*?.*?</script>@siu',
);
$string = preg_replace($pattern, '', $string);
return strip_tags($string, $allowable_tags);

}

}