]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions.php
Several fixes and and improvements:
[mailer.git] / inc / extensions.php
index 722fa681cbe2cecdc501c63d0e8a414005f22ea3..c4d7a8e0b133555bdd20787d448e372afc3892de 100644 (file)
@@ -41,6 +41,7 @@ if (!defined('__SECURITY')) {
 function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false)
 {
        global $NOTES, $_CONFIG, $INC_POOL, $cacheInstance;
+
        // We want to register an extension and registration status is by default "failed" (= false)
        $EXT_LOAD_MODE = "register"; $ret = false; $SQLs = array();
        $INC_POOL = array();
@@ -48,6 +49,9 @@ function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false)
        // This shall never do a non-admin user!
        if (!IS_ADMIN()) return false;
 
+       // By default we have no failtures
+       $EXT_REPORTS_FAILURE = true;
+
        // Is this extension already installed?
        if (EXT_IS_ACTIVE($ext_name)) return false;
 
@@ -164,6 +168,9 @@ function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false)
                // Switch back to register mode
                $EXT_LOAD_MODE = "register";
 
+               // Remains true if extension registration reports no failtures
+               $test = ($test && !$EXT_REPORTS_FAILTURE);
+
                // Does everthing before wents ok?
                if ($test) {
                        // "Dry-run-mode" activated?