]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-extensions.php
Updated copyright notice as there are changes in this year
[mailer.git] / inc / modules / admin / what-extensions.php
index e1b95e3f593283ad11bd965b3aa14723ab965868..af439d78c36529520ced37b279243b29008437b2 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -48,7 +48,7 @@ $do = 'overview';
 
 if (isGetRequestElementSet('register_ext')) {
        // We are about to register a new extension
-       $do = 'register';
+       $do = 'setup';
        $taskId = determineExtensionTaskId(getRequestElement('register_ext'));
 
        // The id comes from task management and it is - of course - *not* the extension's name!
@@ -86,9 +86,9 @@ if (isGetRequestElementSet('register_ext')) {
 
        // Redirect to prevent missing cache in js.php
        redirectToUrl('modules.php?module=admin&what=extensions&changed=' . countPostSelection());
-} elseif (((isFormSent('edit')) || (isPostRequestElementSet('modify'))) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
+} elseif (((isFormSent('edit')) || (isPostRequestElementSet('do_edit'))) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
        // Change settings like CSS file load
-       if (isPostRequestElementSet('modify')) {
+       if (isPostRequestElementSet('do_edit')) {
                // Change entries
                $cache_update = '0';
                foreach (postRequestElement('sel') as $ext_id => $sel) {
@@ -335,12 +335,12 @@ ORDER BY
                }
                break;
 
-       case 'register': // Register new extension
+       case 'setup': // Setup new extension
                // 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?
-               if (($taskId > 0) && ($numTasks > 0)) {
+               if ((isValidId($taskId)) && ($numTasks > 0)) {
                        // id is valid so begin with registration, we first want to it's real name from task management (subject column)
                        $result = SQL_QUERY_ESC("SELECT `subject` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s LIMIT 1",
                                array(bigintval($taskId)), __FILE__, __LINE__);
@@ -367,11 +367,8 @@ ORDER BY
                                                if (isExtensionActive('cache')) {
                                                        // Remove cache file (will be auto-created again!)
                                                        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
+                                                               // Rebuild cache file
+                                                               rebuildCache($cache);
                                                        } // END - foreach
                                                } // END - if