Zeile 581 | Zeile 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 1694 | Zeile 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 1709 | Zeile 1711 |
---|
break; } }
|
break; } }
|
}
| }
|
} else {
| } else {
|
Zeile 1733 | Zeile 1735 |
---|
if($level_permissions["canview"] && empty($level_permissions["canonlyviewownthreads"])) { $only_view_own_threads = 0;
|
if($level_permissions["canview"] && empty($level_permissions["canonlyviewownthreads"])) { $only_view_own_threads = 0;
|
}
| }
|
if($level_permissions["canpostreplys"] && empty($level_permissions["canonlyreplyownthreads"])) { $only_reply_own_threads = 0;
| if($level_permissions["canpostreplys"] && empty($level_permissions["canonlyreplyownthreads"])) { $only_reply_own_threads = 0;
|
Zeile 1750 | Zeile 1752 |
---|
// Figure out if we can reply more than our own threads if($only_reply_own_threads == 0)
|
// Figure out if we can reply more than our own threads if($only_reply_own_threads == 0)
|
{
| {
|
$current_permissions["canonlyreplyownthreads"] = 0;
|
$current_permissions["canonlyreplyownthreads"] = 0;
|
}
| }
|
if(count($current_permissions) == 0) { $current_permissions = $groupperms; } return $current_permissions;
|
if(count($current_permissions) == 0) { $current_permissions = $groupperms; } return $current_permissions;
|
}
/**
| }
/**
|
* Check whether password for given forum was validated for the current user * * @param array $forum The forum data
| * Check whether password for given forum was validated for the current user * * @param array $forum The forum data
|
Zeile 1973 | Zeile 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 { $perms[$action] = max($perm[$action], $perms[$action]);
|
else { $perms[$action] = max($perm[$action], $perms[$action]);
|
} } }
| } } }
|
foreach($groups as $group) { if(empty($forum['usergroups'][$group]) || !is_array($forum['usergroups'][$group])) { // There are no permissions set for this group continue;
|
foreach($groups as $group) { if(empty($forum['usergroups'][$group]) || !is_array($forum['usergroups'][$group])) { // There are no permissions set for this group continue;
|
}
| }
|
$perm = $forum['usergroups'][$group]; foreach($perm as $action => $value)
| $perm = $forum['usergroups'][$group]; foreach($perm as $action => $value)
|
Zeile 2001 | Zeile 2007 |
---|
{ continue; }
|
{ continue; }
|
$perms[$action] = max($perm[$action], $perms[$action]);
| if(!isset($perms[$action])) { $perms[$action] = $value; } else { $perms[$action] = max($perm[$action], $perms[$action]); }
|
} }
|
} }
|
}
$modpermscache[$fid][$uid] = $perms;
| }
$modpermscache[$fid][$uid] = $perms;
|
return $perms; }
| return $perms; }
|
Zeile 2023 | Zeile 2036 |
---|
function is_moderator($fid=0, $action="", $uid=0) { global $mybb, $cache, $plugins;
|
function is_moderator($fid=0, $action="", $uid=0) { global $mybb, $cache, $plugins;
|
if($uid == 0) { $uid = $mybb->user['uid']; }
if($uid == 0) { return false; }
| if($uid == 0) { $uid = $mybb->user['uid']; }
if($uid == 0) { return false; }
|
$user_perms = user_permissions($uid);
$hook_args = array(
| $user_perms = user_permissions($uid);
$hook_args = array(
|
Zeile 2050 | Zeile 2063 |
---|
}
if(!empty($user_perms['issupermod']) && $user_perms['issupermod'] == 1)
|
}
if(!empty($user_perms['issupermod']) && $user_perms['issupermod'] == 1)
|
{
| {
|
if($fid) { $forumpermissions = forum_permissions($fid); if(!empty($forumpermissions['canview']) && !empty($forumpermissions['canviewthreads']) && empty($forumpermissions['canonlyviewownthreads']))
|
if($fid) { $forumpermissions = forum_permissions($fid); if(!empty($forumpermissions['canview']) && !empty($forumpermissions['canviewthreads']) && empty($forumpermissions['canonlyviewownthreads']))
|
{ return true; } return false; }
| { return true; } return false; }
|
return true; } else
| return true; } else
|
Zeile 2074 | Zeile 2087 |
---|
if(isset($modusers['users'][$uid]) && $modusers['users'][$uid]['mid'] && (!$action || !empty($modusers['users'][$uid][$action]))) { return true;
|
if(isset($modusers['users'][$uid]) && $modusers['users'][$uid]['mid'] && (!$action || !empty($modusers['users'][$uid][$action]))) { return true;
|
}
| }
|
$groups = explode(',', $user_perms['all_usergroups']);
foreach($groups as $group)
| $groups = explode(',', $user_perms['all_usergroups']);
foreach($groups as $group)
|
Zeile 2100 | Zeile 2113 |
---|
else { if(isset($modperms[$action]) && $modperms[$action] == 1)
|
else { if(isset($modperms[$action]) && $modperms[$action] == 1)
|
{
| {
|
return true;
|
return true;
|
}
| }
|
else { return false;
|
else { return false;
|
} } }
| } } }
|
} }
| } }
|
Zeile 2122 | Zeile 2135 |
---|
function get_moderated_fids($uid=0) { global $mybb, $cache;
|
function get_moderated_fids($uid=0) { global $mybb, $cache;
|
if($uid == 0) {
| if($uid == 0) {
|
$uid = $mybb->user['uid']; }
if($uid == 0) { return array();
|
$uid = $mybb->user['uid']; }
if($uid == 0) { return array();
|
}
$user_perms = user_permissions($uid);
| }
$user_perms = user_permissions($uid);
|
if($user_perms['issupermod'] == 1) { return false;
|
if($user_perms['issupermod'] == 1) { return false;
|
}
$fids = array();
| }
$fids = array();
|
$modcache = $cache->read('moderators'); if(!empty($modcache)) {
| $modcache = $cache->read('moderators'); if(!empty($modcache)) {
|
Zeile 2166 | Zeile 2179 |
---|
}
return $fids;
|
}
return $fids;
|
}
/**
| }
/**
|
* Generate a list of the posticons. * * @return string The template of posticons.
| * Generate a list of the posticons. * * @return string The template of posticons.
|
Zeile 2194 | Zeile 2207 |
---|
krsort($posticons);
foreach($posticons as $dbicon)
|
krsort($posticons);
foreach($posticons as $dbicon)
|
{
| {
|
$dbicon['path'] = str_replace("{theme}", $theme['imgdir'], $dbicon['path']); $dbicon['path'] = htmlspecialchars_uni($mybb->get_asset_url($dbicon['path'])); $dbicon['name'] = htmlspecialchars_uni($dbicon['name']);
| $dbicon['path'] = str_replace("{theme}", $theme['imgdir'], $dbicon['path']); $dbicon['path'] = htmlspecialchars_uni($mybb->get_asset_url($dbicon['path'])); $dbicon['name'] = htmlspecialchars_uni($dbicon['name']);
|
Zeile 2210 | Zeile 2223 |
---|
}
eval("\$iconlist .= \"".$templates->get("posticons_icon")."\";");
|
}
eval("\$iconlist .= \"".$templates->get("posticons_icon")."\";");
|
}
| }
|
if(!empty($iconlist)) {
| if(!empty($iconlist)) {
|
Zeile 2234 | Zeile 2247 |
---|
* @param string $samesite The samesite attribute to prevent CSRF. */ function my_setcookie($name, $value="", $expires="", $httponly=false, $samesite="")
|
* @param string $samesite The samesite attribute to prevent CSRF. */ function my_setcookie($name, $value="", $expires="", $httponly=false, $samesite="")
|
{ global $mybb;
| { global $mybb;
|
if(!$mybb->settings['cookiepath']) {
| if(!$mybb->settings['cookiepath']) {
|
Zeile 2245 | Zeile 2258 |
---|
if($expires == -1) { $expires = 0;
|
if($expires == -1) { $expires = 0;
|
}
| }
|
elseif($expires == "" || $expires == null) { $expires = TIME_NOW + (60*60*24*365); // Make the cookie expire in a years time
| elseif($expires == "" || $expires == null) { $expires = TIME_NOW + (60*60*24*365); // Make the cookie expire in a years time
|
Zeile 2261 | Zeile 2274 |
---|
// Versions of PHP prior to 5.2 do not support HttpOnly cookies and IE is buggy when specifying a blank domain so set the cookie manually $cookie = "Set-Cookie: {$mybb->settings['cookieprefix']}{$name}=".urlencode($value);
|
// Versions of PHP prior to 5.2 do not support HttpOnly cookies and IE is buggy when specifying a blank domain so set the cookie manually $cookie = "Set-Cookie: {$mybb->settings['cookieprefix']}{$name}=".urlencode($value);
|
|
|
if($expires > 0) { $cookie .= "; expires=".@gmdate('D, d-M-Y H:i:s \\G\\M\\T', $expires);
|
if($expires > 0) { $cookie .= "; expires=".@gmdate('D, d-M-Y H:i:s \\G\\M\\T', $expires);
|
}
| }
|
if(!empty($mybb->settings['cookiepath']))
|
if(!empty($mybb->settings['cookiepath']))
|
{
| {
|
$cookie .= "; path={$mybb->settings['cookiepath']}";
|
$cookie .= "; path={$mybb->settings['cookiepath']}";
|
}
| }
|
if(!empty($mybb->settings['cookiedomain'])) { $cookie .= "; domain={$mybb->settings['cookiedomain']}"; }
if($httponly == true)
|
if(!empty($mybb->settings['cookiedomain'])) { $cookie .= "; domain={$mybb->settings['cookiedomain']}"; }
if($httponly == true)
|
{
| {
|
$cookie .= "; HttpOnly"; }
|
$cookie .= "; HttpOnly"; }
|
|
|
if($samesite != "" && $mybb->settings['cookiesamesiteflag']) { $samesite = strtolower($samesite);
if($samesite == "lax" || $samesite == "strict")
|
if($samesite != "" && $mybb->settings['cookiesamesiteflag']) { $samesite = strtolower($samesite);
if($samesite == "lax" || $samesite == "strict")
|
{
| {
|
$cookie .= "; SameSite=".$samesite; }
|
$cookie .= "; SameSite=".$samesite; }
|
}
| }
|
if($mybb->settings['cookiesecureflag']) { $cookie .= "; Secure"; }
|
if($mybb->settings['cookiesecureflag']) { $cookie .= "; Secure"; }
|
|
|
$mybb->cookies[$name] = $value;
header($cookie, false);
| $mybb->cookies[$name] = $value;
header($cookie, false);
|
Zeile 2312 | Zeile 2325 |
---|
global $mybb;
$expires = -3600;
|
global $mybb;
$expires = -3600;
|
my_setcookie($name, "", $expires);
| my_setcookie($name, "", $expires);
|
unset($mybb->cookies[$name]); }
| unset($mybb->cookies[$name]); }
|
Zeile 2329 | Zeile 2342 |
---|
global $mybb;
if(!isset($mybb->cookies['mybb'][$name]))
|
global $mybb;
if(!isset($mybb->cookies['mybb'][$name]))
|
{
| {
|
return false;
|
return false;
|
}
$cookie = my_unserialize($mybb->cookies['mybb'][$name]);
| }
$cookie = my_unserialize($mybb->cookies['mybb'][$name], false);
|
if(is_array($cookie) && isset($cookie[$id]))
|
if(is_array($cookie) && isset($cookie[$id]))
|
{ return $cookie[$id]; } else {
| { return $cookie[$id]; } else {
|
return 0; } }
| return 0; } }
|
Zeile 2359 | Zeile 2372 |
---|
if(isset($mybb->cookies['mybb'][$name])) {
|
if(isset($mybb->cookies['mybb'][$name])) {
|
$newcookie = my_unserialize($mybb->cookies['mybb'][$name]);
| $newcookie = my_unserialize($mybb->cookies['mybb'][$name], false);
|
} else {
| } else {
|
Zeile 2369 | Zeile 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 2388 | Zeile 2406 |
---|
* - does not unserialize objects * * @param string $str
|
* - does not unserialize objects * * @param string $str
|
| * @param bool $unlimited Whether to apply limits defined in MAX_SERIALIZED_* constants
|
* @return mixed * @throw Exception if $str is malformed or contains unsupported types (e.g., resources, objects) */
|
* @return mixed * @throw Exception if $str is malformed or contains unsupported types (e.g., resources, objects) */
|
function _safe_unserialize($str)
| function _safe_unserialize($str, $unlimited = true)
|
{
|
{
|
if(strlen($str) > MAX_SERIALIZED_INPUT_LENGTH)
| if(!$unlimited && strlen($str) > MAX_SERIALIZED_INPUT_LENGTH)
|
{ // input exceeds MAX_SERIALIZED_INPUT_LENGTH return false;
| { // input exceeds MAX_SERIALIZED_INPUT_LENGTH return false;
|
Zeile 2421 | Zeile 2440 |
---|
if($type == '}') { $str = substr($str, 1);
|
if($type == '}') { $str = substr($str, 1);
|
}
| }
|
else if($type == 'N' && $str[1] == ';') { $value = null; $str = substr($str, 2); } else if($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))
|
else if($type == 'N' && $str[1] == ';') { $value = null; $str = substr($str, 2); } else if($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))
|
{
| {
|
$value = $matches[1] == '1' ? true : false; $str = substr($str, 4);
|
$value = $matches[1] == '1' ? true : false; $str = substr($str, 4);
|
}
| }
|
else if($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches)) { $value = (int)$matches[1];
| else if($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches)) { $value = (int)$matches[1];
|
Zeile 2447 | Zeile 2466 |
---|
$value = substr($matches[2], 0, (int)$matches[1]); $str = substr($matches[2], (int)$matches[1] + 2); }
|
$value = substr($matches[2], 0, (int)$matches[1]); $str = substr($matches[2], (int)$matches[1] + 2); }
|
else if($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches) && $matches[1] < MAX_SERIALIZED_ARRAY_LENGTH)
| else if( $type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches) && ($unlimited || $matches[1] < MAX_SERIALIZED_ARRAY_LENGTH) )
|
{ $expectedLength = (int)$matches[1]; $str = $matches[2];
| { $expectedLength = (int)$matches[1]; $str = $matches[2];
|
Zeile 2463 | Zeile 2486 |
---|
case 3: // in array, expecting value or another array if($type == 'a') {
|
case 3: // in array, expecting value or another array if($type == 'a') {
|
if(count($stack) >= MAX_SERIALIZED_ARRAY_DEPTH)
| if(!$unlimited && count($stack) >= MAX_SERIALIZED_ARRAY_DEPTH)
|
{ // array nesting exceeds MAX_SERIALIZED_ARRAY_DEPTH return false;
| { // array nesting exceeds MAX_SERIALIZED_ARRAY_DEPTH return false;
|
Zeile 2508 | Zeile 2531 |
---|
} if($type == 'i' || $type == 's') {
|
} if($type == 'i' || $type == 's') {
|
if(count($list) >= MAX_SERIALIZED_ARRAY_LENGTH)
| if(!$unlimited && count($list) >= MAX_SERIALIZED_ARRAY_LENGTH)
|
{ // array size exceeds MAX_SERIALIZED_ARRAY_LENGTH return false;
| { // array size exceeds MAX_SERIALIZED_ARRAY_LENGTH return false;
|
Zeile 2530 | Zeile 2553 |
---|
case 0: // expecting array or value if($type == 'a') {
|
case 0: // expecting array or value if($type == 'a') {
|
if(count($stack) >= MAX_SERIALIZED_ARRAY_DEPTH)
| if(!$unlimited && count($stack) >= MAX_SERIALIZED_ARRAY_DEPTH)
|
{ // array nesting exceeds MAX_SERIALIZED_ARRAY_DEPTH return false;
| { // array nesting exceeds MAX_SERIALIZED_ARRAY_DEPTH return false;
|
Zeile 2567 | Zeile 2590 |
---|
* Wrapper for _safe_unserialize() that handles exceptions and multibyte encoding issue * * @param string $str
|
* Wrapper for _safe_unserialize() that handles exceptions and multibyte encoding issue * * @param string $str
|
| * @param bool $unlimited
|
* @return mixed */
|
* @return mixed */
|
function my_unserialize($str)
| function my_unserialize($str, $unlimited = true)
|
{ // Ensure we use the byte count for strings even when strlen() is overloaded by mb_strlen() if(function_exists('mb_internal_encoding') && (((int)ini_get('mbstring.func_overload')) & 2))
| { // Ensure we use the byte count for strings even when strlen() is overloaded by mb_strlen() if(function_exists('mb_internal_encoding') && (((int)ini_get('mbstring.func_overload')) & 2))
|
Zeile 2578 | Zeile 2602 |
---|
mb_internal_encoding('ASCII'); }
|
mb_internal_encoding('ASCII'); }
|
$out = _safe_unserialize($str);
| $out = _safe_unserialize($str, $unlimited);
|
if(isset($mbIntEnc)) {
| if(isset($mbIntEnc)) {
|
Zeile 3319 | Zeile 3343 |
---|
if($forum['active'] != 0) { $jumpfcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum;
|
if($forum['active'] != 0) { $jumpfcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum;
|
} } }
if(!is_array($permissioncache)) { $permissioncache = forum_permissions();
| } } }
if(!is_array($permissioncache)) { $permissioncache = forum_permissions();
|
}
if(isset($jumpfcache[$pid]) && is_array($jumpfcache[$pid]))
| }
if(isset($jumpfcache[$pid]) && is_array($jumpfcache[$pid]))
|
Zeile 4405 | Zeile 4429 |
---|
$ip = strtolower($_SERVER['REMOTE_ADDR']);
if($mybb->settings['ip_forwarded_check'])
|
$ip = strtolower($_SERVER['REMOTE_ADDR']);
if($mybb->settings['ip_forwarded_check'])
|
{
| {
|
$addresses = array();
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
| $addresses = array();
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
|
Zeile 4429 | Zeile 4453 |
---|
break; } }
|
break; } }
|
} }
| } }
|
if(!$ip) { if(isset($_SERVER['HTTP_CLIENT_IP'])) { $ip = strtolower($_SERVER['HTTP_CLIENT_IP']); }
|
if(!$ip) { if(isset($_SERVER['HTTP_CLIENT_IP'])) { $ip = strtolower($_SERVER['HTTP_CLIENT_IP']); }
|
}
| }
|
if($plugins) { $ip_array = array("ip" => &$ip); // Used for backwards compatibility on this hook with the updated run_hooks() function.
| if($plugins) { $ip_array = array("ip" => &$ip); // Used for backwards compatibility on this hook with the updated run_hooks() function.
|
Zeile 4448 | Zeile 4472 |
---|
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 4473 | Zeile 4497 |
---|
elseif($size >= 1180591620717411303424) { $size = my_number_format(round(($size / 1180591620717411303424), 2))." ".$lang->size_zb;
|
elseif($size >= 1180591620717411303424) { $size = my_number_format(round(($size / 1180591620717411303424), 2))." ".$lang->size_zb;
|
}
| }
|
// Exabyte (1024 Petabytes) elseif($size >= 1152921504606846976)
|
// Exabyte (1024 Petabytes) elseif($size >= 1152921504606846976)
|
{
| {
|
$size = my_number_format(round(($size / 1152921504606846976), 2))." ".$lang->size_eb; } // Petabyte (1024 Terabytes) elseif($size >= 1125899906842624)
|
$size = my_number_format(round(($size / 1152921504606846976), 2))." ".$lang->size_eb; } // Petabyte (1024 Terabytes) elseif($size >= 1125899906842624)
|
{
| {
|
$size = my_number_format(round(($size / 1125899906842624), 2))." ".$lang->size_pb; } // Terabyte (1024 Gigabytes)
| $size = my_number_format(round(($size / 1125899906842624), 2))." ".$lang->size_pb; } // Terabyte (1024 Gigabytes)
|
Zeile 4505 | Zeile 4529 |
---|
$size = my_number_format(round(($size / 1024), 2))." ".$lang->size_kb; } elseif($size == 0)
|
$size = my_number_format(round(($size / 1024), 2))." ".$lang->size_kb; } elseif($size == 0)
|
{
| {
|
$size = "0 ".$lang->size_bytes; } else
| $size = "0 ".$lang->size_bytes; } else
|
Zeile 4529 | Zeile 4553 |
---|
if(!is_numeric($time)) { return $lang->na;
|
if(!is_numeric($time)) { return $lang->na;
|
}
| }
|
if(round(1000000 * $time, 2) < 1000)
|
if(round(1000000 * $time, 2) < 1000)
|
{
| {
|
$time = number_format(round(1000000 * $time, 2))." μs";
|
$time = number_format(round(1000000 * $time, 2))." μs";
|
}
| }
|
elseif(round(1000000 * $time, 2) >= 1000 && round(1000000 * $time, 2) < 1000000)
|
elseif(round(1000000 * $time, 2) >= 1000 && round(1000000 * $time, 2) < 1000000)
|
{
| {
|
$time = number_format(round((1000 * $time), 2))." ms";
|
$time = number_format(round((1000 * $time), 2))." ms";
|
} else {
| } else {
|
$time = round($time, 3)." seconds"; }
| $time = round($time, 3)." seconds"; }
|
Zeile 4675 | Zeile 4699 |
---|
}
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))
|
{
| {
|
$unviewable[] = $forum['fid']; } }
|
$unviewable[] = $forum['fid']; } }
|
|
|
$unviewableforums = implode(',', $unviewable);
|
$unviewableforums = implode(',', $unviewable);
|
|
|
return $unviewableforums;
|
return $unviewableforums;
|
}
| }
|
/** * Fixes mktime for dates earlier than 1970 *
| /** * Fixes mktime for dates earlier than 1970 *
|
Zeile 4701 | Zeile 4725 |
---|
return $format; }
|
return $format; }
|
|
|
/** * Build the breadcrumb navigation trail from the specified items *
| /** * Build the breadcrumb navigation trail from the specified items *
|
Zeile 4726 | Zeile 4750 |
---|
if(isset($navbits[$key+2])) { $sep = $navsep;
|
if(isset($navbits[$key+2])) { $sep = $navsep;
|
}
| }
|
else { $sep = "";
| else { $sep = "";
|
Zeile 4743 | Zeile 4767 |
---|
$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)
|
{
| {
|
++$i; eval("\$multipage_dropdown = \"".$templates->get("nav_dropdown")."\";"); $sep = $multipage_dropdown.$sep;
| ++$i; eval("\$multipage_dropdown = \"".$templates->get("nav_dropdown")."\";"); $sep = $multipage_dropdown.$sep;
|
Zeile 4759 | Zeile 4783 |
---|
} $navsize = count($navbits); $navbit = $navbits[$navsize-1];
|
} $navsize = count($navbits); $navbit = $navbits[$navsize-1];
|
}
| }
|
if($nav) {
| if($nav) {
|
Zeile 4808 | Zeile 4832 |
---|
foreach($forum_cache as $key => $val) { $pforumcache[$val['fid']][$val['pid']] = $val;
|
foreach($forum_cache as $key => $val) { $pforumcache[$val['fid']][$val['pid']] = $val;
|
} }
| } }
|
if(is_array($pforumcache[$fid])) { foreach($pforumcache[$fid] as $key => $forumnav)
| if(is_array($pforumcache[$fid])) { foreach($pforumcache[$fid] as $key => $forumnav)
|
Zeile 4945 | Zeile 4969 |
---|
else { $gzipen = "Disabled";
|
else { $gzipen = "Disabled";
|
}
| }
|
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">";
| echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">";
|
Zeile 6026 | Zeile 6050 |
---|
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 7073 | Zeile 7102 |
---|
}
// 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; }
|