Vergleich inc/functions.php - 1.8.27 - 1.8.32

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 581Zeile 581
			{
require_once MYBB_ROOT . "inc/mailhandlers/php.php";
$my_mailhandler_builtin = new PhpMail();

			{
require_once MYBB_ROOT . "inc/mailhandlers/php.php";
$my_mailhandler_builtin = new PhpMail();

				if(!empty($mybb->settings['mail_parameters']))

				if(!empty($mybb->config['mail_parameters']))

				{

				{

					$my_mailhandler_builtin->additional_parameters = $mybb->settings['mail_parameters'];

					$my_mailhandler_builtin->additional_parameters = $mybb->config['mail_parameters'];

				}
}
}

				}
}
}

Zeile 1694Zeile 1694
	{
if(!empty($groupscache[$gid]))
{

	{
if(!empty($groupscache[$gid]))
{

 
			$level_permissions = array();


			// If our permissions arn't inherited we need to figure them out
if(empty($fpermcache[$fid][$gid]))
{

			// If our permissions arn't inherited we need to figure them out
if(empty($fpermcache[$fid][$gid]))
{

Zeile 1770Zeile 1772
 * @return bool
*/
function forum_password_validated($forum, $ignore_empty=false, $check_parents=false)

 * @return bool
*/
function forum_password_validated($forum, $ignore_empty=false, $check_parents=false)

{

{

	global $mybb, $forum_cache;

if($check_parents && isset($forum['parentlist']))

	global $mybb, $forum_cache;

if($check_parents && isset($forum['parentlist']))

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

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

			}
}

			}
}

	}

if($forum_cache[$fid]['password'] !== '')

	}

if($forum_cache[$fid]['password'] !== '')

Zeile 1857Zeile 1859
			if(my_hash_equals($forum_cache[$fid]['password'], $mybb->get_input('pwverify')))
{
my_setcookie("forumpass[$fid]", md5($mybb->user['uid'].$mybb->get_input('pwverify')), null, true);

			if(my_hash_equals($forum_cache[$fid]['password'], $mybb->get_input('pwverify')))
{
my_setcookie("forumpass[$fid]", md5($mybb->user['uid'].$mybb->get_input('pwverify')), null, true);

				$showform = false;

				$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 1876Zeile 1878
				$showform = false;
}
}

				$showform = false;
}
}

	}

	}

	else
{
$showform = false;

	else
{
$showform = false;

Zeile 1885Zeile 1887
	if($return)
{
return $showform;

	if($return)
{
return $showform;

	}

	}


if($showform)
{
if($pid)


if($showform)
{
if($pid)

		{

		{

			header("Location: ".$mybb->settings['bburl']."/".get_forum_link($fid));
}
else

			header("Location: ".$mybb->settings['bburl']."/".get_forum_link($fid));
}
else

Zeile 1900Zeile 1902
			output_page($pwform);
}
exit;

			output_page($pwform);
}
exit;

	}

	}

}

