]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions.php
Removed all LIMIT x statements from extension removal queries, several minor fixes
[mailer.git] / inc / extensions.php
index 1fd297707c9bc120267ea49e1bb350ff6d5b6714..5e94c32dc37823142f528d7483cdf75ad553820b 100644 (file)
@@ -138,6 +138,21 @@ function EXTENSION_REGISTER ($ext_name, $task_id, $dry_run = false, $logout = tr
        // Is this extension already installed?
        if (EXT_IS_ACTIVE($ext_name)) return false;
 
        // Is this extension already installed?
        if (EXT_IS_ACTIVE($ext_name)) return false;
 
+       // Is the task id zero? Then we need to auto-fix it here
+       if ($task_id == 0) {
+               // Try to find the task
+               $task_id = DETERMINE_EXTENSION_TASK_ID($ext_name);
+
+               // Still zero and not in dry-run?
+               if (($task_id == 0) && (!$dry_run)) {
+                       // Then request a bug report
+                       debug_report_bug(sprintf("%s: task_id is still zero after DETERMINE_EXTENSION_TASK_ID(%s)",
+                               __FUNCTION__,
+                               $ext_name
+                       ));
+               } // END - if
+       } // END - if
+
        // Init queries
        INIT_SQLS();
 
        // Init queries
        INIT_SQLS();