]> git.mxchange.org Git - mailer.git/commitdiff
Wrong 'bigger than' removed, SQL_HASZERONUMS() returns a boolean
authorRoland Häder <roland@mxchange.org>
Fri, 29 Oct 2010 10:58:52 +0000 (10:58 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 29 Oct 2010 10:58:52 +0000 (10:58 +0000)
inc/functions.php
inc/gen_refback.php
inc/modules/admin/what-usage.php
inc/template-functions.php
inc/wrapper-functions.php

index 522082ba0178848cb087649327d42b972d56c39b..92e47c9c44bc94460e1341a39933246d3a3f6ccc 100644 (file)
@@ -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__, '(<font color="#0000aa">' . __LINE__ . '</font>): {--CACHE_CANNOT_INITIALIZE--}');
index 6e04b0dabd180e7a84066fb22ad4895c3f78dea9..951be74536873c8144b53d7e3452538d98804cce 100644 (file)
@@ -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
index cf5ba9b2ad9a6d14520798aa010801f7f44a51bc..1fe8d1bce990da1f13e8ff7494e0d28cbf789240 100644 (file)
@@ -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",
index d46d83e45886189f7aa3efc8f679f0feabb58ddf..56ee2adb8e57c6a1afa2b6e36c296108a1c1aa81 100644 (file)
@@ -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')) {
index 76ef4a034e2a939923cd5615d0ad74581086cb44..dc9f9eff7c09fd8a28c2e4af41c3eae8198a0a38 100644 (file)
@@ -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);