/**

}

/**

Zeile 1915Zeile 1917
{
global $mybb, $cache, $db;
static $modpermscache;

{
global $mybb, $cache, $db;
static $modpermscache;





	if($uid < 1)
{
$uid = $mybb->user['uid'];

	if($uid < 1)
{
$uid = $mybb->user['uid'];

Zeile 1924Zeile 1926
	if($uid == 0)
{
return false;

	if($uid == 0)
{
return false;

	}

	}


if(isset($modpermscache[$fid][$uid]))
{


if(isset($modpermscache[$fid][$uid]))
{

Zeile 1973Zeile 1975
					continue;
}


					continue;
}


 
				if(!isset($perms[$action]))
{
$perms[$action] = $value;
}

				// Figure out the user permissions

				// Figure out the user permissions

				if($value == 0)

				else if($value == 0)

				{
// The user doesn't have permission to set this action
$perms[$action] = 0;

				{
// The user doesn't have permission to set this action
$perms[$action] = 0;

				}
else
{

				}
else
{

					$perms[$action] = max($perm[$action], $perms[$action]);
}
}

					$perms[$action] = max($perm[$action], $perms[$action]);
}
}

Zeile 1998Zeile 2004
			foreach($perm as $action => $value)
{
if(strpos($action, "can") === false)

			foreach($perm as $action => $value)
{
if(strpos($action, "can") === false)

				{

				{

					continue;

					continue;

				}

				}





				$perms[$action] = max($perm[$action], $perms[$action]);








				if(!isset($perms[$action]))
{
$perms[$action] = $value;
}
else
{
$perms[$action] = max($perm[$action], $perms[$action]);
}

			}
}
}

			}
}
}

Zeile 2369Zeile 2382
	$newcookie[$id] = $value;
$newcookie = my_serialize($newcookie);
my_setcookie("mybb[$name]", addslashes($newcookie), $expires);

	$newcookie[$id] = $value;
$newcookie = my_serialize($newcookie);
my_setcookie("mybb[$name]", addslashes($newcookie), $expires);

 

if(isset($mybb->cookies['mybb']) && !is_array($mybb->cookies['mybb']))
{
$mybb->cookies['mybb'] = array();
}


// Make sure our current viarables are up-to-date as well
$mybb->cookies['mybb'][$name] = $newcookie;


// Make sure our current viarables are up-to-date as well
$mybb->cookies['mybb'][$name] = $newcookie;

Zeile 3319Zeile 3337
			if($forum['active'] != 0)
{
$jumpfcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum;

			if($forum['active'] != 0)
{
$jumpfcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum;

			}

			}

		}
}


		}
}


Zeile 3343Zeile 3361
					if($selitem == $forum['fid'])
{
$optionselected = 'selected="selected"';

					if($selitem == $forum['fid'])
{
$optionselected = 'selected="selected"';

					}

$forum['name'] = htmlspecialchars_uni(strip_tags($forum['name']));

					}

$forum['name'] = htmlspecialchars_uni(strip_tags($forum['name']));


eval("\$forumjumpbits .= \"".$templates->get("forumjump_bit")."\";");



eval("\$forumjumpbits .= \"".$templates->get("forumjump_bit")."\";");


Zeile 3362Zeile 3380
	if($addselect)
{
if($showextras == 0)

	if($addselect)
{
if($showextras == 0)

		{

		{

			$template = "special";
}
else

			$template = "special";
}
else

Zeile 3370Zeile 3388
			$template = "advanced";

if(strpos(FORUM_URL, '.html') !== false)

			$template = "advanced";

if(strpos(FORUM_URL, '.html') !== false)

			{

			{

				$forum_link = "'".str_replace('{fid}', "'+option+'", FORUM_URL)."'";
}
else

				$forum_link = "'".str_replace('{fid}', "'+option+'", FORUM_URL)."'";
}
else

Zeile 3387Zeile 3405

/**
* Returns the extension of a file.


/**
* Returns the extension of a file.

 *

 *

 * @param string $file The filename.
* @return string The extension of the file.
*/

 * @param string $file The filename.
* @return string The extension of the file.
*/

