]> git.mxchange.org Git - mailer.git/blobdiff - 0.2.1/inc/extensions.php
more fixes for missing extensions
[mailer.git] / 0.2.1 / inc / extensions.php
index 9e6bd17a5a6f4ee374d83bd2a51d42f82538027c..893a5a183616cc0e4e6190203e85805004d25541 100644 (file)
@@ -242,19 +242,19 @@ function EXTENSION_RUN_SQLS($id, $EXT_LOAD_MODE)
        if ((is_array($SQLs) && (sizeof($SQLs) > 0)))
        {
                // Run SQL commands...
        if ((is_array($SQLs) && (sizeof($SQLs) > 0)))
        {
                // Run SQL commands...
-               foreach ($SQLs as $sql)
-               {
+               foreach ($SQLs as $sql) {
+                       // Trim spaces away which we don't need
                        $sql = trim($sql);
                        $sql = trim($sql);
-                       if (!empty($sql))
-                       {
+
+                       // Is there still an SQL query?
+                       if (!empty($sql)) {
                                // Run SQL command
                                $result = SQL_QUERY($sql, __FILE__, __LINE__, false);
                        }
                }
 
                // Remove cache file(s) if extension is active
                                // Run SQL command
                                $result = SQL_QUERY($sql, __FILE__, __LINE__, false);
                        }
                }
 
                // Remove cache file(s) if extension is active
-               if (EXT_IS_ACTIVE("cache"))
-               {
+               if (EXT_IS_ACTIVE("cache")) {
                        // Remove cache filer
                        if ($CACHE->cache_file("extensions", true)) $CACHE->cache_destroy();
                        if ($CACHE->cache_file("mod_reg", true))    $CACHE->cache_destroy();
                        // Remove cache filer
                        if ($CACHE->cache_file("extensions", true)) $CACHE->cache_destroy();
                        if ($CACHE->cache_file("mod_reg", true))    $CACHE->cache_destroy();