From 8b4478db59f4631cae077d87cc40aa8a56bfba0c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 29 Nov 2009 10:54:23 +0000 Subject: [PATCH] generateMetaDescriptionCode() has now no longer parameters --- inc/functions.php | 17 ++++++++++++++++- inc/mysql-manager.php | 15 --------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index 62aa009248..b61e863c5c 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -3947,7 +3947,7 @@ function loadHtmlHeader () { // Add meta description to header if ((isInstalled()) && (isAdminRegistered()) && (SQL_IS_LINK_UP())) { // Add meta description not in admin and login module and when the script is installed - generateMetaDescriptionCode(getModule(), getWhat()); + generateMetaDescriptionCode(); } // END - if } // END - if @@ -3967,6 +3967,21 @@ function addPageHeaderFooter () { $GLOBALS['output'] = $GLOBALS['page_header'] . $GLOBALS['output'] . $GLOBALS['page_footer']; } +// Generates meta description for current module and 'what' value +function generateMetaDescriptionCode () { + // Only include from guest area + if (getModule() == 'index') { + // Construct dynamic description + $DESCR = '{?MAIN_TITLE?} '.trim(getConfig('title_middle')) . ' ' . getTitleFromMenu('guest', getWhat()); + + // Output it directly + $GLOBALS['page_header'] .= ''; + } // END - if + + // Remove depth + unset($GLOBALS['ref_level']); +} + ////////////////////////////////////////////////// // AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS // ////////////////////////////////////////////////// diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index f6d0955d57..30aa831a00 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -1673,21 +1673,6 @@ WHERE SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", array(bigintval($userid)), __FUNCTION__, __LINE__); } -// Generates meta description for given module and 'what' value -function generateMetaDescriptionCode ($module, $what) { - // Only include from guest area - if ($module == 'index') { - // Construct dynamic description - $DESCR = '{?MAIN_TITLE?} '.trim(getConfig('title_middle')) . ' ' . getTitleFromMenu('guest', $what); - - // Output it directly - $GLOBALS['page_header'] .= ''; - } // END - if - - // Remove depth - unset($GLOBALS['ref_level']); -} - // Gets the matching what name from module function getWhatFromModule ($modCheck) { // Is the request element set? -- 2.30.2