]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-extensions.php
Rewrote 'we' word a little, rewrote mail order to use SQL_INSERTID() instead of anoth...
[mailer.git] / inc / modules / admin / what-extensions.php
index b346d479b1a77efb3cbf115e204f17609e2eb151..453e9c6142aadc305a9a865006f27e9afdeec4ae 100644 (file)
@@ -332,7 +332,7 @@ ORDER BY
                break;
 
        case 'register': // Register new extension
-               // Do we have some tasks?
+               // Are there some tasks?
                $numTasks = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', true, "AND `task_type`='EXTENSION'");
 
                // Is the id number valid and the task was found?
@@ -362,10 +362,13 @@ ORDER BY
                                                // @TODO Rewrite this to a filter
                                                if (isExtensionActive('cache')) {
                                                        // Remove cache file (will be auto-created again!)
-                                                       if ($GLOBALS['cache_instance']->loadCacheFile('config'))    $GLOBALS['cache_instance']->removeCacheFile();
-                                                       if ($GLOBALS['cache_instance']->loadCacheFile('extension')) $GLOBALS['cache_instance']->removeCacheFile();
-                                                       if ($GLOBALS['cache_instance']->loadCacheFile('filter'))    $GLOBALS['cache_instance']->removeCacheFile();
-                                                       if ($GLOBALS['cache_instance']->loadCacheFile('modules'))   $GLOBALS['cache_instance']->removeCacheFile();
+                                                       foreach (array('config', 'extension', 'filter', 'modules') as $cache) {
+                                                               // Is the cache file there?
+                                                               if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
+                                                                       // Remove cache file
+                                                                       $GLOBALS['cache_instance']->removeCacheFile();
+                                                               } // END - if
+                                                       } // END - foreach
                                                } // END - if
 
                                                // Errors?