Zeile 1644 | Zeile 1644 |
---|
$groupperms = $mybb->usergroup; } }
|
$groupperms = $mybb->usergroup; } }
|
| else { $groupperms = usergroup_permissions($gid); }
|
if(!is_array($forum_cache)) {
| if(!is_array($forum_cache)) {
|
Zeile 2143 | Zeile 2147 |
---|
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']; }
| { $uid = $mybb->user['uid']; }
|
Zeile 2236 | Zeile 2240 |
---|
if(!empty($iconlist)) { eval("\$posticons = \"".$templates->get("posticons")."\";");
|
if(!empty($iconlist)) { eval("\$posticons = \"".$templates->get("posticons")."\";");
|
} else {
| } else {
|
$posticons = ''; }
| $posticons = ''; }
|
Zeile 2301 | Zeile 2305 |
---|
if($httponly == true) { $cookie .= "; HttpOnly";
|
if($httponly == true) { $cookie .= "; HttpOnly";
|
}
| }
|
if($samesite != "" && $mybb->settings['cookiesamesiteflag']) {
| if($samesite != "" && $mybb->settings['cookiesamesiteflag']) {
|
Zeile 2363 | Zeile 2367 |
---|
else { return 0;
|
else { return 0;
|
}
| }
|
}
/**
| }
/**
|
Zeile 2379 | Zeile 2383 |
---|
global $mybb;
if(isset($mybb->cookies['mybb'][$name]))
|
global $mybb;
if(isset($mybb->cookies['mybb'][$name]))
|
{
| {
|
$newcookie = my_unserialize($mybb->cookies['mybb'][$name], false); } else
|
$newcookie = my_unserialize($mybb->cookies['mybb'][$name], false); } else
|
{
| {
|
$newcookie = array(); }
| $newcookie = array(); }
|
Zeile 2394 | Zeile 2398 |
---|
if(isset($mybb->cookies['mybb']) && !is_array($mybb->cookies['mybb'])) { $mybb->cookies['mybb'] = array();
|
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 2487 | Zeile 2491 |
---|
{ // object or unknown/malformed type return false;
|
{ // object or unknown/malformed type return false;
|
}
| }
|
switch($state) { case 3: // in array, expecting value or another array
| switch($state) { case 3: // in array, expecting value or another array
|
Zeile 2504 | Zeile 2508 |
---|
$list[$key] = array(); $list = &$list[$key]; $expected[] = $expectedLength;
|
$list[$key] = array(); $list = &$list[$key]; $expected[] = $expectedLength;
|
$state = 2;
| $state = 2;
|
break; } if($type != '}')
| break; } if($type != '}')
|
Zeile 2518 | Zeile 2522 |
---|
return false;
case 2: // in array, expecting end of array or a key
|
return false;
case 2: // in array, expecting end of array or a key
|
if($type == '}') {
| if($type == '}') {
|
if(count($list) < end($expected)) { // array size less than expected
| if(count($list) < end($expected)) { // array size less than expected
|
Zeile 2613 | Zeile 2617 |
---|
$out = _safe_unserialize($str, $unlimited);
if(isset($mbIntEnc))
|
$out = _safe_unserialize($str, $unlimited);
if(isset($mbIntEnc))
|
{
| {
|
mb_internal_encoding($mbIntEnc); }
| mb_internal_encoding($mbIntEnc); }
|
Zeile 2644 | Zeile 2648 |
---|
* Safe serialize() replacement * - output a strict subset of PHP's native serialized representation * - does not my_serialize objects
|
* Safe serialize() replacement * - output a strict subset of PHP's native serialized representation * - does not my_serialize objects
|
*
| *
|
* @param mixed $value * @return string * @throw Exception if $value is malformed or contains unsupported types (e.g., resources, objects)
| * @param mixed $value * @return string * @throw Exception if $value is malformed or contains unsupported types (e.g., resources, objects)
|
Zeile 2652 | Zeile 2656 |
---|
function _safe_serialize( $value ) { if(is_null($value))
|
function _safe_serialize( $value ) { if(is_null($value))
|
{
| {
|
return 'N;';
|
return 'N;';
|
}
| }
|
if(is_bool($value)) { return 'b:'.(int)$value.';';
|
if(is_bool($value)) { return 'b:'.(int)$value.';';
|
}
| }
|
if(is_int($value)) {
| if(is_int($value)) {
|
Zeile 2669 | Zeile 2673 |
---|
if(is_float($value)) { return 'd:'.str_replace(',', '.', $value).';';
|
if(is_float($value)) { return 'd:'.str_replace(',', '.', $value).';';
|
}
| }
|
if(is_string($value)) { return 's:'.strlen($value).':"'.$value.'";';
|
if(is_string($value)) { return 's:'.strlen($value).':"'.$value.'";';
|
}
| }
|
if(is_array($value))
|
if(is_array($value))
|
{
| {
|
$out = ''; foreach($value as $k => $v) {
| $out = ''; foreach($value as $k => $v) {
|
Zeile 2685 | Zeile 2689 |
---|
}
return 'a:'.count($value).':{'.$out.'}';
|
}
return 'a:'.count($value).':{'.$out.'}';
|
}
| }
|
// safe_serialize cannot my_serialize resources or objects return false;
| // safe_serialize cannot my_serialize resources or objects return false;
|
Zeile 2705 | Zeile 2709 |
---|
{ $mbIntEnc = mb_internal_encoding(); mb_internal_encoding('ASCII');
|
{ $mbIntEnc = mb_internal_encoding(); mb_internal_encoding('ASCII');
|
}
| }
|
$out = _safe_serialize($value); if(isset($mbIntEnc)) { mb_internal_encoding($mbIntEnc); }
|
$out = _safe_serialize($value); if(isset($mbIntEnc)) { mb_internal_encoding($mbIntEnc); }
|
|
|
return $out; }
|
return $out; }
|
|
|
/** * Returns the serverload of the system. *
| /** * Returns the serverload of the system. *
|
Zeile 2726 | Zeile 2730 |
---|
global $mybb, $lang;
$serverload = array();
|
global $mybb, $lang;
$serverload = array();
|
|
|
// DIRECTORY_SEPARATOR checks if running windows if(DIRECTORY_SEPARATOR != '\\') {
| // DIRECTORY_SEPARATOR checks if running windows if(DIRECTORY_SEPARATOR != '\\') {
|
Zeile 2734 | Zeile 2738 |
---|
{ // sys_getloadavg() will return an array with [0] being load within the last minute. $serverload = sys_getloadavg();
|
{ // sys_getloadavg() will return an array with [0] being load within the last minute. $serverload = sys_getloadavg();
|
if(!is_array($serverload)) { return $lang->unknown; }
$serverload[0] = round($serverload[0], 4); }
| if(!is_array($serverload)) { return $lang->unknown; }
$serverload[0] = round($serverload[0], 4); }
|
else if(@file_exists("/proc/loadavg") && $load = @file_get_contents("/proc/loadavg")) { $serverload = explode(" ", $load);
| else if(@file_exists("/proc/loadavg") && $load = @file_get_contents("/proc/loadavg")) { $serverload = explode(" ", $load);
|
Zeile 2756 | Zeile 2760 |
---|
// Suhosin likes to throw a warning if exec is disabled then die - weird if($func_blacklist = @ini_get('suhosin.executor.func.blacklist'))
|
// Suhosin likes to throw a warning if exec is disabled then die - weird if($func_blacklist = @ini_get('suhosin.executor.func.blacklist'))
|
{ if(strpos(",".$func_blacklist.",", 'exec') !== false)
| { if(strpos(",".$func_blacklist.",", 'exec') !== false)
|
{ return $lang->unknown; }
| { return $lang->unknown; }
|
Zeile 2768 | Zeile 2772 |
---|
if(strpos(",".$func_blacklist.",", 'exec') !== false) { return $lang->unknown;
|
if(strpos(",".$func_blacklist.",", 'exec') !== false) { return $lang->unknown;
|
}
| }
|
}
$load = @exec("uptime");
| }
$load = @exec("uptime");
|
Zeile 2893 | Zeile 2897 |
---|
if($new_stats[$counter] < 0) { $new_stats[$counter] = 0;
|
if($new_stats[$counter] < 0) { $new_stats[$counter] = 0;
|
} } }
| } } }
|
}
if(!$force)
| }
if(!$force)
|
Zeile 3395 | Zeile 3399 |
---|
foreach($main as $forum) { $perms = $permissioncache[$forum['fid']];
|
foreach($main as $forum) { $perms = $permissioncache[$forum['fid']];
|
|
|
if($forum['fid'] != "0" && ($perms['canview'] != 0 || $mybb->settings['hideprivateforums'] == 0) && $forum['linkto'] == '' && ($forum['showinjump'] != 0 || $showall == true)) { $optionselected = "";
| if($forum['fid'] != "0" && ($perms['canview'] != 0 || $mybb->settings['hideprivateforums'] == 0) && $forum['linkto'] == '' && ($forum['showinjump'] != 0 || $showall == true)) { $optionselected = "";
|
Zeile 3458 | Zeile 3462 |
---|
/** * Generates a random string.
|
/** * Generates a random string.
|
*
| *
|
* @param int $length The length of the string to generate. * @param bool $complex Whether to return complex string. Defaults to false * @return string The random string.
| * @param int $length The length of the string to generate. * @param bool $complex Whether to return complex string. Defaults to false * @return string The random string.
|
Zeile 3518 | Zeile 3522 |
---|
if($displaygroup != 0) { $usergroup = $displaygroup;
|
if($displaygroup != 0) { $usergroup = $displaygroup;
|
}
$format = "{username}";
| }
$format = "{username}";
|
if(isset($groupscache[$usergroup])) {
| if(isset($groupscache[$usergroup])) {
|
Zeile 3583 | Zeile 3587 |
---|
}
if(!$max_dimensions)
|
}
if(!$max_dimensions)
|
{
| {
|
$max_dimensions = $mybb->settings['maxavatardims']; }
| $max_dimensions = $mybb->settings['maxavatardims']; }
|
Zeile 3646 | Zeile 3650 |
---|
function build_mycode_inserter($bind="message", $smilies = true) { global $db, $mybb, $theme, $templates, $lang, $plugins, $smiliecache, $cache;
|
function build_mycode_inserter($bind="message", $smilies = true) { global $db, $mybb, $theme, $templates, $lang, $plugins, $smiliecache, $cache;
|
| $codeinsert = '';
|
if($mybb->settings['bbcodeinserter'] != 0) {
| if($mybb->settings['bbcodeinserter'] != 0) {
|