]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-extensions.php
Rewritten all THEME_FOO variables to GLOBALS
[mailer.git] / inc / modules / admin / what-extensions.php
index 317a9fe9c78b2151f664f44783867ac5f08686cb..43aea000f5c117d08ad20b6f45d98af6a1cc5aaf 100644 (file)
@@ -10,7 +10,7 @@
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Erweiterungen-Management                         *
  * -------------------------------------------------------------------- *
- * $Revision:: 856                                                    $ *
+ * $Revision::                                                        $ *
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
@@ -54,7 +54,7 @@ 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!
-} elseif ((REQUEST_ISSET_POST(('change'))) && ($SEL > 0) && (!IS_DEMO())) {
+} elseif ((REQUEST_ISSET_POST('change')) && ($SEL > 0) && (!IS_DEMO())) {
        // De-/activate extensions
        foreach (REQUEST_POST('sel') as $ext_id => $active) {
                // Shall we keep the extension always active?
@@ -150,18 +150,21 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
                                $SW = 3 - $SW;
                        }
                } // END - foreach
+
+               // @TODO Rewrite this constant
                define('__EXTENSIONS_ROWS', $OUT);
 
                // Load template
                LOAD_TEMPLATE("admin_extensions_edit");
                $do = "edit";
        }
-} elseif ((REQUEST_ISSET_POST(('delete'))) && ($SEL > 0) && (!IS_DEMO())) {
+} elseif ((REQUEST_ISSET_POST('delete')) && ($SEL > 0) && (!IS_DEMO())) {
        // List extensions and when verbose is enabled SQL statements which will be executed
        $OUT = ""; $SW = 2;
        foreach (REQUEST_POST('sel') as $ext_id => $sel) {
                // Init variables
-               $VERBOSE_OUT = ""; INIT_SQLS();
+               $VERBOSE_OUT = "";
+               INIT_SQLS();
 
                // Secure id number
                $ext_id = bigintval($ext_id);
@@ -195,7 +198,7 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
        // Load template
        LOAD_TEMPLATE("admin_extensions_delete");
        $do = "delete";
-} elseif ((REQUEST_ISSET_POST(('remove'))) && ($SEL > 0) && (!IS_DEMO())) {
+} elseif ((REQUEST_ISSET_POST('remove')) && ($SEL > 0) && (!IS_DEMO())) {
        // Remove extensions from DB (you have to delete all files manually!)
        $cache_update = 0;
        foreach (REQUEST_POST('sel') as $ext_id => $active) {
@@ -211,10 +214,10 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
                        EXTENSION_RUN_SQLS($ext_id, "remove");
                } // END - if
        } // END - foreach
-} elseif (REQUEST_ISSET_GET(('do')) && (!IS_DEMO())) {
+} elseif ((REQUEST_ISSET_GET('do')) && (!IS_DEMO())) {
        // Other things to do
        $do = SQL_ESCAPE(strip_tags(REQUEST_GET('do')));
-} elseif (REQUEST_ISSET_GET(('do'))) {
+} elseif (REQUEST_ISSET_GET('do')) {
        // Demo mode active!
        $do = "demo";
 }
@@ -309,7 +312,7 @@ case "register": // Register new extension
                        // Is the extension deprecated?
                        if (EXT_GET_DEPRECATED() == "N") {
                                // ... so we can finally register and load it in registration mode
-                               if (EXTENSION_REGISTER($ext_name, $ext_id)) {
+                               if (REGISTER_EXTENSION($ext_name, $ext_id)) {
                                        // Extension was found and successfully registered
                                        LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_EXTENSION_REGISTERED'));