Moved and fixed typo in REDIRECT_ON_UNINSTALLED_EXTENSION()
[mailer.git] / inc / extensions.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&msg=' . getCode('EXTENSION_PROBLEM') . '&ext=' . $ext_name);
+       } // END - if
+}
+
 //
 ?>