]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions-functions.php
More complete rewrite to use wrapper function isExtensionInstalledAndNewer(), some...
[mailer.git] / inc / extensions-functions.php
index 743f97281f7ba3a345559218d5eba0316139385f..23c4d68bb00c6163fb4c14c0d750a303ef39f2c1 100644 (file)
@@ -939,7 +939,7 @@ function createExtensionDeactivationTask ($ext) {
        $subject = sprintf("[%s:] %s", $ext, getMessage('TASK_SUBJ_EXTENSION_DEACTIVATED'));
 
        // Not installed and do we have created a task for the admin?
-       if ((determineTaskIdBySubject($subject) == '0') && (getExtensionVersion($ext) != '')) {
+       if ((determineTaskIdBySubject($subject) == '0') && (isExtensionInstalled($ext))) {
                // Task not created so add it
                createNewTask($subject, SQL_ESCAPE(loadTemplate('task_ext_deactivated', true, $ext)), 'EXTENSION_DEACTIVATION');
        } // END - if
@@ -965,7 +965,7 @@ function ifModuleHasMenu ($mod, $forceDb = false) {
                        // Admin/guest/member/sponsor modules have always a menu!
                        $ret = in_array($mod, array('admin', 'index', 'login', 'sponsor'));
                }
-       } elseif ((isExtensionInstalled('sql_patches')) && (getExtensionVersion('sql_patches') >= '0.3.6') && ((!isExtensionActive('cache')) || ($forceDb === true))) {
+       } elseif ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && ((!isExtensionActive('cache')) || ($forceDb === true))) {
                // Check database for entry
                $result = SQL_QUERY_ESC("SELECT `has_menu` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module`='%s' LIMIT 1",
                        array($mod), __FUNCTION__, __LINE__);