diff --git a/includes/functions_display.php b/includes/functions_display.php index 30b62be..422c3a4 100755 --- a/includes/functions_display.php +++ b/includes/functions_display.php @@ -118,7 +118,6 @@ function Saafooter() if ($config['statfooter'] != 0 || defined('DEV_STAGE')) { - $gzip = $config['gzip'] == '1' ? 'Enabled' : 'Disabled'; $hksys = ! defined('STOP_PLUGINS') ? 'Enabled' : 'Disabled'; $endtime = get_microtime(); $loadtime = number_format($endtime - $starttm, 4); @@ -126,7 +125,7 @@ function Saafooter() $time_sql = round($SQL->query_num / $loadtime); $page_url = preg_replace(['/([\&\?]+)debug/i', '/&/i'], ['', '&'], kleeja_get_page()); $link_dbg = user_can('enter_acp') && defined('DEV_STAGE') ? '[ Debug Info ... ]' : ''; - $page_stats = "[ GZIP : $gzip - Generation Time: $loadtime Sec - Queries: $queries_num - Hook System: $hksys ] " . $link_dbg; + $page_stats = "[ Generation Time: $loadtime Sec - Queries: $queries_num - Hook System: $hksys ] " . $link_dbg; } $tpl->assign('page_stats', $page_stats); @@ -850,7 +849,7 @@ function kleeja_date($time, $human_time = true, $format = false) $timezone_offset = intval($config['time_zone']) * 60 * 60; } - if ((time() - $time > (86400 * 9)) || $format || ! $human_time) + if ((time() - $time) > (86400 * 9) || $format || ! $human_time) { $format = ! $format ? TIME_FORMAT : $format; $time = $time + $timezone_offset; @@ -885,7 +884,7 @@ function kleeja_date($time, $human_time = true, $format = false) } else { - $return = $lang['W_PERIODS_' . $j]; + $return = '1 ' . $lang['W_PERIODS_' . $j]; } $return = $now > $time ? $return . ' ' . $lang['W_AGO']: $lang['W_FROM'] . ' ' . $return; diff --git a/includes/mysqli.php b/includes/mysqli.php index 3ba3e73..d251a33 100755 --- a/includes/mysqli.php +++ b/includes/mysqli.php @@ -98,6 +98,11 @@ class KleejaDatabase //loggin -> close connection kleeja_log('[Closing connection] : ' . kleeja_get_page()); + if(! $this->connect_id) + { + return true; + } + return @mysqli_close($this->connect_id); } else diff --git a/includes/up_methods/defaultUploader.php b/includes/up_methods/defaultUploader.php index c3f474a..90d5769 100755 --- a/includes/up_methods/defaultUploader.php +++ b/includes/up_methods/defaultUploader.php @@ -414,7 +414,7 @@ class defaultUploader implements KleejaUploader //no file! if (empty($_FILES['file_' . $i . '_']['tmp_name']) && empty($_FILES['file'][$i]['tmp_name'])) { - if (is_null($_FILES['file_' . $i . '_']) && is_null($_FILES['file'][$i])) + if (! isset($_FILES['file_' . $i . '_'], $_FILES['file'][$i])) { continue; }