More fixes, taskId shall be NULL instead '0' everywhere?
authorRoland Häder <roland@mxchange.org>
Tue, 2 Oct 2012 15:12:19 +0000 (15:12 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 2 Oct 2012 15:12:19 +0000 (15:12 +0000)
inc/extensions-functions.php
inc/modules/admin/overview-inc.php

index 022440a79d11d45a60b5bffcea6e415d7c733759..82ed05247adc7c7337eb1dfdab9c11c9ccce1f8d 100644 (file)
@@ -1042,7 +1042,7 @@ 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))) {
+       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 +1079,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
index 97fb5e43642801524dbd376d180ed17eb8fe2072..b2de9123fca6b5d5954acf09c01df3aac92aa45c 100644 (file)
@@ -68,9 +68,10 @@ function outputStandardOverview (&$result_tasks) {
                        $extInstalled = (isExtensionInstalled($ext_name) && (isExtensionActive($ext_name)));
 
                        // Is the extension not yet installed?
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',extInstalled=' . intval($extInstalled));
                        if ($extInstalled === false) {
                                // We maybe want to install an extension so let's test-drive it...
-                               if (loadExtension($ext_name, getExtensionMode(), '0.0.0', true)) {
+                               if (loadExtension($ext_name, 'test', '0.0.0', true)) {
                                        // Create a task for newly installed extension (we ignore the task id here)
                                        createNewExtensionTask($ext_name);
                                } // END - if