]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
_TABLE_TYPE is now replaced
[mailer.git] / inc / mysql-manager.php
index f4f85cbc21b50ff8302ae2ea94d265d153e952fa..0f5051ae0ce704c8a693c3a072f81f766d8dc293 100644 (file)
@@ -114,6 +114,12 @@ function checkModulePermissions ($mod) {
 
        // Check if cache is latest version
        if (GET_EXT_VERSION("cache") >= "0.1.2") {
+               // Is the cache there?
+               if (!isset($GLOBALS['cache_array']['modules'])) {
+                       // This should normally not happen...
+                       debug_report_bug("Cache 'modules' is gone.");
+               } // END - if
+
                // Is the module cached?
                if (isset($GLOBALS['cache_array']['modules']['locked'][$mod_chk])) {
                        // Check cache
@@ -2122,6 +2128,11 @@ function SET_SQLS ($SQLs) {
        $GLOBALS['sqls'] = (array) $SQLs;
 }
 
+// Remover for SQLs array
+function UNSET_SQLS () {
+       unset($GLOBALS['sqls']);
+}
+
 // Getter for SQLs array
 function GET_SQLS () {
        return $GLOBALS['sqls'];
@@ -2129,6 +2140,7 @@ function GET_SQLS () {
 
 // Add an SQL to the list
 function ADD_SQL ($sql) {
+       //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("sql=%s, count=%d", $sql, COUNT_SQLS()));
        $GLOBALS['sqls'][] = (string) $sql;
 }
 
@@ -2146,6 +2158,7 @@ function COUNT_SQLS () {
        if (IS_SQLS_INITIALIZED()) {
                // Then count it
                $count = count($GLOBALS['sqls']);
+               //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("count=%d", $count));
        } // END - if
 
        // Return it
@@ -2156,8 +2169,7 @@ function COUNT_SQLS () {
 function IS_SQLS_VALID () {
        return (
                (IS_SQLS_INITIALIZED()) &&
-               (COUNT_SQLS() > 0) &&
-               (!empty($GLOBALS['sqls'][0]))
+               (COUNT_SQLS() > 0)
        );
 }