From: Roland Häder Date: Thu, 1 Jul 2010 01:47:07 +0000 (+0000) Subject: API functions renamed: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c72268213d4d4829d845d39c101bb08fbe4ed79a;p=mailer.git API functions renamed: - getOutputMode() is now known as getScriptOutputMode() - getCachedOutputMode() is now known as getOutputMode() - This solves a conflict shown in previous commit --- diff --git a/inc/classes/cachesystem.class.php b/inc/classes/cachesystem.class.php index 4776a89ed1..63d458b082 100644 --- a/inc/classes/cachesystem.class.php +++ b/inc/classes/cachesystem.class.php @@ -282,11 +282,11 @@ class CacheSystem { // Is the cache file not yet rebuilt? if ((!isset($this->rebuilt[$this->name])) && ($this->isCacheReadable())) { // Only run in regular output mode - if ((getOutputMode() != 0) && ($force === false)) { + if ((getScriptOutputMode() != 0) && ($force === false)) { // Debug message if allowed if (isDebugModeEnabled()) { // Debug message - logDebugMessage(__METHOD__, __LINE__, 'Not removing cache ' . $this->name . ' in output_mode=' . getOutputMode()); + logDebugMessage(__METHOD__, __LINE__, 'Not removing cache ' . $this->name . ' in output_mode=' . getScriptOutputMode()); } // END - if // Abort here diff --git a/inc/config-functions.php b/inc/config-functions.php index b81e1633ae..55d530bc89 100644 --- a/inc/config-functions.php +++ b/inc/config-functions.php @@ -278,7 +278,7 @@ function updateOldConfigFile () { // Update config entries function updateConfiguration ($entries, $values, $updateMode='', $config = '0') { // Do not update config in CSS mode - if ((getOutputMode() == 1) || (getOutputMode() == -1) || (isInstallationPhase())) { + if ((getScriptOutputMode() == 1) || (getScriptOutputMode() == -1) || (isInstallationPhase())) { return; } // END - if diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index b079a48e5a..13dc80bb44 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -101,7 +101,7 @@ function SQL_QUERY ($sqlString, $F, $L) { incrementConfigEntry('sql_count'); // Debug output - if ((getOutputMode() != 1) && (isDebugModeEnabled()) && (isSqlDebuggingEnabled())) { + if ((getScriptOutputMode() != 1) && (isDebugModeEnabled()) && (isSqlDebuggingEnabled())) { // // Debugging stuff... // diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index a680cc1487..ee5ff4908f 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -125,7 +125,7 @@ function loadExtension ($ext_name, $ext_mode = 'init', $ext_ver = '', $dry_run = // Download functions file loadIncludeOnce($funcsInclude); } // END - if - } elseif ((!isset($GLOBALS['cache_array']['extension']['ext_func'][$ext_name])) && (isDebugModeEnabled()) && (getOutputMode() == '0') && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme') && (getExtensionMode() == 'test')) { + } elseif ((!isset($GLOBALS['cache_array']['extension']['ext_func'][$ext_name])) && (isDebugModeEnabled()) && (getScriptOutputMode() == '0') && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme') && (getExtensionMode() == 'test')) { // No functions file is not so good... logDebugMessage(__FUNCTION__, __LINE__, sprintf("NOTICE: Extension %s has no own functions file or we cannot read from it. mode=%s", $ext_name, @@ -593,7 +593,7 @@ function getExtensionVersion ($ext_name, $force = false) { // Count cache hits incrementStatsEntry('cache_hits'); - } elseif ((!isCacheInstanceValid()) || (isset($GLOBALS['cache_array']['extension'])) || (getOutputMode() != 0)) { + } elseif ((!isCacheInstanceValid()) || (isset($GLOBALS['cache_array']['extension'])) || (getScriptOutputMode() != 0)) { // Load from database $result = SQL_QUERY_ESC("SELECT `ext_version` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_name`='%s' LIMIT 1", array($ext_name), __FUNCTION__, __LINE__); diff --git a/inc/extensions/ext-rallye.php b/inc/extensions/ext-rallye.php index a4997d35b3..44f1fb1e77 100644 --- a/inc/extensions/ext-rallye.php +++ b/inc/extensions/ext-rallye.php @@ -329,7 +329,7 @@ Zudem sollten Sie mindestens folgende Templates (in templates/".getLangu case 'init': // Do stuff when extension is initialized // Do stuff only when not in CSS mode // @TODO Move this code into rallye_functions.php - if (getOutputMode() != 1) { + if (getScriptOutputMode() != 1) { // Get total member count $total = getTotalConfirmedUser(); diff --git a/inc/filters.php b/inc/filters.php index a470fa1275..5dd7d69990 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -452,7 +452,7 @@ function FILTER_COMPILE_EXPRESSION_CODE ($code) { //* DEBUG: */ debugOutput(__FUNCTION__.'['.__LINE__.']:
'.print_r($matches, true).'
'); // Default is from outputHtml() - $outputMode = getOutputMode(); + $outputMode = getScriptOutputMode(); // Some entries found? if ((count($matches) > 0) && (count($matches[3]) > 0)) { @@ -510,7 +510,7 @@ function FILTER_COMPILE_EXPRESSION_CODE ($code) { } // END - if // Do we have non-HTML mode? - if ((getOutputMode() != '0') || ($outputMode != '0')) $code = decodeEntities($code); + if ((getScriptOutputMode() != '0') || ($outputMode != '0')) $code = decodeEntities($code); // Return compiled code //* DEBUG: */ debugOutput(__FUNCTION__.'['.__LINE__.']:
'.($code).'
'); @@ -534,7 +534,7 @@ function FILTER_UPDATE_EXTENSION_DATA ($ext_name) { // Load more reset scripts function FILTER_RUN_RESET_INCLUDES () { // Is the reset set or old sql_patches? - if (((!isResetModeEnabled()) || (!isExtensionInstalled('sql_patches'))) && (getOutputMode() == '0')) { + if (((!isResetModeEnabled()) || (!isExtensionInstalled('sql_patches'))) && (getScriptOutputMode() == '0')) { // Then abort here debug_report_bug(__FUNCTION__, __LINE__, 'Cannot run reset! enabled='.intval(isResetModeEnabled()).',ext='.intval(isExtensionInstalled('sql_patches')).' Please report this bug. Thanks'); } // END - if @@ -624,14 +624,14 @@ function FILTER_DETERMINE_WHAT_ACTION () { } // END - if // Get all values - if ((getOutputMode() != 1) && (getOutputMode() != -1)) { + if ((getScriptOutputMode() != 1) && (getScriptOutputMode() != -1)) { // Fix module if (!isModuleSet()) { // Is the request element set? if (isGetRequestParameterSet('module')) { // Set module from request setModule(getRequestParameter('module')); - } elseif (getOutputMode() == '0') { + } elseif (getScriptOutputMode() == '0') { // Set default module 'index' setModule('index'); } else { @@ -653,7 +653,7 @@ function FILTER_DETERMINE_WHAT_ACTION () { // Set default 'what' value //* DEBUG: */ debugOutput('-' . getModule() . '/' . getWhat() . '-'); - if ((!isWhatSet()) && (!isActionSet()) && (getOutputMode() != 1) && (getOutputMode() != -1)) { + if ((!isWhatSet()) && (!isActionSet()) && (getScriptOutputMode() != 1) && (getScriptOutputMode() != -1)) { if (getModule() == 'admin') { // Set 'action' value to 'login' in admin menu setAction(getActionFromModuleWhat(getModule(), getWhat())); @@ -670,7 +670,7 @@ function FILTER_DETERMINE_WHAT_ACTION () { // Sends out pooled mails function FILTER_TRIGGER_SENDING_POOL () { // Are we in normal output mode? - if (getOutputMode() != 0) { + if (getScriptOutputMode() != 0) { // Only in normal output mode to prevent race-conditons! } // END - if @@ -708,7 +708,7 @@ function FILTER_RUN_DAILY_RESET () { if ((isInstallationPhase()) || (!isInstalled()) || (!isAdminRegistered()) || (!isExtensionInstalled('sql_patches'))) return; // Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D - if (((getDay(getConfig('last_update')) != getDay()) || ((isConfigEntrySet('DEBUG_RESET')) && (getConfig('DEBUG_RESET') == 'Y'))) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestParameterSet('register')) && (getOutputMode() != 1)) { + if (((getDay(getConfig('last_update')) != getDay()) || ((isConfigEntrySet('DEBUG_RESET')) && (getConfig('DEBUG_RESET') == 'Y'))) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestParameterSet('register')) && (getScriptOutputMode() != 1)) { // Tell every module we are in reset-mode! doReset(); } // END - if @@ -770,7 +770,7 @@ function FILTER_COUNT_MODULE () { // Handles fatal errors function FILTER_HANDLE_FATAL_ERRORS () { // Do we have errors to handle and right output mode? - if ((!ifFatalErrorsDetected()) || (getOutputMode() != '0')) { + if ((!ifFatalErrorsDetected()) || (getScriptOutputMode() != '0')) { // Abort executing here return false; } // END - if @@ -871,7 +871,7 @@ function FILTER_DISPLAY_COPYRIGHT () { function FILTER_DISPLAY_PARSING_TIME () { // Shall we display the parsing time and number of queries? // 1234 5 54 4 5 5 4 4 5 543 3 4432 2 33 2 2 21 - if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestParameterSet('frame'))) || (isInstallationPhase())) && (getOutputMode() == '0') && ($GLOBALS['header_sent'] == 2)) { + if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestParameterSet('frame'))) || (isInstallationPhase())) && (getScriptOutputMode() == '0') && ($GLOBALS['header_sent'] == 2)) { // Then display it here displayParsingTime(); } // END - if diff --git a/inc/footer.php b/inc/footer.php index a9bf76f5fe..7d8b93402e 100644 --- a/inc/footer.php +++ b/inc/footer.php @@ -47,7 +47,7 @@ $GLOBALS['page_footer'] = ''; // Footer disabled or already sent? // 1234 5 54 45 5 5 543 3 321 -if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != 1) && ($GLOBALS['footer_sent'] != 2))) && (getOutputMode() != 1))) { +if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != 1) && ($GLOBALS['footer_sent'] != 2))) && (getScriptOutputMode() != 1))) { // Run the filter, sweet huh? runFilterChain('page_footer'); diff --git a/inc/functions.php b/inc/functions.php index a81f011107..fbfc362017 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1902,7 +1902,7 @@ function addNewBonusMail ($data, $mode = '', $output=true) { // Determines referal id and sets it function determineReferalId () { // Skip this in non-html-mode and outside ref.php - if ((getOutputMode() != 0) && (basename($_SERVER['PHP_SELF']) != 'ref.php')) return false; + if ((getScriptOutputMode() != 0) && (basename($_SERVER['PHP_SELF']) != 'ref.php')) return false; // Check if refid is set if ((isset($GLOBALS['refid'])) && ($GLOBALS['refid'] > 0)) { @@ -2265,7 +2265,7 @@ function getModuleFromFileName ($file, $accessLevel) { // Encodes an URL for adding session id, etc. function encodeUrl ($url, $outputMode = '0') { // Do we have already have a PHPSESSID inside or view.php is called? Then abort here - if ((strpos($url, session_name()) !== false) || (getOutputMode() == -3)) return $url; + if ((strpos($url, session_name()) !== false) || (getScriptOutputMode() == -3)) return $url; // Do we have a valid session? if (((!isset($GLOBALS['valid_session'])) || ($GLOBALS['valid_session'] === false) || (!isset($_COOKIE[session_name()]))) && (isSpider() === false)) { @@ -2275,7 +2275,7 @@ function encodeUrl ($url, $outputMode = '0') { if (strpos($url, '?') === false) { // No question mark $seperator = '?'; - } elseif ((getOutputMode() != '0') || ($outputMode != '0')) { + } elseif ((getScriptOutputMode() != '0') || ($outputMode != '0')) { // Non-HTML mode $seperator = '&'; } diff --git a/inc/header.php b/inc/header.php index 0313f88583..785ddd8ebb 100644 --- a/inc/header.php +++ b/inc/header.php @@ -53,7 +53,7 @@ if (($GLOBALS['header_sent'] != 1) && ($GLOBALS['header_sent'] != 2)) { setHttpStatus('200 OK'); // If not in CSS mode generate the header - if (getOutputMode() != 1) { + if (getScriptOutputMode() != 1) { // Prepare the header for HTML output loadHtmlHeader(); } // END - if @@ -63,7 +63,7 @@ if (($GLOBALS['header_sent'] != 1) && ($GLOBALS['header_sent'] != 2)) { } // END - if // Add BODY tag or not? -if ((getOutputMode() != 1) && (getOutputMode() != -1) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestParameterSet('frame')))) { +if ((getScriptOutputMode() != 1) && (getScriptOutputMode() != -1) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestParameterSet('frame')))) { loadTemplate('page_body'); $GLOBALS['header_sent'] = 2; } // END - if diff --git a/inc/language-functions.php b/inc/language-functions.php index 5e22760134..303fa09d11 100644 --- a/inc/language-functions.php +++ b/inc/language-functions.php @@ -192,7 +192,7 @@ function loadLanguageFile ($ext_name = 'none') { if (isLanguageIncludeReadable($ext_name)) { // Load language file loadLanguageInclude($ext_name); - } elseif ((isDebugModeEnabled()) && (getOutputMode() == '0') && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) { + } elseif ((isDebugModeEnabled()) && (getScriptOutputMode() == '0') && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) { // No language file is not so good... logDebugMessage(__FUNCTION__, __LINE__, sprintf("NOTICE: Extension %s has no language file or we cannot read from it. lang=%s, mode=%s", $ext_name, diff --git a/inc/libs/theme_functions.php b/inc/libs/theme_functions.php index a6f61c9a37..895ef86bf2 100644 --- a/inc/libs/theme_functions.php +++ b/inc/libs/theme_functions.php @@ -242,7 +242,7 @@ function getActualTheme () { // Fix it to default $ret = 'default'; } // END - if - } elseif ((!isInstalled()) && ((isInstalling()) || (getOutputMode() == true)) && ((isGetRequestParameterSet('theme')) || (isPostRequestParameterSet('theme')))) { + } elseif ((!isInstalled()) && ((isInstalling()) || (getScriptOutputMode() == true)) && ((isGetRequestParameterSet('theme')) || (isPostRequestParameterSet('theme')))) { // Prepare filename for checking $themeFile = sprintf("theme/%s/theme.php", getRequestParameter('theme')); diff --git a/inc/loader/load_cache-admin.php b/inc/loader/load_cache-admin.php index ec2a54626b..33d00a3a89 100644 --- a/inc/loader/load_cache-admin.php +++ b/inc/loader/load_cache-admin.php @@ -83,7 +83,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('admin')) && ($GLOBALS['cache_ins $GLOBALS['cache_instance']->removeCacheFile(); unset($GLOBALS['cache_array']['admin']); } -} elseif (getOutputMode() != 1) { +} elseif (getScriptOutputMode() != 1) { // Create cache file $GLOBALS['cache_instance']->init(); @@ -116,7 +116,7 @@ if (isExtensionInstalledAndNewer('admins', '0.3')) { if (($GLOBALS['cache_instance']->loadCacheFile('admin_acls')) && ($GLOBALS['cache_instance']->extensionVersionMatches('admins'))) { // Load referal system from cache $GLOBALS['cache_array']['admin_acls'] = $GLOBALS['cache_instance']->getArrayFromCache(); - } elseif (getOutputMode() != 1) { + } elseif (getScriptOutputMode() != 1) { // Create cache file here $GLOBALS['cache_instance']->init(); diff --git a/inc/loader/load_cache-config.php b/inc/loader/load_cache-config.php index fd16f1206f..952110fa9b 100644 --- a/inc/loader/load_cache-config.php +++ b/inc/loader/load_cache-config.php @@ -60,7 +60,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('config')) && ($GLOBALS['cache_in // Remove dummy array unset($config); -} elseif (getOutputMode() != 1) { +} elseif (getScriptOutputMode() != 1) { // Create cache file here $GLOBALS['cache_instance']->init(); diff --git a/inc/loader/load_cache-extension.php b/inc/loader/load_cache-extension.php index 95dd73c7bf..cb0b30589d 100644 --- a/inc/loader/load_cache-extension.php +++ b/inc/loader/load_cache-extension.php @@ -132,7 +132,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('extension')) && ($GLOBALS['cache // Remove array and mark cache as loaded unset($EXT_POOL); -} elseif (getOutputMode() != 1) { +} elseif (getScriptOutputMode() != 1) { // Create cache file here $GLOBALS['cache_instance']->init(); diff --git a/inc/loader/load_cache-filter.php b/inc/loader/load_cache-filter.php index 300bdd64f9..f809685817 100644 --- a/inc/loader/load_cache-filter.php +++ b/inc/loader/load_cache-filter.php @@ -52,7 +52,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('filter')) && ($GLOBALS['cache_in // Prepare the array here prepareFilterArray(); -} elseif ((getOutputMode() != 1) && (isExtensionInstalled('sql_patches'))) { +} elseif ((getScriptOutputMode() != 1) && (isExtensionInstalled('sql_patches'))) { // Create cache file here $GLOBALS['cache_instance']->init(); diff --git a/inc/loader/load_cache-impressum.php b/inc/loader/load_cache-impressum.php index ccdf5901d8..1e448562ab 100644 --- a/inc/loader/load_cache-impressum.php +++ b/inc/loader/load_cache-impressum.php @@ -52,7 +52,7 @@ if (isInstallationPhase()) return; if (($GLOBALS['cache_instance']->loadCacheFile('imprint')) && ($GLOBALS['cache_instance']->extensionVersionMatches('imprint'))) { // Load cache $GLOBALS['cache_array']['imprint'] = $GLOBALS['cache_instance']->getArrayFromCache(); -} elseif (getOutputMode() != 1) { +} elseif (getScriptOutputMode() != 1) { // Create cache file $GLOBALS['cache_instance']->init(); diff --git a/inc/loader/load_cache-modules.php b/inc/loader/load_cache-modules.php index b572a183d7..f0f48d8326 100644 --- a/inc/loader/load_cache-modules.php +++ b/inc/loader/load_cache-modules.php @@ -86,7 +86,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i } // END - foreach } // END - foreach unset($modArray); -} elseif (getOutputMode() != 1) { +} elseif (getScriptOutputMode() != 1) { // Create cache file here $GLOBALS['cache_instance']->init(); diff --git a/inc/loader/load_cache-refdepths.php b/inc/loader/load_cache-refdepths.php index 010c51066e..f4a8c2180b 100644 --- a/inc/loader/load_cache-refdepths.php +++ b/inc/loader/load_cache-refdepths.php @@ -49,7 +49,7 @@ if (isInstallationPhase()) return; if (($GLOBALS['cache_instance']->loadCacheFile('refdepths')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { // Load referal system from cache $GLOBALS['cache_array']['refdepths'] = $GLOBALS['cache_instance']->getArrayFromCache(); -} elseif (getOutputMode() != 1) { +} elseif (getScriptOutputMode() != 1) { // Create cache file here $GLOBALS['cache_instance']->init(); diff --git a/inc/loader/load_cache-refsystem.php b/inc/loader/load_cache-refsystem.php index 76f709d07b..049a8d8143 100644 --- a/inc/loader/load_cache-refsystem.php +++ b/inc/loader/load_cache-refsystem.php @@ -49,7 +49,7 @@ if (isInstallationPhase()) return; if (($GLOBALS['cache_instance']->loadCacheFile('refsystem')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { // Load referal system from cache $GLOBALS['cache_array']['refsystem'] = $GLOBALS['cache_instance']->getArrayFromCache(); -} elseif (getOutputMode() != 1) { +} elseif (getScriptOutputMode() != 1) { // Create cache file here $GLOBALS['cache_instance']->init(); diff --git a/inc/loader/load_cache-revision.php b/inc/loader/load_cache-revision.php index 260b928919..c6322d567a 100644 --- a/inc/loader/load_cache-revision.php +++ b/inc/loader/load_cache-revision.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { if ($GLOBALS['cache_instance']->loadCacheFile('revision')) { // Load revision from cache $GLOBALS['cache_array']['revision'] = $GLOBALS['cache_instance']->getArrayFromCache(); -} elseif ((getOutputMode() != 1)) { +} elseif ((getScriptOutputMode() != 1)) { // Create cache file here $GLOBALS['cache_instance']->init(); diff --git a/inc/loader/load_cache-them.php b/inc/loader/load_cache-them.php index ad4766dfbd..3400831d45 100644 --- a/inc/loader/load_cache-them.php +++ b/inc/loader/load_cache-them.php @@ -72,7 +72,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('themes')) && ($GLOBALS['cache_in // Remove dummy array unset($cache); -} elseif (getOutputMode() != 1) { +} elseif (getScriptOutputMode() != 1) { // Create cache file here $GLOBALS['cache_instance']->init(); diff --git a/inc/mails/_mails.php b/inc/mails/_mails.php index df6dd791bc..47136caee4 100644 --- a/inc/mails/_mails.php +++ b/inc/mails/_mails.php @@ -45,7 +45,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode -if (getOutputMode() != 0) return; +if (getScriptOutputMode() != 0) return; // [EOF] ?> diff --git a/inc/mails/beg_mails.php b/inc/mails/beg_mails.php index 148404fff0..cb5fc1c283 100644 --- a/inc/mails/beg_mails.php +++ b/inc/mails/beg_mails.php @@ -45,7 +45,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode -if (getOutputMode() != 0) return; +if (getScriptOutputMode() != 0) return; // Create timemark from saved month $mark = mktime(0, 0, 0, getConfig('last_month'), getDay(), getYear()); diff --git a/inc/mails/bonus_mails.php b/inc/mails/bonus_mails.php index 84f30688dc..7696dbf933 100644 --- a/inc/mails/bonus_mails.php +++ b/inc/mails/bonus_mails.php @@ -45,7 +45,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode -if (getOutputMode() != 0) return; +if (getScriptOutputMode() != 0) return; // Create timemark from saved month $mark = mktime(0, 0, 0, getConfig('last_month'), getDay(), getYear()); diff --git a/inc/mails/doubler_mails.php b/inc/mails/doubler_mails.php index 10d2b4e4ec..d5259c3c28 100644 --- a/inc/mails/doubler_mails.php +++ b/inc/mails/doubler_mails.php @@ -45,7 +45,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode -if (getOutputMode() != 0) return; +if (getScriptOutputMode() != 0) return; // Initialize variables $jackpotPoints = '0'; $userPoints = '0'; diff --git a/inc/module-functions.php b/inc/module-functions.php index 98eb9c1b46..7918a233e8 100644 --- a/inc/module-functions.php +++ b/inc/module-functions.php @@ -230,7 +230,7 @@ function checkModulePermissions ($module = '') { // Destroy cache here // @TODO Rewrite this to a filter - if ((getOutputMode() == '0') || (getOutputMode() == -1)) rebuildCache('modules', 'modules'); + if ((getScriptOutputMode() == '0') || (getScriptOutputMode() == -1)) rebuildCache('modules', 'modules'); // And reload data unset($GLOBALS['module_status'][$module]); @@ -239,7 +239,7 @@ function checkModulePermissions ($module = '') { // Module not found we don't add it to the database $ret = '404'; } - } elseif (($ret == 'cache_miss') && (getOutputMode() == '0')) { + } elseif (($ret == 'cache_miss') && (getScriptOutputMode() == '0')) { // Rebuild the cache files rebuildCache('modules', 'modules'); } elseif ($found === false) { @@ -251,7 +251,7 @@ function checkModulePermissions ($module = '') { $data['hidden'], $data['mem_only'], $data['admin_only'], - getOutputMode() + getScriptOutputMode() )); } diff --git a/inc/monthly/monthly_beg.php b/inc/monthly/monthly_beg.php index 2e664ec27b..1bdd5295ac 100644 --- a/inc/monthly/monthly_beg.php +++ b/inc/monthly/monthly_beg.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() == 1) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() == 1) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif ((!isExtensionActive('beg')) || (getConfig('beg_rallye') != 'Y')) { @@ -52,7 +52,7 @@ if (!defined('__SECURITY')) { $curr = getMonth(); // Check if month is done -if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getConfig('beg_ranks') > 0) && (getOutputMode() != 1)) { +if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getConfig('beg_ranks') > 0) && (getScriptOutputMode() != 1)) { // Extension 'autopurge' is inactive or purging of inactive accounts is deactivated $whereStatement1 = ''; diff --git a/inc/monthly/monthly_bonus.php b/inc/monthly/monthly_bonus.php index 14640c1a2b..7ad2c9fdd6 100644 --- a/inc/monthly/monthly_bonus.php +++ b/inc/monthly/monthly_bonus.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() == 1) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() == 1) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif (!isExtensionActive('bonus')) { @@ -51,7 +51,7 @@ if (!defined('__SECURITY')) { // Get current month (2 digits) $curr = getMonth(); -if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && (getOutputMode() != 1)) { +if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && (getScriptOutputMode() != 1)) { // Extension 'autopurge' is inactive or purging of inactive accounts is deactivated $whereStatement1 = "WHERE `status`='CONFIRMED'"; diff --git a/inc/monthly/monthly_newsletter.php b/inc/monthly/monthly_newsletter.php index 6527461b32..8c36f32bc3 100644 --- a/inc/monthly/monthly_newsletter.php +++ b/inc/monthly/monthly_newsletter.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() == 1) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() == 1) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif (!isExtensionActive('newsletter')) { diff --git a/inc/monthly/monthly_surfbar.php b/inc/monthly/monthly_surfbar.php index 9e886c67d0..1d95e5bca6 100644 --- a/inc/monthly/monthly_surfbar.php +++ b/inc/monthly/monthly_surfbar.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() == 1) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() == 1) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif (!isExtensionActive('surfbar')) { diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index 82e55ff719..e18c8cec12 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -140,7 +140,7 @@ if ((!isInstalling()) && (!isInstallationPhase())) { setConfigEntry('OUTPUT_MODE', 'direct'); // This hack prevents a backtrace in CSS output - if (getOutputMode() == 1) { + if (getScriptOutputMode() == 1) { // Problem with config so set output mode setConfigEntry('OUTPUT_MODE', 'render'); } // END - if @@ -161,7 +161,7 @@ if ((!isInstalling()) && (!isInstallationPhase())) { runFilterChain('init'); // Are we installation routine? - if ((!isInstalling()) && (getOutputMode() != 1) && (getOutputMode() != -1)) { + if ((!isInstalling()) && (getScriptOutputMode() != 1) && (getScriptOutputMode() != -1)) { // You have to install first! redirectToUrl('install.php'); } // END - if diff --git a/inc/reset/reset_100_bonus.php b/inc/reset/reset_100_bonus.php index 7b480c1eaf..523df6bf0d 100644 --- a/inc/reset/reset_100_bonus.php +++ b/inc/reset/reset_100_bonus.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() != 0) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif (!isExtensionActive('bonus')) { diff --git a/inc/reset/reset_autopurge.php b/inc/reset/reset_autopurge.php index 586dfbb4b6..6598d56c53 100644 --- a/inc/reset/reset_autopurge.php +++ b/inc/reset/reset_autopurge.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() != 0) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif (!isExtensionActive('autopurge')) { diff --git a/inc/reset/reset_beg.php b/inc/reset/reset_beg.php index 6a28959a95..b5b7fda7ed 100644 --- a/inc/reset/reset_beg.php +++ b/inc/reset/reset_beg.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() != 0) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif ((!isExtensionActive('beg')) || (getConfig('beg_rallye') == 'Y')) { diff --git a/inc/reset/reset_birthday.php b/inc/reset/reset_birthday.php index 493e9ee43c..9f02208566 100644 --- a/inc/reset/reset_birthday.php +++ b/inc/reset/reset_birthday.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() != 0) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode return; } elseif (!isExtensionActive('birthday')) { diff --git a/inc/reset/reset_bonus.php b/inc/reset/reset_bonus.php index 9a5d8a77f1..f57a665cf6 100644 --- a/inc/reset/reset_bonus.php +++ b/inc/reset/reset_bonus.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() != 0) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif (!isExtensionActive('bonus')) { diff --git a/inc/reset/reset_daily.php b/inc/reset/reset_daily.php index 2694fb51aa..371b4c4ecf 100644 --- a/inc/reset/reset_daily.php +++ b/inc/reset/reset_daily.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() != 0) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif (!isExtensionActive('sql_patches')) { diff --git a/inc/reset/reset_doubler.php b/inc/reset/reset_doubler.php index a31687289d..64e6348a4a 100644 --- a/inc/reset/reset_doubler.php +++ b/inc/reset/reset_doubler.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() != 0) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif ((!isExtensionActive('doubler')) || (getConfig('doubler_send_mode') != 'RESET')) { diff --git a/inc/reset/reset_engine.php b/inc/reset/reset_engine.php index 096c96b791..be1eb1b9ea 100644 --- a/inc/reset/reset_engine.php +++ b/inc/reset/reset_engine.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() != 0) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif (!isExtensionActive('engine')) { diff --git a/inc/reset/reset_holiday.php b/inc/reset/reset_holiday.php index 62afa6a80e..6e7116e2c1 100644 --- a/inc/reset/reset_holiday.php +++ b/inc/reset/reset_holiday.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() != 0) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == 'RESET'))) { +} elseif ((getScriptOutputMode() != 0) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == 'RESET'))) { // Do not execute when script is in CSS mode or no daily reset return; } elseif (!isExtensionActive('holiday')) { diff --git a/inc/reset/reset_profile.php b/inc/reset/reset_profile.php index efb8658339..5cfe43e12e 100644 --- a/inc/reset/reset_profile.php +++ b/inc/reset/reset_profile.php @@ -41,7 +41,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() != 0) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif (!isExtensionActive('profile')) { diff --git a/inc/reset/reset_surfbar.php b/inc/reset/reset_surfbar.php index 06161fbeb2..73cb3ac473 100644 --- a/inc/reset/reset_surfbar.php +++ b/inc/reset/reset_surfbar.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() != 0) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif (!isExtensionActive('surfbar')) { diff --git a/inc/reset/reset_yoomedia.php b/inc/reset/reset_yoomedia.php index bfd494ff9e..65f1fb165e 100644 --- a/inc/reset/reset_yoomedia.php +++ b/inc/reset/reset_yoomedia.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() != 0) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif (!isExtensionActive('yoomedia')) { diff --git a/inc/session-functions.php b/inc/session-functions.php index 4928f80f08..4bb1253503 100644 --- a/inc/session-functions.php +++ b/inc/session-functions.php @@ -45,7 +45,7 @@ if (!defined('__SECURITY')) { // Unset/set session variables function setSession ($var, $value) { // Abort in CSS mode here - if (getOutputMode() == 1) return true; + if (getScriptOutputMode() == 1) return true; // Trim value and session variable $var = trim(secureString($var)); $value = trim($value); diff --git a/inc/stylesheet.php b/inc/stylesheet.php index 644ff0c607..c8c0565234 100644 --- a/inc/stylesheet.php +++ b/inc/stylesheet.php @@ -54,7 +54,7 @@ if ((isInstallationPhase())) $stylesList[] = 'install.css'; if (!isConfigEntrySet('css_php')) setConfigEntry('css_php', 'FILE'); // Output CSS files or content or link to css.php ? -if ((getOutputMode() == 1) || (getConfig('css_php') == 'DIRECT')) { +if ((getScriptOutputMode() == 1) || (getConfig('css_php') == 'DIRECT')) { // Load CSS files $stylesList = merge_array($stylesList, getExtensionCssFiles()); @@ -83,7 +83,7 @@ if ((getOutputMode() == 1) || (getConfig('css_php') == 'DIRECT')) { } // END - switch } // END - if } // END - foreach -} elseif ((getOutputMode() == '0') || (getConfig('css_php') == 'INLINE')) { +} elseif ((getScriptOutputMode() == '0') || (getConfig('css_php') == 'INLINE')) { // Load CSS files $stylesList = merge_array($stylesList, getExtensionCssFiles()); diff --git a/inc/template-functions.php b/inc/template-functions.php index d520c5f0b8..aea217a7fa 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -56,7 +56,7 @@ function enableTemplateHtml ($enable = true) { // Default: true function isTemplateHtml () { // Is the output_mode other than 0 (HTML), then no comments are enabled - if (getOutputMode() != 0) { + if (getScriptOutputMode() != 0) { // No HTML return false; } else { @@ -126,7 +126,7 @@ function outputHtml ($htmlCode, $newLine = true) { // Do we have HTML-Code here? if (!empty($htmlCode)) { // Yes, so we handle it as you have configured - switch (getCachedOutputMode()) { + switch (getOutputMode()) { case 'render': // That's why you don't need any \n at the end of your HTML code... :-) if (getPhpCaching() == 'on') { @@ -175,7 +175,7 @@ function outputHtml ($htmlCode, $newLine = true) { // Output code here, DO NOT REMOVE! ;-) outputRawCode($GLOBALS['output']); - } elseif ((getCachedOutputMode() == 'render') && (!empty($GLOBALS['output']))) { + } elseif ((getOutputMode() == 'render') && (!empty($GLOBALS['output']))) { // Send all HTTP headers sendHttpHeaders(); @@ -199,7 +199,7 @@ function compileFinalOutput () { $GLOBALS['output'] = doFinalCompilation($GLOBALS['output']); // Extension 'rewrite' installed? - if ((isExtensionActive('rewrite')) && (getOutputMode() != 1)) { + if ((isExtensionActive('rewrite')) && (getScriptOutputMode() != 1)) { $GLOBALS['output'] = rewriteLinksInCode($GLOBALS['output']); } // END - if @@ -322,7 +322,7 @@ function loadTemplate ($template, $return = false, $content = array()) { $ret = ''; if ((strpos($GLOBALS['tpl_content'], '$') !== false) || (strpos($GLOBALS['tpl_content'], '{--') !== false) || (strpos($GLOBALS['tpl_content'], '{?') !== false) || (strpos($GLOBALS['tpl_content'], '{%') !== false)) { // Normal HTML output? - if (getOutputMode() == '0') { + if (getScriptOutputMode() == '0') { // Add surrounding HTML comments to help finding bugs faster $ret = '' . $GLOBALS['tpl_content'] . ''; diff --git a/inc/weekly/weekly_surfbar.php b/inc/weekly/weekly_surfbar.php index 06a306d541..bb11e6ceaf 100644 --- a/inc/weekly/weekly_surfbar.php +++ b/inc/weekly/weekly_surfbar.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((getOutputMode() == 1) || (!isResetModeEnabled())) { +} elseif ((getScriptOutputMode() == 1) || (!isResetModeEnabled())) { // Do not execute when script is in CSS mode or no daily reset return; } elseif (!isExtensionActive('surfbar')) { diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 2a64684ed4..1abc3ca5de 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -568,7 +568,7 @@ function getAction ($strict = true) { $action = null; // Is the value set? - if (isActionSet(($strict) && (getOutputMode() == 0))) { + if (isActionSet(($strict) && (getScriptOutputMode() == 0))) { // Then use it $action = $GLOBALS['action']; } // END - if @@ -634,7 +634,7 @@ function isModuleSet ($strict = false) { } // Getter for 'output_mode' value -function getOutputMode () { +function getScriptOutputMode () { // Default is null $output_mode = null; @@ -1416,7 +1416,7 @@ function getSaltLength () { } // "Getter" for output_mode -function getCachedOutputMode () { +function getOutputMode () { // Do we have cache? if (!isset($GLOBALS['cached_output_mode'])) { // Determine it