]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions-functions.php
Added debug line
[mailer.git] / inc / extensions-functions.php
index 022440a79d11d45a60b5bffcea6e415d7c733759..6495a05b65ad7f22981dc458c0737d16fbc39cd1 100644 (file)
@@ -1042,7 +1042,8 @@ function createNewExtensionTask ($ext_name) {
        $taskId = determineTaskIdBySubject($subject);
 
        // Not installed and do we have created a task for the admin?
-       if (($taskId == '0') && (!isExtensionInstalled($ext_name))) {
+       /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',taskId[' . gettype($taskId) . ']=' . $taskId);
+       if (((is_null($taskId)) || ($taskId == '0')) && (!isExtensionInstalled($ext_name))) {
                // Set default message if ext-foo is missing
                $message = '{%message,ADMIN_EXTENSION_TEXT_FILE_MISSING=' . $ext_name . '%}';
 
@@ -1079,7 +1080,7 @@ function createExtensionDeactivationTask ($ext_name) {
        $taskId = determineTaskIdBySubject($subject);
 
        // Not installed and do we have created a task for the admin?
-       if (($taskId == '0') && (isExtensionInstalled($ext_name))) {
+       if (((is_null($taskId)) || ($taskId == '0')) && (isExtensionInstalled($ext_name))) {
                // Task not created so add it
                $taskId = createNewTask($subject, SQL_ESCAPE(loadTemplate('task_EXTENSION_deactivated', true, $ext_name)), 'EXTENSION_DEACTIVATION');
        } // END - if