Zeile 3725Zeile 3743
					{
$finds = explode("\n", $smilie['find']);
$finds_count = count($finds);

					{
$finds = explode("\n", $smilie['find']);
$finds_count = count($finds);





						// Only show the first text to replace in the box
$smilie['find'] = $finds[0];


						// Only show the first text to replace in the box
$smilie['find'] = $finds[0];


Zeile 3741Zeile 3759
						{
$dropdownsmilies .= '"'.$find.'": "'.$image.'",';
++$i;

						{
$dropdownsmilies .= '"'.$find.'": "'.$image.'",';
++$i;

						}

						}

						else
{
$moresmilies .= '"'.$find.'": "'.$image.'",';

						else
{
$moresmilies .= '"'.$find.'": "'.$image.'",';

Zeile 3775Zeile 3793
			}

if($mybb->settings['allowsizemycode'] == 1)

			}

if($mybb->settings['allowsizemycode'] == 1)

			{

			{

				$size = "size,";

				$size = "size,";

			}


			}


			if($mybb->settings['allowcolormycode'] == 1)
{
$color = "color,";

			if($mybb->settings['allowcolormycode'] == 1)
{
$color = "color,";

			}


			}


			if($mybb->settings['allowfontmycode'] == 1 || $mybb->settings['allowsizemycode'] == 1 || $mybb->settings['allowcolormycode'] == 1)

			if($mybb->settings['allowfontmycode'] == 1 || $mybb->settings['allowsizemycode'] == 1 || $mybb->settings['allowcolormycode'] == 1)

			{

			{

				$removeformat = "removeformat|";

				$removeformat = "removeformat|";

			}


			}


			if($mybb->settings['allowemailmycode'] == 1)
{
$email = "email,";

			if($mybb->settings['allowemailmycode'] == 1)
{
$email = "email,";

			}


			}


			if($mybb->settings['allowlinkmycode'] == 1)

			if($mybb->settings['allowlinkmycode'] == 1)

			{

			{

				$link = "link,unlink";
}

if($mybb->settings['allowlistmycode'] == 1)
{
$list = "bulletlist,orderedlist|";

				$link = "link,unlink";
}

if($mybb->settings['allowlistmycode'] == 1)
{
$list = "bulletlist,orderedlist|";

			}

			}


if($mybb->settings['allowcodemycode'] == 1)
{


if($mybb->settings['allowcodemycode'] == 1)
{

Zeile 3844Zeile 3862
	if(!(int)$tid || (int)$tid <= 0)
{
return $subscription_methods[$subscription_method];

	if(!(int)$tid || (int)$tid <= 0)
{
return $subscription_methods[$subscription_method];

	}

	}


// If method not predefined set using data from database
if(isset($postoptions['subscriptionmethod']))


// If method not predefined set using data from database
if(isset($postoptions['subscriptionmethod']))

Zeile 3860Zeile 3878
		$subscription = $db->fetch_array($query);

if(!empty($subscription) && $subscription['tid'])

		$subscription = $db->fetch_array($query);

if(!empty($subscription) && $subscription['tid'])

		{

		{

			$subscription_method = (int)$subscription['notification'] + 1;
}
}

			$subscription_method = (int)$subscription['notification'] + 1;
}
}

Zeile 3910Zeile 3928
				$mybb->settings['smilieinsertertot'] = $smiliecount;
}
else if($mybb->settings['smilieinsertertot'] < $smiliecount)

				$mybb->settings['smilieinsertertot'] = $smiliecount;
}
else if($mybb->settings['smilieinsertertot'] < $smiliecount)

			{

			{

				$smiliecount = $mybb->settings['smilieinsertertot'];
eval("\$getmore = \"".$templates->get("smilieinsert_getmore")."\";");
}

				$smiliecount = $mybb->settings['smilieinsertertot'];
eval("\$getmore = \"".$templates->get("smilieinsert_getmore")."\";");
}

Zeile 3918Zeile 3936
			$smilies = $smilie_icons = '';
$counter = 0;
$i = 0;

			$smilies = $smilie_icons = '';
$counter = 0;
$i = 0;





			$extra_class = '';
