]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions-functions.php
Module-related code moved, deprecated templates deleted, internals stats are now...
[mailer.git] / inc / extensions-functions.php
index 109b30f1d282eb4704cc630e91db582d1a01091f..44a8ea04f1435c2b91450384b8e4cecb2818f7b2 100644 (file)
@@ -1017,57 +1017,6 @@ function createExtensionDeactivationTask ($ext_name) {
        return $taskId;
 }
 
-// Checks if the module has a menu
-function ifModuleHasMenu ($mod, $forceDb = false) {
-       // All is false by default
-       $ret = false;
-
-       // Extension installed and newer than or has version 0.1.2?
-       if (isExtensionInstalledAndNewer('cache', '0.1.2')) {
-               // Cache version is okay, so let's check the cache!
-               if (isset($GLOBALS['cache_array']['modules']['has_menu'][$mod])) {
-                       // Check module cache and count hit
-                       $ret = ($GLOBALS['cache_array']['modules']['has_menu'][$mod] == 'Y');
-                       incrementStatsEntry('cache_hits');
-               } elseif (isset($GLOBALS['cache_array']['extension']['ext_menu'][$mod])) {
-                       // Check cache and count hit
-                       $ret = ($GLOBALS['cache_array']['extension']['ext_menu'][$mod] == 'Y');
-                       incrementStatsEntry('cache_hits');
-               } else {
-                       // Admin/guest/member/sponsor modules have always a menu!
-                       $ret = in_array($mod, array('admin', 'index', 'login', 'sponsor'));
-               }
-       } 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__);
-
-               // Entry found?
-               if (SQL_NUMROWS($result) == 1) {
-                       // Load "has_menu" column
-                       $data = SQL_FETCHARRAY($result);
-
-                       // Fake cache... ;-)
-                       $GLOBALS['cache_array']['extension']['ext_menu'][$mod] = $data['has_menu'];
-
-                       // Does it have a menu?
-                       $ret = ($data['has_menu'] == 'Y');
-               } // END  - if
-
-               // Free memory
-               SQL_FREERESULT($result);
-       } elseif (!isExtensionInstalled('sql_patches')) {
-               // No sql_patches installed, so maybe in admin/guest/member/sponsor area or no admin registered?
-               $ret = in_array($mod, array('admin', 'index', 'login', 'sponsor')); // Then there is a menu!
-       } else {
-               // Unsupported state!
-               logDebugMessage(__FUNCTION__, __LINE__, 'This should never be reached.');
-       }
-
-       // Return status
-       return $ret;
-}
-
 // Determines the task id for given extension
 function determineExtensionTaskId ($ext_name) {
        // Default is not found