From: Roland Häder Date: Fri, 29 Oct 2010 10:58:52 +0000 (+0000) Subject: Wrong 'bigger than' removed, SQL_HASZERONUMS() returns a boolean X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0a4b0f81eea5f4daf5e55e695d79a0ee2669bdd8;p=mailer.git Wrong 'bigger than' removed, SQL_HASZERONUMS() returns a boolean --- diff --git a/inc/functions.php b/inc/functions.php index 522082ba01..92e47c9c44 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2239,6 +2239,8 @@ function initCacheInstance () { // Initialize cache system only when it's needed $GLOBALS['cache_instance'] = new CacheSystem(); + + // Did it work? if ($GLOBALS['cache_instance']->getStatus() != 'done') { // Failed to initialize cache sustem addFatalMessage(__FUNCTION__, __LINE__, '(' . __LINE__ . '): {--CACHE_CANNOT_INITIALIZE--}'); diff --git a/inc/gen_refback.php b/inc/gen_refback.php index 6e04b0dabd..951be74536 100644 --- a/inc/gen_refback.php +++ b/inc/gen_refback.php @@ -76,7 +76,7 @@ ORDER BY u.userid ASC', __FILE__, __LINE__); // Do we have entries? -if (!SQL_HASZERONUMS($result_direct) > 0) { +if (!SQL_HASZERONUMS($result_direct)) { // When 'walk' through all users while ($content = SQL_FETCHARRAY($result_direct)) { // Init level diff --git a/inc/modules/admin/what-usage.php b/inc/modules/admin/what-usage.php index cf5ba9b2ad..1fe8d1bce9 100644 --- a/inc/modules/admin/what-usage.php +++ b/inc/modules/admin/what-usage.php @@ -70,10 +70,10 @@ if (isGetRequestParameterSet('image')) { if (isFileReadable($FQFN)) { $image = imagecreatefrompng($FQFN); - sendHeader('Content-Type: image/png'); + setContentType('image/png'); imagepng($image); imagedestroy($image); - } + } // END - if shutdown(); } elseif (isGetRequestParameterSet('usage')) { $FQFN = sprintf("%s%s/usage_%s.html", diff --git a/inc/template-functions.php b/inc/template-functions.php index d46d83e458..56ee2adb8e 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -808,7 +808,7 @@ function generateImageOrCode ($img_code, $headerSent = true) { imagestring($image, 5, 14, 2, $img_code, $text_color); // Return to browser - sendHeader('Content-Type: image/' . getConfig('img_type')); + setContentType('image/' . getConfig('img_type')); // Output image with matching image factory switch (getConfig('img_type')) { diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 76ef4a034e..dc9f9eff7c 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -1103,8 +1103,11 @@ function getYear ($timestamp = null) { function getMonth ($timestamp = null) { // Is it cached? if (!isset($GLOBALS[__FUNCTION__][$timestamp])) { - // null is time() - if (is_null($timestamp)) $timestamp = time(); + // If null is set, use time() + if (is_null($timestamp)) { + // Use time() which is current timestamp + $timestamp = time(); + } // END - if // Then create it $GLOBALS[__FUNCTION__][$timestamp] = date('m', $timestamp);