]> git.mxchange.org Git - mailer.git/commitdiff
Moved and fixed typo in REDIRECT_ON_UNINSTALLED_EXTENSION()
authorRoland Häder <roland@mxchange.org>
Thu, 26 Mar 2009 07:26:59 +0000 (07:26 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 26 Mar 2009 07:26:59 +0000 (07:26 +0000)
inc/extensions.php
inc/functions.php
mailid_top.php

index 2f89c57450bba192a7ebd7bf58f58c8362a27ceb..8f1e65b4ab2b301e27b026ea55fed3207913f256 100644 (file)
@@ -1236,5 +1236,14 @@ function EXT_GET_REMOVAL_LIST () {
        return $GLOBALS['ext_update_remove'];
 }
 
+// Redirects if the provided extension is not installed
+function REDIRECT_ON_UNINSTALLED_EXTENSION ($ext_name) {
+       // So is the extension there?
+       if (!EXT_IS_ACTIVE($ext_name)) {
+               // Redirect to index
+               LOAD_URL('modules.php?module=index&amp;msg=' . getCode('EXTENSION_PROBLEM') . '&amp;ext=' . $ext_name);
+       } // END - if
+}
+
 //
 ?>
index 8c8d7e15bdba31c04a8f5f8a73e2b16f948daea6..d96e2dbf60f3bc90cae02d3b6edc12a32aaa5c70 100644 (file)
@@ -2826,16 +2826,6 @@ function convertCodeToMessage ($code) {
        return $msg;
 }
 
-// Checks wether the given extension is currently not installed
-// and redirects if so.
-function REDIRCT_ON_UNINSTALLED_EXTENSION ($ext_name) {
-       // Is the extension uninstalled/inactive?
-       if (!EXT_IS_ACTIVE($ext_name)) {
-               // Redirect to index
-               LOAD_URL('modules.php?module=index&amp;msg=' . getCode('EXTENSION_PROBLEM') . '&amp;ext=' . $ext_name);
-       } // END - if
-}
-
 // Generate a "link" for the given admin id (aid)
 function GENERATE_AID_LINK ($aid) {
        // No assigned admin is default
index 04f65fbea750cd390375a00d9c46b087e1ca957a..7e4f9a2f4084d89d5d63c29e89d3fa00c68206e1 100644 (file)
@@ -52,10 +52,7 @@ require('inc/config.php');
 
 if (isInstalled()) {
        // Is the extension active
-       if (!EXT_IS_ACTIVE('mailid', true)) {
-               // Is not activated/installed yet!
-               addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'mailid');
-       } // END - if
+       REDIRECT_ON_UNINSTALLED_EXTENSION('mailid');
 
        // Secure all data
        $url_uid = 0; $url_bid = 0; $url_mid = 0; $code = 0; $mode = '';