From 82c8384907c7abfb877ac2fd57b2d3efa915173b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 2 Oct 2012 15:12:19 +0000 Subject: [PATCH] More fixes, taskId shall be NULL instead '0' everywhere? --- inc/extensions-functions.php | 4 ++-- inc/modules/admin/overview-inc.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index 022440a79d..82ed05247a 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -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 diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php index 97fb5e4364..b2de9123fc 100644 --- a/inc/modules/admin/overview-inc.php +++ b/inc/modules/admin/overview-inc.php @@ -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 -- 2.39.2