]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-extensions.php
Login form for guests in surfbar added, some trigger_error() added, misc rewrites
[mailer.git] / inc / modules / admin / what-extensions.php
index cd21e9208ed5d91222f58002163b5ec3660829d4..b159ab3d45f43775a758dbb2e9a5253accba9776 100644 (file)
@@ -46,11 +46,16 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Normally we want the overview of all registered extensions
-$do = "overview";
+$do = 'overview';
 $SEL = 0;
-if (REQUEST_ISSET_POST('sel')) $SEL = countPostSelection();
 
-if (REQUEST_ISSET_GET(('reg_ext'))) {
+// Are some extensions submitted?
+if (REQUEST_ISSET_POST('sel')) {
+       // Then count all
+       $SEL = countPostSelection();
+} // END - if
+
+if (REQUEST_ISSET_GET('reg_ext')) {
        // We are about to register a new extension
        $do = 'register'; $ext_id = bigintval(REQUEST_GET('reg_ext'));
        // The ID comes from task management and it is - of course - *not* the extension's name!
@@ -129,12 +134,12 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
                                        array(bigintval($ext_id)), __FILE__, __LINE__);
                                        list($name, $active) = SQL_FETCHROW($result);
                                        SQL_FREERESULT($result);
-                                       $css = "X";
+                                       $css = 'X';
                                }
 
                                // Output row
                                $cssSelection = '---';
-                               if (GET_EXT_VERSION('sql_patches') >= '0.0.6') $cssSelection = ADD_SELECTION('yn', $css, "css", $ext_id);
+                               if (GET_EXT_VERSION('sql_patches') >= '0.0.6') $cssSelection = ADD_SELECTION('yn', $css, 'css', $ext_id);
 
                                // Prepare data for the row template
                                $content = array(
@@ -146,7 +151,7 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
                                );
 
                                // Load row template and switch color
-                               $OUT .= LOAD_TEMPLATE("admin_extensions_edit_row", true, $content);
+                               $OUT .= LOAD_TEMPLATE('admin_extensions_edit_row', true, $content);
                                $SW = 3 - $SW;
                        }
                } // END - foreach
@@ -155,7 +160,7 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
                define('__EXTENSIONS_ROWS', $OUT);
 
                // Load template
-               LOAD_TEMPLATE("admin_extensions_edit");
+               LOAD_TEMPLATE('admin_extensions_edit');
                $do = 'edit';
        }
 } elseif ((REQUEST_ISSET_POST('delete')) && ($SEL > 0) && (!IS_DEMO())) {
@@ -190,14 +195,14 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
                );
 
                // Load row template and switch color
-               $OUT .= LOAD_TEMPLATE("admin_extensions_delete_row", true, $content);
+               $OUT .= LOAD_TEMPLATE('admin_extensions_delete_row', true, $content);
                $SW = 3 - $SW;
        } // END - foreach
        define('__EXTENSIONS_ROWS', $OUT);
 
        // Load template
-       LOAD_TEMPLATE("admin_extensions_delete");
-       $do = "delete";
+       LOAD_TEMPLATE('admin_extensions_delete');
+       $do = 'delete';
 } elseif ((REQUEST_ISSET_POST('remove')) && ($SEL > 0) && (!IS_DEMO())) {
        // Remove extensions from DB (you have to delete all files manually!)
        $cache_update = 0;
@@ -207,9 +212,6 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
 
                // Is this extension selected?
                if ($active == 1) {
-                       // Run any assigned removal filters
-                       runFilterChain('extension_remove', GET_EXT_NAME($ext_id));
-
                        // Run embeded SQL commands
                        EXTENSION_RUN_SQLS($ext_id, 'remove');
                } // END - if
@@ -230,7 +232,7 @@ if (REQUEST_ISSET_GET(('active'))) {
 
 // Case selection
 switch ($do) {
-       case "overview": // List all registered extensions
+       case 'overview': // List all registered extensions
                if (GET_EXT_VERSION('sql_patches') >= '0.0.6') {
                        // Load extension data with CSS informations
                        $result = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_active, ext_has_css AS ext_css, ext_version