Obsolete parameters removed/rewritten
authorRoland Häder <roland@mxchange.org>
Sun, 15 Nov 2009 20:28:26 +0000 (20:28 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 15 Nov 2009 20:28:26 +0000 (20:28 +0000)
inc/modules/sponsor.php
inc/mysql-manager.php

index 5859a70b1a9b1d69d4a4eceeedf0e5fd4a0a77e3..3e39328c95d9f30b6ddf08ee8c48ea8d2a09cc16 100644 (file)
@@ -67,7 +67,7 @@ $content['header'] = loadTemplate('sponsor_header', true);
 $content['footer'] = loadTemplate('sponsor_footer', true);
 
 // 'You are here' navigation
-$content['you_are_here'] = addMenuDescription('sponsor', getWhat(), false, false);
+$content['you_are_here'] = addMenuDescription('sponsor', getWhat(), true);
 
 // Load main sponsor template
 loadTemplate('sponsor_main', false, $content);
index c9c73e5718505fb6c716136322221c4c54f7b48f..bf3b16b973dd738593a02176c010254269a115e7 100644 (file)
@@ -289,7 +289,7 @@ function checkModulePermissions ($mod = '') {
 }
 
 // Add menu description pending on given file name (without path!)
-function addMenuDescription ($accessLevel, $FQFN, $return = false, $output = true) {
+function addMenuDescription ($accessLevel, $FQFN, $return = false) {
        // Use only filename of the FQFN...
        $file = basename($FQFN);
 
@@ -354,14 +354,7 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false, $output = tru
                $search = substr($search, 0, -4);
        } // END - i
 
-       // Get the title from menu
-       $ret = getTitleFromMenu($accessLevel, $search, $type, $AND);
-
-       // Shall we return it?
-       if ($return === true) {
-               // Return title
-               return $ret;
-       } elseif (((isExtensionInstalledAndNewer('sql_patches', '0.2.3')) && (getConfig('youre_here') == 'Y')) || ((isAdmin()) && ($modCheck == 'admin'))) {
+       if (((isExtensionInstalledAndNewer('sql_patches', '0.2.3')) && (getConfig('youre_here') == 'Y')) || ((isAdmin()) && ($modCheck == 'admin'))) {
                // Output HTML code
                $OUT = $prefix . "<strong><a class=\"you_are_here\" href=\"{?URL?}/modules.php?module=" . $modCheck . '&amp;' . $type . '=' . $search.$LINK_ADD . "\">" . $ret . "</a></strong>\n";
 
@@ -374,18 +367,20 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false, $output = tru
                        $GLOBALS['nav_depth'] = '0';
 
                        // Run the filter chain
-                       $ret = runFilterChain('post_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'content' => ""));
+                       $ret = runFilterChain('post_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'content' => ''));
+
+                       // Add additional content
                        $OUT .= $ret['content'];
                } // END - if
        }
 
        // Return or output HTML code?
-       if ($output === true) {
-               // Output HTML code here
-               outputHtml($OUT);
-       } else {
+       if ($return === true) {
                // Return HTML code
                return $OUT;
+       } else {
+               // Output HTML code here
+               outputHtml($OUT);
        }
 }
 
@@ -1653,7 +1648,7 @@ function generateMetaDescriptionCode ($mod, $what) {
        // Exclude admin and member's area
        if (($mod != 'admin') && ($mod != 'login')) {
                // Construct dynamic description
-               $DESCR = '{?MAIN_TITLE?} '.trim(getConfig('title_middle')) . ' ' . addMenuDescription('guest', 'what-'.$what, true);
+               $DESCR = '{?MAIN_TITLE?} '.trim(getConfig('title_middle')) . ' ' . getTitleFromMenu('guest', $what);
 
                // Output it directly
                outputHtml('<meta name="description" content="' . $DESCR . '" />');