foreach($smiliecache as $smilie)
{

			$extra_class = '';
foreach($smiliecache as $smilie)
{

Zeile 3927Zeile 3945
					$smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']);
$smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image']));
$smilie['name'] = htmlspecialchars_uni($smilie['name']);

					$smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']);
$smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image']));
$smilie['name'] = htmlspecialchars_uni($smilie['name']);





					// Only show the first text to replace in the box
$temp = explode("\n", $smilie['find']); // assign to temporary variable for php 5.3 compatibility
$smilie['find'] = $temp[0];

					// Only show the first text to replace in the box
$temp = explode("\n", $smilie['find']); // assign to temporary variable for php 5.3 compatibility
$smilie['find'] = $temp[0];

Zeile 3995Zeile 4013
	$prefix_cache = $cache->read("threadprefixes");

if(!is_array($prefix_cache))

	$prefix_cache = $cache->read("threadprefixes");

if(!is_array($prefix_cache))

	{

	{

		// No cache
$prefix_cache = $cache->read("threadprefixes", true);

if(!is_array($prefix_cache))
{
return array();

		// No cache
$prefix_cache = $cache->read("threadprefixes", true);

if(!is_array($prefix_cache))
{
return array();

		}
}

		}
}


$prefixes_cache = array();
foreach($prefix_cache as $prefix)


$prefixes_cache = array();
foreach($prefix_cache as $prefix)

Zeile 4018Zeile 4036
	else if(!empty($prefixes_cache))
{
return $prefixes_cache;

	else if(!empty($prefixes_cache))
{
return $prefixes_cache;

	}


	}


	return false;
}


	return false;
}


Zeile 4061Zeile 4079
			{
// This prefix is not in our forum list
continue;

			{
// This prefix is not in our forum list
continue;

			}
}

			}
}


