Vergleich inc/functions.php - 1.6.14 - 1.6.18

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 743Zeile 743
		"location2" => 0
);


		"location2" => 0
);


	$db->update_query("sessions", $noperm_array, "sid='{$session->sid}'", 1);

	$db->update_query("sessions", $noperm_array, "sid='{$session->sid}'");


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


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

Zeile 1329Zeile 1329
/**
* Check the password given on a certain forum for validity
*

/**
* Check the password given on a certain forum for validity
*

 * @param int The forum ID
* @param boolean The Parent ID



 * @param int $fid The forum ID
* @param int $pid The Parent ID
* @param bool $return
* @return bool

 */

 */

function check_forum_password($fid, $pid=0)

function check_forum_password($fid, $pid=0, $return=false)

{
global $mybb, $header, $footer, $headerinclude, $theme, $templates, $lang, $forum_cache;

{
global $mybb, $header, $footer, $headerinclude, $theme, $templates, $lang, $forum_cache;





	$showform = true;

if(!is_array($forum_cache))

	$showform = true;

if(!is_array($forum_cache))

	{

	{

		$forum_cache = cache_forums();
if(!$forum_cache)
{

		$forum_cache = cache_forums();
if(!$forum_cache)
{

Zeile 1355Zeile 1357
		foreach($parents as $parent_id)
{
if($parent_id == $fid || $parent_id == $pid)

		foreach($parents as $parent_id)
{
if($parent_id == $fid || $parent_id == $pid)

			{

			{

				continue;

				continue;

			}

			}


if($forum_cache[$parent_id]['password'] != "")
{
check_forum_password($parent_id, $fid);


if($forum_cache[$parent_id]['password'] != "")
{
check_forum_password($parent_id, $fid);

			}
}

			}
}

	}

$password = $forum_cache[$fid]['password'];

	}

$password = $forum_cache[$fid]['password'];

Zeile 1372Zeile 1374
		if($mybb->input['pwverify'] && $pid == 0)
{
if($password == $mybb->input['pwverify'])

		if($mybb->input['pwverify'] && $pid == 0)
{
if($password == $mybb->input['pwverify'])

			{

			{

				my_setcookie("forumpass[$fid]", md5($mybb->user['uid'].$mybb->input['pwverify']), null, true);
$showform = false;

				my_setcookie("forumpass[$fid]", md5($mybb->user['uid'].$mybb->input['pwverify']), null, true);
$showform = false;

			}

			}

			else
{
eval("\$pwnote = \"".$templates->get("forumdisplay_password_wrongpass")."\";");

			else
{
eval("\$pwnote = \"".$templates->get("forumdisplay_password_wrongpass")."\";");

				$showform = true;
}

				$showform = true;
}

		}
else
{

		}
else
{

Zeile 1397Zeile 1399
	else
{
$showform = false;

	else
{
$showform = false;

 
	}

if($return)
{
return $showform;

	}

if($showform)

	}

if($showform)

Zeile 1794Zeile 1801
 */
function my_unserialize($data)
{

 */
function my_unserialize($data)
{

 
	// Do no unserialize objects
if(substr($data, 0, 1) == 'O')
{
return array();
}


	$array = unserialize($data);

if(!is_array($array))

	$array = unserialize($data);

if(!is_array($array))

	{

	{

		$array = array();
}

		$array = array();
}





	return $array;
}

	return $array;
}





/**
* Returns the serverload of the system.
*

/**
* Returns the serverload of the system.
*

Zeile 1819Zeile 1832
	if(DIRECTORY_SEPARATOR != '\\')
{
if(function_exists("sys_getloadavg"))

	if(DIRECTORY_SEPARATOR != '\\')
{
if(function_exists("sys_getloadavg"))

		{

		{

			// sys_getloadavg() will return an array with [0] being load within the last minute.
$serverload = sys_getloadavg();
$serverload[0] = round($serverload[0], 4);

			// sys_getloadavg() will return an array with [0] being load within the last minute.
$serverload = sys_getloadavg();
$serverload[0] = round($serverload[0], 4);

Zeile 2553Zeile 2566
 * @return string The clickable smilies list
*/
function build_clickable_smilies()

 * @return string The clickable smilies list
*/
function build_clickable_smilies()

{

{

	global $cache, $smiliecache, $theme, $templates, $lang, $mybb, $smiliecount;

if($mybb->settings['smilieinserter'] != 0 && $mybb->settings['smilieinsertercols'] && $mybb->settings['smilieinsertertot'])

	global $cache, $smiliecache, $theme, $templates, $lang, $mybb, $smiliecount;

if($mybb->settings['smilieinserter'] != 0 && $mybb->settings['smilieinsertercols'] && $mybb->settings['smilieinsertertot'])

Zeile 2613Zeile 2626
					$smilies .= "<td style=\"text-align: center\"><img src=\"{$image}\" border=\"0\" class=\"smilie\" alt=\"{$find}\" /></td>\n";
++$i;
++$counter;

					$smilies .= "<td style=\"text-align: center\"><img src=\"{$image}\" border=\"0\" class=\"smilie\" alt=\"{$find}\" /></td>\n";
++$i;
++$counter;





					if($counter == $mybb->settings['smilieinsertercols'])
{
$counter = 0;

					if($counter == $mybb->settings['smilieinsertercols'])
{
$counter = 0;

Zeile 2641Zeile 2654
	}

return $clickablesmilies;

	}

return $clickablesmilies;

}

/**

}

/**

 * Builds thread prefixes and returns a selected prefix (or all)
*
* @param int The prefix ID (0 to return all)

 * Builds thread prefixes and returns a selected prefix (or all)
*
* @param int The prefix ID (0 to return all)

Zeile 2733Zeile 2746
	foreach($prefix_cache as $prefix)
{
if($fid != "all" && $prefix['forums'] != "-1")

	foreach($prefix_cache as $prefix)
{
if($fid != "all" && $prefix['forums'] != "-1")

		{

		{

			// Decide whether this prefix can be used in our forum
$forums = explode(",", $prefix['forums']);

			// Decide whether this prefix can be used in our forum
$forums = explode(",", $prefix['forums']);





			if(!in_array($fid, $forums))
{
// This prefix is not in our forum list
continue;

			if(!in_array($fid, $forums))
{
// This prefix is not in our forum list
continue;

			}
}


			}
}


		if($prefix['groups'] != "-1")

		if($prefix['groups'] != "-1")

		{
$prefix_groups = explode(",", $prefix['groups']);

		{
$prefix_groups = explode(",", $prefix['groups']);


foreach($groups as $group)
{


foreach($groups as $group)
{

Zeile 2761Zeile 2774
		{
// This prefix is for anybody to use...
$prefixes[$prefix['pid']] = $prefix;

		{
// This prefix is for anybody to use...
$prefixes[$prefix['pid']] = $prefix;

		}
}


		}
}


	if(empty($prefixes))
{
return false;

	if(empty($prefixes))
{
return false;

	}

	}


$prefixselect = "";
if($multiple != 0)


$prefixselect = "";
if($multiple != 0)

	{

	{

		$prefixselect = "<select name=\"threadprefix[]\" multiple=\"multiple\" size=\"5\">\n";
}
else

		$prefixselect = "<select name=\"threadprefix[]\" multiple=\"multiple\" size=\"5\">\n";
}
else

	{

	{

		$prefixselect = "<select name=\"threadprefix\">\n";

		$prefixselect = "<select name=\"threadprefix\">\n";

	}


	}


	if($multiple == 1)
{
$any_selected = "";

	if($multiple == 1)
{
$any_selected = "";

Zeile 2786Zeile 2799
		{
$any_selected = " selected=\"selected\"";
}

		{
$any_selected = " selected=\"selected\"";
}





		$prefixselect .= "<option value=\"any\"".$any_selected.">".$lang->any_prefix."</option>\n";
}


		$prefixselect .= "<option value=\"any\"".$any_selected.">".$lang->any_prefix."</option>\n";
}


Zeile 2794Zeile 2807
	if((intval($selected_pid) == 0) && $selected_pid != 'any')
{
$default_selected = " selected=\"selected\"";

	if((intval($selected_pid) == 0) && $selected_pid != 'any')
{
$default_selected = " selected=\"selected\"";

	}

$prefixselect .= "<option value=\"0\"".$default_selected.">".$lang->no_prefix."</option>\n";


	}

$prefixselect .= "<option value=\"0\"".$default_selected.">".$lang->no_prefix."</option>\n";


	foreach($prefixes as $prefix)
{
$selected = "";

	foreach($prefixes as $prefix)
{
$selected = "";

Zeile 2805Zeile 2818
		{
$selected = " selected=\"selected\"";
}

		{
$selected = " selected=\"selected\"";
}





		$prefixselect .= "<option value=\"".$prefix['pid']."\"".$selected.">".htmlspecialchars_uni($prefix['prefix'])."</option>\n";
}


		$prefixselect .= "<option value=\"".$prefix['pid']."\"".$selected.">".htmlspecialchars_uni($prefix['prefix'])."</option>\n";
}


Zeile 2813Zeile 2826

return $prefixselect;
}


return $prefixselect;
}





/**
* Gzip encodes text to a specified level
*

/**
* Gzip encodes text to a specified level
*

Zeile 2828Zeile 2841
		$httpaccept_encoding = '';

if(isset($_SERVER['HTTP_ACCEPT_ENCODING']))

		$httpaccept_encoding = '';

if(isset($_SERVER['HTTP_ACCEPT_ENCODING']))

		{

		{

			$httpaccept_encoding = $_SERVER['HTTP_ACCEPT_ENCODING'];
}

if(my_strpos(" ".$httpaccept_encoding, "x-gzip"))
{
$encoding = "x-gzip";

			$httpaccept_encoding = $_SERVER['HTTP_ACCEPT_ENCODING'];
}

if(my_strpos(" ".$httpaccept_encoding, "x-gzip"))
{
$encoding = "x-gzip";

		}


		}


		if(my_strpos(" ".$httpaccept_encoding, "gzip"))
{
$encoding = "gzip";

		if(my_strpos(" ".$httpaccept_encoding, "gzip"))
{
$encoding = "gzip";

Zeile 2859Zeile 2872
				$gzdata .= pack("V", $crc);
$gzdata .= pack("V", $size);
$contents = $gzdata;

				$gzdata .= pack("V", $crc);
$gzdata .= pack("V", $size);
$contents = $gzdata;

			}

			}

		}
}


		}
}


Zeile 2948Zeile 2961
	else
{
$display_reputation .= "reputation_neutral";

	else
{
$display_reputation .= "reputation_neutral";

	}

$display_reputation .= "\">{$reputation}</strong>";


	}

$display_reputation .= "\">{$reputation}</strong>";


	if($uid != 0)
{
$display_reputation .= "</a>";

	if($uid != 0)
{
$display_reputation .= "</a>";

	}

	}


return $display_reputation;
}


return $display_reputation;
}

Zeile 2981Zeile 2994
		return "<span class=\"low_warning\">{$level}%</span>";
}
else

		return "<span class=\"low_warning\">{$level}%</span>";
}
else

	{

	{

		return $level."%";
}
}

		return $level."%";
}
}

Zeile 3007Zeile 3020
		if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
preg_match_all("#[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}#s", $_SERVER['HTTP_X_FORWARDED_FOR'], $addresses);

		if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
preg_match_all("#[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}#s", $_SERVER['HTTP_X_FORWARDED_FOR'], $addresses);

		}

		}

		elseif(isset($_SERVER['HTTP_X_REAL_IP']))
{
preg_match_all("#[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}#s", $_SERVER['HTTP_X_REAL_IP'], $addresses);

		elseif(isset($_SERVER['HTTP_X_REAL_IP']))
{
preg_match_all("#[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}#s", $_SERVER['HTTP_X_REAL_IP'], $addresses);

		}


		}


		if(is_array($addresses[0]))
{
foreach($addresses[0] as $key => $val)

		if(is_array($addresses[0]))
{
foreach($addresses[0] as $key => $val)

Zeile 3023Zeile 3036
					break;
}
}

					break;
}
}

		}
}

		}
}


if(!$ip)


if(!$ip)

	{

	{

		if(isset($_SERVER['HTTP_CLIENT_IP']))
{
$ip = $_SERVER['HTTP_CLIENT_IP'];

		if(isset($_SERVER['HTTP_CLIENT_IP']))
{
$ip = $_SERVER['HTTP_CLIENT_IP'];

Zeile 3041Zeile 3054
	}

return $ip;

	}

return $ip;

}


}


/**
* Fetch the friendly size (GB, MB, KB, B) for a specified file size.
*

/**
* Fetch the friendly size (GB, MB, KB, B) for a specified file size.
*

Zeile 3101Zeile 3114
	elseif($size == 0)
{
$size = "0 ".$lang->size_bytes;

	elseif($size == 0)
{
$size = "0 ".$lang->size_bytes;

	}
else
{

	}
else
{

		$size = my_number_format($size)." ".$lang->size_bytes;
}


		$size = my_number_format($size)." ".$lang->size_bytes;
}


Zeile 3146Zeile 3159
		{
$icon = str_replace("{theme}", $theme['imgdir'], $attachtypes[$ext]['icon']);
}

		{
$icon = str_replace("{theme}", $theme['imgdir'], $attachtypes[$ext]['icon']);
}

 
		$icon = htmlspecialchars_uni($icon);

		return "<img src=\"{$icon}\" border=\"0\" alt=\".{$ext}\" />";
}
else

		return "<img src=\"{$icon}\" border=\"0\" alt=\".{$ext}\" />";
}
else

Zeile 3157Zeile 3171
		else if(defined("IN_PORTAL"))
{
global $change_dir;

		else if(defined("IN_PORTAL"))
{
global $change_dir;

			$theme['imgdir'] = "{$change_dir}/images";

			$theme['imgdir'] = htmlspecialchars_uni("{$change_dir}/images");

		}

return "<img src=\"{$theme['imgdir']}/attachtypes/unknown.gif\" border=\"0\" alt=\".{$ext}\" />";

		}

return "<img src=\"{$theme['imgdir']}/attachtypes/unknown.gif\" border=\"0\" alt=\".{$ext}\" />";

Zeile 3194Zeile 3208
		else
{
$perms = $mybb->usergroup;

		else
{
$perms = $mybb->usergroup;

		}

$pwverified = 1;

		}

$pwverified = 1;


if($forum['password'] != "")
{
if($mybb->cookies['forumpass'][$forum['fid']] != md5($mybb->user['uid'].$forum['password']))
{
$pwverified = 0;


if($forum['password'] != "")
{
if($mybb->cookies['forumpass'][$forum['fid']] != md5($mybb->user['uid'].$forum['password']))
{
$pwverified = 0;

			}


			}


			$password_forums[$forum['fid']] = $forum['password'];
}
else

			$password_forums[$forum['fid']] = $forum['password'];
}
else

		{

		{

			// Check parents for passwords
$parents = explode(",", $forum['parentlist']);
foreach($parents as $parent)

			// Check parents for passwords
$parents = explode(",", $forum['parentlist']);
foreach($parents as $parent)

Zeile 3226Zeile 3240
			{
$unviewableforums .= ",";
}

			{
$unviewableforums .= ",";
}





			$unviewableforums .= "'".$forum['fid']."'";
}
}

			$unviewableforums .= "'".$forum['fid']."'";
}
}

Zeile 3288Zeile 3302
				$multipage_dropdown = null;
if(!empty($navbit['multipage']))
{

				$multipage_dropdown = null;
if(!empty($navbit['multipage']))
{

 
					if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)
{
$mybb->settings['threadsperpage'] = 20;
}


					$multipage = multipage($navbit['multipage']['num_threads'], $mybb->settings['threadsperpage'], $navbit['multipage']['current_page'], $navbit['multipage']['url'], true);
if($multipage)
{

					$multipage = multipage($navbit['multipage']['num_threads'], $mybb->settings['threadsperpage'], $navbit['multipage']['current_page'], $navbit['multipage']['url'], true);
if($multipage)
{

Zeile 6379Zeile 6398
}

/**

}

/**

 * More robust version of PHP's trim() function. It includes a list of UTF-16 blank characters

 * More robust version of PHP's trim() function. It includes a list of UTF-8 blank characters

 * from http://kb.mozillazine.org/Network.IDN.blacklist_chars
*
* @param string The string to trim from

 * from http://kb.mozillazine.org/Network.IDN.blacklist_chars
*
* @param string The string to trim from

Zeile 6389Zeile 6408
function trim_blank_chrs($string, $charlist=false)
{
$hex_chrs = array(

function trim_blank_chrs($string, $charlist=false)
{
$hex_chrs = array(

		0x20 => 1,
0x09 => 1,
0x0A => 1,
0x0D => 1,
0x0B => 1,
0xAD => 1,
0xA0 => 1,
0xAD => 1,
0xBF => 1,
0x81 => 1,
0x8D => 1,
0x90 => 1,
0x9D => 1,
0xCC => array(0xB7 => 1, 0xB8 => 1), // \x{0337} or \x{0338}
0xE1 => array(0x85 => array(0x9F => 1, 0xA0 => 1)), // \x{115F} or \x{1160}
0xE2 => array(0x80 => array(0x80 => 1, 0x81 => 1, 0x82 => 1, 0x83 => 1, 0x84 => 1, 0x85 => 1, 0x86 => 1, 0x87 => 1, 0x88 => 1, 0x89 => 1, 0x8A => 1, 0x8B => 1, // \x{2000} to \x{200B}
0xA8 => 1, 0xA9 => 1, 0xAA => 1, 0xAB => 1, 0xAC => 1, 0xAD => 1, 0xAE => 1, 0xAF => 1), // \x{2028} to \x{202F}
0x81 => array(0x9F => 1)), // \x{205F}

		0x09 => 1, // \x{0009}
0x0A => 1, // \x{000A}
0x0B => 1, // \x{000B}
0x0D => 1, // \x{000D}
0x20 => 1, // \x{0020}
0xC2 => array(0x81 => 1, 0x8D => 1, 0x90 => 1, 0x9D => 1, 0xA0 => 1, 0xAD => 1), // \x{0081}, \x{008D}, \x{0090}, \x{009D}, \x{00A0}, \x{00AD}
0xCC => array(0xB7 => 1, 0xB8 => 1), // \x{0337}, \x{0338}
0xE1 => array(0x85 => array(0x9F => 1, 0xA0 => 1), 0x9A => array(0x80 => 1), 0xA0 => array(0x8E => 1)), // \x{115F}, \x{1160}, \x{1680}, \x{180E}
0xE2 => array(0x80 => array(0x80 => 1, 0x81 => 1, 0x82 => 1, 0x83 => 1, 0x84 => 1, 0x85 => 1, 0x86 => 1, 0x87 => 1, 0x88 => 1, 0x89 => 1, 0x8A => 1, 0x8B => 1, 0x8C => 1, 0x8D => 1, 0x8E => 1, 0x8F => 1, // \x{2000} - \x{200F}
0xA8 => 1, 0xA9 => 1, 0xAA => 1, 0xAB => 1, 0xAC => 1, 0xAD => 1, 0xAE => 1, 0xAF => 1), // \x{2028} - \x{202F}
0x81 => array(0x9F => 1)), // \x{205F}








		0xE3 => array(0x80 => array(0x80 => 1), // \x{3000}

		0xE3 => array(0x80 => array(0x80 => 1), // \x{3000}

					  0x85 => array(0xA4 => 1)), // \x{3164}

			0x85 => array(0xA4 => 1)), // \x{3164}

		0xEF => array(0xBB => array(0xBF => 1), // \x{FEFF}

		0xEF => array(0xBB => array(0xBF => 1), // \x{FEFF}

					  0xBE => array(0xA0 => 1), // \x{FFA0}
0xBF => array(0xB9 => 1, 0xBA => 1, 0xBB => 1)), // \x{FFF9} to \x{FFFB}

			0xBE => array(0xA0 => 1), // \x{FFA0}
0xBF => array(0xB9 => 1, 0xBA => 1, 0xBB => 1)), // \x{FFF9} - \x{FFFB}

	);

$hex_chrs_rev = array(

	);

$hex_chrs_rev = array(

		0x20 => 1,
0x09 => 1,
0x0A => 1,
0x0D => 1,
0x0B => 1,
0xA0 => array(0xC2 => 1),
0xAD => array(0xC2 => 1),
0xBF => array(0xC2 => 1),
0x81 => array(0xC2 => 1),
0x8D => array(0xC2 => 1),
0x90 => array(0xC2 => 1),
0x9D => array(0xC2 => 1),

		0x09 => 1, // \x{0009}
0x0A => 1, // \x{000A}
0x0B => 1, // \x{000B}
0x0D => 1, // \x{000D}
0x20 => 1, // \x{0020}
0x81 => array(0xC2 => 1, 0x80 => array(0xE2 => 1)), // \x{0081}, \x{2001}
0x8D => array(0xC2 => 1, 0x80 => array(0xE2 => 1)), // \x{008D}, \x{200D}
0x90 => array(0xC2 => 1), // \x{0090}
0x9D => array(0xC2 => 1), // \x{009D}
0xA0 => array(0xC2 => 1, 0x85 => array(0xE1 => 1), 0x81 => array(0xE2 => 1), 0xBE => array(0xEF => 1)), // \x{00A0}, \x{1160}, \x{2060}, \x{FFA0}
0xAD => array(0xC2 => 1, 0x80 => array(0xE2 => 1)), // \x{00AD}, \x{202D}


		0xB8 => array(0xCC => 1), // \x{0338}
0xB7 => array(0xCC => 1), // \x{0337}

		0xB8 => array(0xCC => 1), // \x{0338}
0xB7 => array(0xCC => 1), // \x{0337}

		0xA0 => array(0x85 => array(0xE1 => 1)), // \x{1160}
0x9F => array(0x85 => array(0xE1 => 1), // \x{115F}
0x81 => array(0xE2 => 1)), // \x{205F}
0x80 => array(0x80 => array(0xE3 => 1, 0xE2 => 1)), // \x{3000}, \x{2000}
0x81 => array(0x80 => array(0xE2 => 1)), // \x{2001}

		0x9F => array(0x85 => array(0xE1 => 1), 0x81 => array(0xE2 => 1)), // \x{115F}, \x{205F}
0x80 => array(0x9A => array(0xE1 => 1), 0x80 => array(0xE2 => 1, 0xE3 => 1)), // \x{1680}, \x{2000}, \x{3000}
0x8E => array(0xA0 => array(0xE1 => 1), 0x80 => array(0xE2 => 1)), // \x{180E}, \x{200E}



		0x82 => array(0x80 => array(0xE2 => 1)), // \x{2002}
0x83 => array(0x80 => array(0xE2 => 1)), // \x{2003}
0x84 => array(0x80 => array(0xE2 => 1)), // \x{2004}

		0x82 => array(0x80 => array(0xE2 => 1)), // \x{2002}
0x83 => array(0x80 => array(0xE2 => 1)), // \x{2003}
0x84 => array(0x80 => array(0xE2 => 1)), // \x{2004}

Zeile 6444Zeile 6453
		0x89 => array(0x80 => array(0xE2 => 1)), // \x{2009}
0x8A => array(0x80 => array(0xE2 => 1)), // \x{200A}
0x8B => array(0x80 => array(0xE2 => 1)), // \x{200B}

		0x89 => array(0x80 => array(0xE2 => 1)), // \x{2009}
0x8A => array(0x80 => array(0xE2 => 1)), // \x{200A}
0x8B => array(0x80 => array(0xE2 => 1)), // \x{200B}

 
		0x8C => array(0x80 => array(0xE2 => 1)), // \x{200C}
0x8F => array(0x80 => array(0xE2 => 1)), // \x{200F}

		0xA8 => array(0x80 => array(0xE2 => 1)), // \x{2028}
0xA9 => array(0x80 => array(0xE2 => 1)), // \x{2029}
0xAA => array(0x80 => array(0xE2 => 1)), // \x{202A}
0xAB => array(0x80 => array(0xE2 => 1)), // \x{202B}
0xAC => array(0x80 => array(0xE2 => 1)), // \x{202C}

		0xA8 => array(0x80 => array(0xE2 => 1)), // \x{2028}
0xA9 => array(0x80 => array(0xE2 => 1)), // \x{2029}
0xAA => array(0x80 => array(0xE2 => 1)), // \x{202A}
0xAB => array(0x80 => array(0xE2 => 1)), // \x{202B}
0xAC => array(0x80 => array(0xE2 => 1)), // \x{202C}

		0xAD => array(0x80 => array(0xE2 => 1)), // \x{202D}

 
		0xAE => array(0x80 => array(0xE2 => 1)), // \x{202E}
0xAF => array(0x80 => array(0xE2 => 1)), // \x{202F}
0xA4 => array(0x85 => array(0xE3 => 1)), // \x{3164}
0xBF => array(0xBB => array(0xEF => 1)), // \x{FEFF}

		0xAE => array(0x80 => array(0xE2 => 1)), // \x{202E}
0xAF => array(0x80 => array(0xE2 => 1)), // \x{202F}
0xA4 => array(0x85 => array(0xE3 => 1)), // \x{3164}
0xBF => array(0xBB => array(0xEF => 1)), // \x{FEFF}

		0xA0 => array(0xBE => array(0xEF => 1)), // \x{FFA0}

 
		0xB9 => array(0xBF => array(0xEF => 1)), // \x{FFF9}
0xBA => array(0xBF => array(0xEF => 1)), // \x{FFFA}
0xBB => array(0xBF => array(0xEF => 1)), // \x{FFFB}

		0xB9 => array(0xBF => array(0xEF => 1)), // \x{FFF9}
0xBA => array(0xBF => array(0xEF => 1)), // \x{FFFA}
0xBB => array(0xBF => array(0xEF => 1)), // \x{FFFB}

Zeile 6463Zeile 6472
	// Start from the beginning and work our way in
do
{

	// Start from the beginning and work our way in
do
{

		// Check to see if we have matched a first character in our utf-16 array

		// Check to see if we have matched a first character in our utf-8 array

		$offset = match_sequence($string, $hex_chrs);
if(!$offset)
{

		$offset = match_sequence($string, $hex_chrs);
if(!$offset)
{

Zeile 6478Zeile 6487
	$string = strrev($string);
do
{

	$string = strrev($string);
do
{

		// Check to see if we have matched a first character in our utf-16 array

		// Check to see if we have matched a first character in our utf-8 array

		$offset = match_sequence($string, $hex_chrs_rev);
if(!$offset)
{

		$offset = match_sequence($string, $hex_chrs_rev);
if(!$offset)
{