Zeile 743 | Zeile 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 1794 | Zeile 1794 |
---|
*/ 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))
|
Zeile 1817 | Zeile 1823 |
---|
// DIRECTORY_SEPARATOR checks if running windows if(DIRECTORY_SEPARATOR != '\\')
|
// DIRECTORY_SEPARATOR checks if running windows if(DIRECTORY_SEPARATOR != '\\')
|
{
| {
|
if(function_exists("sys_getloadavg"))
|
if(function_exists("sys_getloadavg"))
|
{
| {
|
// 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();
|
$serverload[0] = round($serverload[0], 4);
| $serverload[0] = round($serverload[0], 4);
|
} else if(@file_exists("/proc/loadavg") && $load = @file_get_contents("/proc/loadavg")) {
| } else if(@file_exists("/proc/loadavg") && $load = @file_get_contents("/proc/loadavg")) {
|
Zeile 1832 | Zeile 1838 |
---|
if(!is_numeric($serverload[0])) { if(@ini_get('safe_mode') == 'On')
|
if(!is_numeric($serverload[0])) { if(@ini_get('safe_mode') == 'On')
|
{
| {
|
return $lang->unknown; }
// Suhosin likes to throw a warning if exec is disabled then die - weird if($func_blacklist = @ini_get('suhosin.executor.func.blacklist'))
|
return $lang->unknown; }
// 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 1934 | Zeile 1940 |
---|
$lastmember = $db->fetch_array($query); $new_stats['lastuid'] = $lastmember['uid']; $new_stats['lastusername'] = $lastmember['username'];
|
$lastmember = $db->fetch_array($query); $new_stats['lastuid'] = $lastmember['uid']; $new_stats['lastusername'] = $lastmember['username'];
|
}
| }
|
if(empty($new_stats)) {
| if(empty($new_stats)) {
|
Zeile 1979 | Zeile 1985 |
---|
// Fetch above counters for this forum $query = $db->simple_select("forums", implode(",", $counters), "fid='{$fid}'"); $forum = $db->fetch_array($query);
|
// Fetch above counters for this forum $query = $db->simple_select("forums", implode(",", $counters), "fid='{$fid}'"); $forum = $db->fetch_array($query);
|
foreach($counters as $counter)
| foreach($counters as $counter)
|
{ if(array_key_exists($counter, $changes)) {
| { if(array_key_exists($counter, $changes)) {
|
Zeile 2351 | Zeile 2357 |
---|
{ $newdepth = $depth."--"; $forumjumpbits .= build_forum_jump($forum['fid'], $selitem, 0, $newdepth, $showextras, $showall);
|
{ $newdepth = $depth."--"; $forumjumpbits .= build_forum_jump($forum['fid'], $selitem, 0, $newdepth, $showextras, $showall);
|
} } } }
| } } } }
|
}
if($addselect)
| }
if($addselect)
|
Zeile 2725 | Zeile 2731 |
---|
foreach($exp as $group) { $groups[] = $group;
|
foreach($exp as $group) { $groups[] = $group;
|
} }
| } }
|
// Go through each of our prefixes and decide which ones we can use $prefixes = array(); foreach($prefix_cache as $prefix)
| // Go through each of our prefixes and decide which ones we can use $prefixes = array(); foreach($prefix_cache as $prefix)
|
Zeile 3101 | Zeile 3107 |
---|
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;
|
}
| }
|
return $size; }
|
return $size; }
|
|
|
/** * Get the attachment icon for a specific file extension *
| /** * Get the attachment icon for a specific file extension *
|
Zeile 3123 | Zeile 3129 |
---|
if(!$attachtypes) { $attachtypes = $cache->read("attachtypes");
|
if(!$attachtypes) { $attachtypes = $cache->read("attachtypes");
|
}
$ext = my_strtolower($ext);
| }
$ext = my_strtolower($ext);
|
if($attachtypes[$ext]['icon']) {
| if($attachtypes[$ext]['icon']) {
|
Zeile 3171 | Zeile 3177 |
---|
* @return string Comma separated values list of the forum IDs which the user cannot view */ function get_unviewable_forums($only_readable_threads=false)
|
* @return string Comma separated values list of the forum IDs which the user cannot view */ function get_unviewable_forums($only_readable_threads=false)
|
{
| {
|
global $forum_cache, $permissioncache, $mybb, $unviewable, $templates, $forumpass;
if(!is_array($forum_cache)) { cache_forums();
|
global $forum_cache, $permissioncache, $mybb, $unviewable, $templates, $forumpass;
if(!is_array($forum_cache)) { cache_forums();
|
}
| }
|
if(!is_array($permissioncache))
|
if(!is_array($permissioncache))
|
{
| {
|
$permissioncache = forum_permissions(); }
| $permissioncache = forum_permissions(); }
|
Zeile 3194 | Zeile 3200 |
---|
else { $perms = $mybb->usergroup;
|
else { $perms = $mybb->usergroup;
|
}
| }
|
$pwverified = 1;
if($forum['password'] != "")
|
$pwverified = 1;
if($forum['password'] != "")
|
{
| {
|
if($mybb->cookies['forumpass'][$forum['fid']] != md5($mybb->user['uid'].$forum['password'])) { $pwverified = 0;
| if($mybb->cookies['forumpass'][$forum['fid']] != md5($mybb->user['uid'].$forum['password'])) { $pwverified = 0;
|
Zeile 3216 | Zeile 3222 |
---|
if(isset($password_forums[$parent]) && $mybb->cookies['forumpass'][$parent] != md5($mybb->user['uid'].$password_forums[$parent])) { $pwverified = 0;
|
if(isset($password_forums[$parent]) && $mybb->cookies['forumpass'][$parent] != md5($mybb->user['uid'].$password_forums[$parent])) { $pwverified = 0;
|
} } }
| } } }
|
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 3264 | Zeile 3270 |
---|
global $nav, $navbits, $templates, $theme, $lang, $mybb;
eval("\$navsep = \"".$templates->get("nav_sep")."\";");
|
global $nav, $navbits, $templates, $theme, $lang, $mybb;
eval("\$navsep = \"".$templates->get("nav_sep")."\";");
|
|
|
$i = 0; $activesep = '';
|
$i = 0; $activesep = '';
|
|
|
if(is_array($navbits)) { reset($navbits);
| if(is_array($navbits)) { reset($navbits);
|
Zeile 3276 | Zeile 3282 |
---|
if(isset($navbits[$key+1])) { if(isset($navbits[$key+2]))
|
if(isset($navbits[$key+1])) { if(isset($navbits[$key+2]))
|
{
| {
|
$sep = $navsep; } else
| $sep = $navsep; } else
|
Zeile 3288 | Zeile 3294 |
---|
$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) {
|