if(is_member($prefix['groups']) || $prefix['pid'] == $previous_pid)
{


if(is_member($prefix['groups']) || $prefix['pid'] == $previous_pid)
{

Zeile 4264Zeile 4282
	{
$fid = (int)$data['fid'];
unset($data['fid']);

	{
$fid = (int)$data['fid'];
unset($data['fid']);

	}


	}


	$tid = 0;
if(isset($data['tid']))
{

	$tid = 0;
if(isset($data['tid']))
{

Zeile 4402Zeile 4420
{
global $mybb, $plugins;


{
global $mybb, $plugins;


	$ip = strtolower($_SERVER['REMOTE_ADDR']);


	$ip = strtolower($_SERVER['REMOTE_ADDR']);


	if($mybb->settings['ip_forwarded_check'])
{
$addresses = array();

	if($mybb->settings['ip_forwarded_check'])
{
$addresses = array();

Zeile 4536Zeile 4554
		$time = number_format(round(1000000 * $time, 2))." μs";
}
elseif(round(1000000 * $time, 2) >= 1000 && round(1000000 * $time, 2) < 1000000)

		$time = number_format(round(1000000 * $time, 2))." μs";
}
elseif(round(1000000 * $time, 2) >= 1000 && round(1000000 * $time, 2) < 1000000)

	{

	{

		$time = number_format(round((1000 * $time), 2))." ms";
}
else

		$time = number_format(round((1000 * $time), 2))." ms";
}
else

Zeile 4560Zeile 4578
	if(!$attachtypes)
{
$attachtypes = $cache->read("attachtypes");

	if(!$attachtypes)
{
$attachtypes = $cache->read("attachtypes");

	}


	}


	$ext = my_strtolower($ext);

if($attachtypes[$ext]['icon'])

	$ext = my_strtolower($ext);

if($attachtypes[$ext]['icon'])

Zeile 4586Zeile 4604
			{
global $change_dir;
$attach_icons_schemes[$ext] = $change_dir."/".str_replace("{theme}", $theme['imgdir'], $attachtypes[$ext]['icon']);

			{
global $change_dir;
$attach_icons_schemes[$ext] = $change_dir."/".str_replace("{theme}", $theme['imgdir'], $attachtypes[$ext]['icon']);

				$attach_icons_schemes[$ext] = $mybb->get_asset_url($attach_icons_schemes[$ext]);

				$attach_icons_schemes[$ext] = $mybb->get_asset_url($attach_icons_schemes[$ext]);

			}
else
{

			}
else
{

Zeile 4604Zeile 4622
		if(defined("IN_ADMINCP"))
{
$theme['imgdir'] = "../images";

		if(defined("IN_ADMINCP"))
{
$theme['imgdir'] = "../images";

		}

		}

		else if(defined("IN_PORTAL"))
{
global $change_dir;
$theme['imgdir'] = "{$change_dir}/images";
}

		else if(defined("IN_PORTAL"))
{
global $change_dir;
$theme['imgdir'] = "{$change_dir}/images";
}





		$icon = "{$theme['imgdir']}/attachtypes/unknown.png";

		$icon = "{$theme['imgdir']}/attachtypes/unknown.png";





		$name = $lang->unknown;
}


		$name = $lang->unknown;
}


Zeile 4620Zeile 4638
	eval("\$attachment_icon = \"".$templates->get("attachment_icon")."\";");
return $attachment_icon;
}

	eval("\$attachment_icon = \"".$templates->get("attachment_icon")."\";");
return $attachment_icon;
}





/**
* Get a list of the unviewable forums for the current user
*

/**
* Get a list of the unviewable forums for the current user
*

Zeile 4645Zeile 4663
	foreach($forum_cache as $fid => $forum)
{
if($permissioncache[$forum['fid']])

	foreach($forum_cache as $fid => $forum)
{
if($permissioncache[$forum['fid']])

		{

		{

			$perms = $permissioncache[$forum['fid']];
}
else

			$perms = $permissioncache[$forum['fid']];
}
else

Zeile 4670Zeile 4688
				{
$pwverified = 0;
break;

				{
$pwverified = 0;
break;

				}
}

				}
}

		}

if($perms['canview'] == 0 || $pwverified == 0 || ($only_readable_threads == true && $perms['canviewthreads'] == 0))

		}

if($perms['canview'] == 0 || $pwverified == 0 || ($only_readable_threads == true && $perms['canviewthreads'] == 0))

Zeile 4806Zeile 4824
		}

foreach($forum_cache as $key => $val)

		}

foreach($forum_cache as $key => $val)

		{

		{

			$pforumcache[$val['fid']][$val['pid']] = $val;
}
}

			$pforumcache[$val['fid']][$val['pid']] = $val;
}
}

Zeile 4830Zeile 4848
				{
// Set up link to forum in breadcrumb.
if($pforumcache[$fid][$forumnav['pid']]['type'] == 'f' || $pforumcache[$fid][$forumnav['pid']]['type'] == 'c')

				{
// Set up link to forum in breadcrumb.
if($pforumcache[$fid][$forumnav['pid']]['type'] == 'f' || $pforumcache[$fid][$forumnav['pid']]['type'] == 'c')

					{

					{

						$navbits[$navsize]['url'] = "{$base_url}forum-".$forumnav['fid'].".html";
}
else

						$navbits[$navsize]['url'] = "{$base_url}forum-".$forumnav['fid'].".html";
}
else

Zeile 4854Zeile 4872
	}

return 1;

	}

return 1;

}


}


/**
* Resets the breadcrumb navigation to the first item, and clears the rest
*/

/**
* Resets the breadcrumb navigation to the first item, and clears the rest
*/

Zeile 4872Zeile 4890

unset($GLOBALS['navbits']);
$GLOBALS['navbits'] = $newnav;


unset($GLOBALS['navbits']);
$GLOBALS['navbits'] = $newnav;

}


}


/**
* Builds a URL to an archive mode page
*

/**
* Builds a URL to an archive mode page
*

Zeile 4882Zeile 4900
 * @return string The URL
*/
function build_archive_link($type="", $id=0)

 * @return string The URL
*/
function build_archive_link($type="", $id=0)

{

{

	global $mybb;

// If the server OS is not Windows and not Apache or the PHP is running as a CGI or we have defined ARCHIVE_QUERY_STRINGS, use query strings - DIRECTORY_SEPARATOR checks if running windows

	global $mybb;

// If the server OS is not Windows and not Apache or the PHP is running as a CGI or we have defined ARCHIVE_QUERY_STRINGS, use query strings - DIRECTORY_SEPARATOR checks if running windows

Zeile 4890Zeile 4908
	if($mybb->settings['seourls_archive'] == 1)
{
$base_url = $mybb->settings['bburl']."/archive/index.php/";

	if($mybb->settings['seourls_archive'] == 1)
{
$base_url = $mybb->settings['bburl']."/archive/index.php/";

	}

	}

	else
{
$base_url = $mybb->settings['bburl']."/archive/index.php?";

	else
{
$base_url = $mybb->settings['bburl']."/archive/index.php?";

Zeile 4941Zeile 4959
	if($mybb->settings['gzipoutput'] != 0)
{
$gzipen = "Enabled";

	if($mybb->settings['gzipoutput'] != 0)
{
$gzipen = "Enabled";

	}
else
{

	}
else
{

		$gzipen = "Disabled";
}


		$gzipen = "Disabled";
}


Zeile 5282Zeile 5300
	}

if(!isset($options['minutes']) || $options['minutes'] !== false)

	}

if(!isset($options['minutes']) || $options['minutes'] !== false)

	{

	{

		if($minutes == 1)

		if($minutes == 1)

		{

		{

			$nicetime['minutes'] = "1".$lang_minute;

			$nicetime['minutes'] = "1".$lang_minute;

		}

		}

		else if($minutes > 1)
{
$nicetime['minutes'] = $minutes.$lang_minutes;

		else if($minutes > 1)
{
$nicetime['minutes'] = $minutes.$lang_minutes;

		}
}

		}
}


if(!isset($options['seconds']) || $options['seconds'] !== false)
{


if(!isset($options['seconds']) || $options['seconds'] !== false)
{

Zeile 5308Zeile 5326
	if(!empty($nicetime))
{
return implode(", ", $nicetime);

	if(!empty($nicetime))
{
return implode(", ", $nicetime);

	}

	}

}

/**

}

/**

Zeile 5316Zeile 5334
 *
* @param int $reset 1 to reset the row to trow1.
* @return string trow1 or trow2 depending on the previous call

 *
* @param int $reset 1 to reset the row to trow1.
* @return string trow1 or trow2 depending on the previous call

 */

 */

function alt_trow($reset=0)
{
global $alttrow;

function alt_trow($reset=0)
{
global $alttrow;

Zeile 5324Zeile 5342
	if($alttrow == "trow1" && !$reset)
{
$trow = "trow2";

	if($alttrow == "trow1" && !$reset)
{
$trow = "trow2";

	}

	}

	else
{
$trow = "trow1";

	else
{
$trow = "trow1";

Zeile 5349Zeile 5367
	if($uid == $mybb->user['uid'])
{
$user = $mybb->user;

	if($uid == $mybb->user['uid'])
{
$user = $mybb->user;

	}

	}

	else
{
$query = $db->simple_select("users", "additionalgroups, usergroup", "uid='".(int)$uid."'");

	else
{
$query = $db->simple_select("users", "additionalgroups, usergroup", "uid='".(int)$uid."'");

Zeile 5482Zeile 5500
				}

$form_html .= "<input type=\"hidden\" name=\"".htmlspecialchars_uni($name)."\" value=\"".htmlspecialchars_uni($value)."\" />\n";

				}

$form_html .= "<input type=\"hidden\" name=\"".htmlspecialchars_uni($name)."\" value=\"".htmlspecialchars_uni($value)."\" />\n";

			}
}


			}
}


		return array('location' => $location, 'form_html' => $form_html, 'form_method' => $mybb->request_method);
}
else

		return array('location' => $location, 'form_html' => $form_html, 'form_method' => $mybb->request_method);
}
else

Zeile 5501Zeile 5519
		} else
{
$current_query_string = '';

		} else
{
$current_query_string = '';

		}

		}


parse_str($current_query_string, $current_parameters);



parse_str($current_query_string, $current_parameters);


Zeile 5510Zeile 5528
			if(!in_array($name, $ignore))
{
$parameters[$name] = $value;

			if(!in_array($name, $ignore))
{
$parameters[$name] = $value;

			}

			}

		}

if($mybb->request_method === 'post')

		}

if($mybb->request_method === 'post')

Zeile 5552Zeile 5570
	global $db, $themeselect, $tcache, $lang, $mybb, $limit, $templates, $num_themes, $themeselect_option;

if($tid == 0)

	global $db, $themeselect, $tcache, $lang, $mybb, $limit, $templates, $num_themes, $themeselect_option;

if($tid == 0)

	{

	{

		$tid = 1;
$num_themes = 0;
$themeselect_option = '';

		$tid = 1;
$num_themes = 0;
$themeselect_option = '';

Zeile 5686Zeile 5704
	if(is_int($number))
{
return number_format($number, 0, $mybb->settings['decpoint'], $mybb->settings['thousandssep']);

	if(is_int($number))
{
return number_format($number, 0, $mybb->settings['decpoint'], $mybb->settings['thousandssep']);

	}
else

	}
else

	{
$parts = explode('.', $number);

if(isset($parts[1]))
{
$decimals = my_strlen($parts[1]);

	{
$parts = explode('.', $number);

if(isset($parts[1]))
{
$decimals = my_strlen($parts[1]);

		}

		}

		else
{
$decimals = 0;

		else
{
$decimals = 0;

Zeile 5719Zeile 5737
	static $use_iconv;

if(!isset($charset))

	static $use_iconv;

if(!isset($charset))

	{

	{

		$charset = my_strtolower($lang->settings['charset']);

		$charset = my_strtolower($lang->settings['charset']);

	}


	}


	if($charset == "utf-8")
{
return $str;

	if($charset == "utf-8")
{
return $str;

	}


	}


	if(!isset($use_iconv))
{
$use_iconv = function_exists("iconv");

	if(!isset($use_iconv))
{
$use_iconv = function_exists("iconv");

Zeile 5744Zeile 5762
		{
$from_charset = $lang->settings['charset'];
$to_charset = "UTF-8";

		{
$from_charset = $lang->settings['charset'];
$to_charset = "UTF-8";

		}
else
{

		}
else
{

			$from_charset = "UTF-8";
$to_charset = $lang->settings['charset'];

			$from_charset = "UTF-8";
$to_charset = $lang->settings['charset'];

		}

		}

		if($use_iconv)

		if($use_iconv)

		{

		{

			return iconv($from_charset, $to_charset."//IGNORE", $str);

			return iconv($from_charset, $to_charset."//IGNORE", $str);

		}
else
{

		}
else
{

			return @mb_convert_encoding($str, $to_charset, $from_charset);
}
}

			return @mb_convert_encoding($str, $to_charset, $from_charset);
}
}

Zeile 5890Zeile 5908
		$lang->month_10,
$lang->month_11,
$lang->month_12

		$lang->month_10,
$lang->month_11,
$lang->month_12

	);

	);


// This needs to be in this specific order
$find = array(


// This needs to be in this specific order
$find = array(

Zeile 6026Zeile 6044
		LIMIT 1"
);
$lastpost = $db->fetch_array($query);

		LIMIT 1"
);
$lastpost = $db->fetch_array($query);

 

if(!$lastpost)
{
return false;
}


if(empty($lastpost['username']))
{


if(empty($lastpost['username']))
{

Zeile 7073Zeile 7096
		}

// Now make PREG compatible

		}

// Now make PREG compatible

		$find = "#(?!<.*?)(".preg_quote($word, "#").")(?![^<>]*?>)#ui";
$replacement = "<span class=\"highlight\" style=\"padding-left: 0px; padding-right: 0px;\">$1</span>";

		$find = "/(?<!&|&#)\b([[:alnum:]]*)(".preg_quote($word, "/").")(?![^<>]*?>)/ui";
$replacement = "$1<span class=\"highlight\" style=\"padding-left: 0px; padding-right: 0px;\">$2</span>";

		$highlight_cache[$find] = $replacement;
}


		$highlight_cache[$find] = $replacement;
}