// Is the cache file not yet rebuilt?
if ((!isset($this->rebuilt[$this->name])) && ($this->isCacheReadable())) {
// Only run in regular output mode
- if ((getScriptOutputMode() != 0) && ($force === false)) {
+ if ((!isHtmlOutputMode()) && ($force === false)) {
// Debug message if allowed
if (isDebugModeEnabled()) {
// Debug message
$GLOBALS[__METHOD__][$ext_name] = ((isset($this->version[$this->name][$ext_name])) && ($this->version[$this->name][$ext_name] == $ext_ver));
} elseif ($this->isCacheReadable()) {
// No cache version found!
- logDebugMessage(__METHOD__, __LINE__, "Cache {$this->name} has missing version entry for extension {$ext_name}! Purging cache...");
+ logDebugMessage(__METHOD__, __LINE__, 'Cache ' . $this->name . ' has missing version entry for extension ' . $ext_name . '! Purging cache...');
// Remove the cache file
$this->removeCacheFile(true);
// Update config entries
function updateConfiguration ($entries, $values, $updateMode='', $config = '0') {
// Do not update config in CSS mode
- if ((getScriptOutputMode() == 1) || (getScriptOutputMode() == -1) || (isInstallationPhase())) {
+ if ((isCssOutputMode()) || (isRawOutputMode()) || (isInstallationPhase())) {
return;
} // END - if
}
// Run database update
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "entries={$entries}");
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'entries=' . $entries);
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$entries." WHERE `config`=%s LIMIT 1",
array(bigintval($config)), __FUNCTION__, __LINE__);
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "entries={$entries},affectedRows={$affectedRows}<br />");
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'entries=' . $entries . ',affectedRows=' . SQL_AFFECTEDROWS());
// Rebuild cache
rebuildCache('config', 'config');
incrementConfigEntry('sql_count');
// Debug output
- if ((getScriptOutputMode() != 1) && (isDebugModeEnabled()) && (isSqlDebuggingEnabled())) {
+ if ((!isCssOutputMode()) && (isDebugModeEnabled()) && (isSqlDebuggingEnabled())) {
//
// Debugging stuff...
//
// Download functions file
loadIncludeOnce($funcsInclude);
} // END - if
- } 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')) {
+ } elseif ((!isset($GLOBALS['cache_array']['extension']['ext_func'][$ext_name])) && (isDebugModeEnabled()) && (isHtmlOutputMode()) && ($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,
// Count cache hits
incrementStatsEntry('cache_hits');
- } elseif ((!isCacheInstanceValid()) || (isset($GLOBALS['cache_array']['extension'])) || (getScriptOutputMode() != 0)) {
+ } elseif ((!isCacheInstanceValid()) || (isset($GLOBALS['cache_array']['extension'])) || (!isHtmlOutputMode())) {
// 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__);
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 (getScriptOutputMode() != 1) {
+ if (!isCssOutputMode()) {
// Get total member count
$total = getTotalConfirmedUser();
} // END - if
// Do we have non-HTML mode?
- if ((getScriptOutputMode() != '0') || ($outputMode != '0')) $code = decodeEntities($code);
+ if ((!isHtmlOutputMode()) || ($outputMode != '0')) $code = decodeEntities($code);
// Return compiled code
//* DEBUG: */ debugOutput(__FUNCTION__.'['.__LINE__.']:<pre>'.($code).'</pre>');
// Load more reset scripts
function FILTER_RUN_RESET_INCLUDES () {
// Is the reset set or old sql_patches?
- if (((!isResetModeEnabled()) || (!isExtensionInstalled('sql_patches'))) && (getScriptOutputMode() == '0')) {
+ if (((!isResetModeEnabled()) || (!isExtensionInstalled('sql_patches'))) && (isHtmlOutputMode())) {
// 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
} // END - if
// Get all values
- if ((getScriptOutputMode() != 1) && (getScriptOutputMode() != -1)) {
+ if ((!isCssOutputMode()) && (!isRawOutputMode())) {
// Fix module
if (!isModuleSet()) {
// Is the request element set?
if (isGetRequestParameterSet('module')) {
// Set module from request
setModule(getRequestParameter('module'));
- } elseif (getScriptOutputMode() == '0') {
+ } elseif (isHtmlOutputMode()) {
// Set default module 'index'
setModule('index');
} else {
} // END - if
// Fix 'what' if not yet set
- if (!isWhatSet()) setWhat(getWhatFromModule(getModule()));
+ if (!isWhatSet()) {
+ setWhat(getWhatFromModule(getModule()));
+ } // END - if
// Fix 'action' if not yet set
- if (!isActionSet()) setAction(getActionFromModuleWhat(getModule(), getWhat()));
+ if (!isActionSet()) {
+ setAction(getActionFromModuleWhat(getModule(), getWhat()));
+ } // END - if
} else {
// Set action/what to empty
setAction('');
// Set default 'what' value
//* DEBUG: */ debugOutput('-' . getModule() . '/' . getWhat() . '-');
- if ((!isWhatSet()) && (!isActionSet()) && (getScriptOutputMode() != 1) && (getScriptOutputMode() != -1)) {
+ if ((!isWhatSet()) && (!isActionSet()) && (!isCssOutputMode()) && (!isRawOutputMode())) {
if (getModule() == 'admin') {
// Set 'action' value to 'login' in admin menu
setAction(getActionFromModuleWhat(getModule(), getWhat()));
// Sends out pooled mails
function FILTER_TRIGGER_SENDING_POOL () {
// Are we in normal output mode?
- if (getScriptOutputMode() != 0) {
+ if (!isHtmlOutputMode()) {
// Only in normal output mode to prevent race-conditons!
} // END - if
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')) && (getScriptOutputMode() != 1)) {
+ if (((getDay(getConfig('last_update')) != getDay()) || ((isConfigEntrySet('DEBUG_RESET')) && (getConfig('DEBUG_RESET') == 'Y'))) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestParameterSet('register')) && (!isCssOutputMode())) {
// Tell every module we are in reset-mode!
doReset();
} // END - if
// Handles fatal errors
function FILTER_HANDLE_FATAL_ERRORS () {
// Do we have errors to handle and right output mode?
- if ((!ifFatalErrorsDetected()) || (getScriptOutputMode() != '0')) {
+ if ((!ifFatalErrorsDetected()) || (!isHtmlOutputMode())) {
// Abort executing here
return false;
} // END - if
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())) && (getScriptOutputMode() == '0') && ($GLOBALS['header_sent'] == 2)) {
+ if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestParameterSet('frame'))) || (isInstallationPhase())) && (isHtmlOutputMode()) && ($GLOBALS['header_sent'] == 2)) {
// Then display it here
displayParsingTime();
} // END - if
// 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))) && (getScriptOutputMode() != 1))) {
+if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != 1) && ($GLOBALS['footer_sent'] != 2))) && (!isCssOutputMode()))) {
// Run the filter, sweet huh?
runFilterChain('page_footer');
// Send mail out to an email address
function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '') {
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "TO={$toEmail},SUBJECT={$subject}<br />");
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'toEmail=' . $toEmail . ',subject=' . $subject . ',isHtml=' . $isHtml);
// Compile subject line (for POINTS constant etc.)
eval('$subject = decodeEntities("' . compileRawCode(escapeQuotes($subject)) . '");');
loadInclude($inc);
} else {
// Include not found!
- logDebugMessage(__FUNCTION__, __LINE__, "Include {$inc} not found. cache={$cache}");
+ logDebugMessage(__FUNCTION__, __LINE__, 'Include ' . $inc . ' not found. cache=' . $cache);
}
} // END - if
} // END - if
// Determines referal id and sets it
function determineReferalId () {
// Skip this in non-html-mode and outside ref.php
- if ((getScriptOutputMode() != 0) && (basename($_SERVER['PHP_SELF']) != 'ref.php')) return false;
+ if ((!isHtmlOutputMode()) && (basename($_SERVER['PHP_SELF']) != 'ref.php')) return false;
// Check if refid is set
if ((isset($GLOBALS['refid'])) && ($GLOBALS['refid'] > 0)) {
// 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) || (getScriptOutputMode() == -3)) return $url;
+ if ((strpos($url, session_name()) !== false) || (isRawOutputMode())) return $url;
// Do we have a valid session?
if (((!isset($GLOBALS['valid_session'])) || ($GLOBALS['valid_session'] === false) || (!isset($_COOKIE[session_name()]))) && (isSpider() === false)) {
if (strpos($url, '?') === false) {
// No question mark
$seperator = '?';
- } elseif ((getScriptOutputMode() != '0') || ($outputMode != '0')) {
+ } elseif ((!isHtmlOutputMode()) || ($outputMode != '0')) {
// Non-HTML mode
$seperator = '&';
}
setHttpStatus('200 OK');
// If not in CSS mode generate the header
- if (getScriptOutputMode() != 1) {
+ if (!isCssOutputMode()) {
// Prepare the header for HTML output
loadHtmlHeader();
} // END - if
} // END - if
// Add BODY tag or not?
-if ((getScriptOutputMode() != 1) && (getScriptOutputMode() != -1) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestParameterSet('frame')))) {
+if ((!isCssOutputMode()) && (!isRawOutputMode()) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestParameterSet('frame')))) {
loadTemplate('page_body');
$GLOBALS['header_sent'] = 2;
} // END - if
if (isLanguageIncludeReadable($ext_name)) {
// Load language file
loadLanguageInclude($ext_name);
- } elseif ((isDebugModeEnabled()) && (getScriptOutputMode() == '0') && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) {
+ } elseif ((isDebugModeEnabled()) && (isHtmlOutputMode()) && ($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,
// Fix it to default
$ret = 'default';
} // END - if
- } elseif ((!isInstalled()) && ((isInstalling()) || (getScriptOutputMode() == true)) && ((isGetRequestParameterSet('theme')) || (isPostRequestParameterSet('theme')))) {
+ } elseif ((!isInstalled()) && ((isInstalling()) || (isHtmlOutputMode())) && ((isGetRequestParameterSet('theme')) || (isPostRequestParameterSet('theme')))) {
// Prepare filename for checking
$themeFile = sprintf("theme/%s/theme.php", getRequestParameter('theme'));
if (($GLOBALS['cache_instance']->loadCacheFile('foo')) && ($GLOBALS['cache_instance']->extensionVersionMatches('foo'))) {
// Load cache
$GLOBALS['cache_array']['foo'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif (getOutputMode() != 1) {
+} elseif (isHtmlMode()) {
// Create cache file
$GLOBALS['cache_instance']->init();
$GLOBALS['cache_instance']->removeCacheFile();
unset($GLOBALS['cache_array']['admin']);
}
-} elseif (getScriptOutputMode() != 1) {
+} elseif (isHtmlOutputMode()) {
// Create cache file
$GLOBALS['cache_instance']->init();
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 (getScriptOutputMode() != 1) {
+ } elseif (isHtmlOutputMode()) {
// Create cache file here
$GLOBALS['cache_instance']->init();
// Remove dummy array
unset($config);
-} elseif (getScriptOutputMode() != 1) {
+} elseif (isHtmlOutputMode()) {
// Create cache file here
$GLOBALS['cache_instance']->init();
// Remove array and mark cache as loaded
unset($EXT_POOL);
-} elseif (getScriptOutputMode() != 1) {
+} elseif (isHtmlOutputMode()) {
// Create cache file here
$GLOBALS['cache_instance']->init();
// Prepare the array here
prepareFilterArray();
-} elseif ((getScriptOutputMode() != 1) && (isExtensionInstalled('sql_patches'))) {
+} elseif ((isHtmlOutputMode()) && (isExtensionInstalled('sql_patches'))) {
// Create cache file here
$GLOBALS['cache_instance']->init();
if (($GLOBALS['cache_instance']->loadCacheFile('imprint')) && ($GLOBALS['cache_instance']->extensionVersionMatches('imprint'))) {
// Load cache
$GLOBALS['cache_array']['imprint'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif (getScriptOutputMode() != 1) {
+} elseif (isHtmlOutputMode()) {
// Create cache file
$GLOBALS['cache_instance']->init();
} // END - foreach
} // END - foreach
unset($modArray);
-} elseif (getScriptOutputMode() != 1) {
+} elseif (isHtmlOutputMode()) {
// Create cache file here
$GLOBALS['cache_instance']->init();
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 (getScriptOutputMode() != 1) {
+} elseif (isHtmlOutputMode()) {
// Create cache file here
$GLOBALS['cache_instance']->init();
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 (getScriptOutputMode() != 1) {
+} elseif (isHtmlOutputMode()) {
// Create cache file here
$GLOBALS['cache_instance']->init();
if ($GLOBALS['cache_instance']->loadCacheFile('revision')) {
// Load revision from cache
$GLOBALS['cache_array']['revision'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif ((getScriptOutputMode() != 1)) {
+} elseif ((isHtmlOutputMode())) {
// Create cache file here
$GLOBALS['cache_instance']->init();
// Remove dummy array
unset($cache);
-} elseif (getScriptOutputMode() != 1) {
+} elseif (isHtmlOutputMode()) {
// Create cache file here
$GLOBALS['cache_instance']->init();
}
// Do not execute when script is in CSS mode
-if (getScriptOutputMode() != 0) return;
+if (!isHtmlOutputMode()) return;
// [EOF]
?>
}
// Do not execute when script is in CSS mode
-if (getScriptOutputMode() != 0) return;
+if (!isHtmlOutputMode()) return;
// Create timemark from saved month
$mark = mktime(0, 0, 0, getConfig('last_month'), getDay(), getYear());
}
// Do not execute when script is in CSS mode
-if (getScriptOutputMode() != 0) return;
+if (!isHtmlOutputMode()) return;
// Create timemark from saved month
$mark = mktime(0, 0, 0, getConfig('last_month'), getDay(), getYear());
}
// Do not execute when script is in CSS mode
-if (getScriptOutputMode() != 0) return;
+if (!isHtmlOutputMode()) return;
// Initialize variables
$jackpotPoints = '0'; $userPoints = '0';
// Destroy cache here
// @TODO Rewrite this to a filter
- if ((getScriptOutputMode() == '0') || (getScriptOutputMode() == -1)) rebuildCache('modules', 'modules');
+ if ((isHtmlOutputMode()) || (isRawOutputMode())) rebuildCache('modules', 'modules');
// And reload data
unset($GLOBALS['module_status'][$module]);
// Module not found we don't add it to the database
$ret = '404';
}
- } elseif (($ret == 'cache_miss') && (getScriptOutputMode() == '0')) {
+ } elseif (($ret == 'cache_miss') && (isHtmlOutputMode())) {
// Rebuild the cache files
rebuildCache('modules', 'modules');
} elseif ($found === false) {
} // END - if
} elseif (isset($content[$column])) {
// Unfinished!
- debug_report_bug(__FUNCTION__, __LINE__, ":UNFINISHED: id={$id}/{$column}[".gettype($statusInfo)."] = {$content[$column]}");
+ debug_report_bug(__FUNCTION__, __LINE__, ':UNFINISHED: id=' . $id . ',column=' . $column . '[' . gettype($statusInfo) . '] = ' . $content[$column]);
}
} // END - foreach
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getOutputMode() == 1) || (isResetModeEnabled())) {
+} elseif ((isCssOutputMode()) || (isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('')) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() == 1) || (!isResetModeEnabled())) {
+} elseif ((isCssOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif ((!isExtensionActive('beg')) || (!isBegRallyeEnabled())) {
$curr = getMonth();
// Check if month is done
-if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getConfig('beg_ranks') > 0) && (getScriptOutputMode() != 1)) {
+if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getConfig('beg_ranks') > 0) && (!isCssOutputMode())) {
// Extension 'autopurge' is inactive or purging of inactive accounts is deactivated
$whereStatement1 = '';
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() == 1) || (!isResetModeEnabled())) {
+} elseif ((isCssOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('bonus')) {
// Get current month (2 digits)
$curr = getMonth();
-if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && (getScriptOutputMode() != 1)) {
+if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && (!isCssOutputMode())) {
// Extension 'autopurge' is inactive or purging of inactive accounts is deactivated
$whereStatement1 = "WHERE `status`='CONFIRMED'";
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() == 1) || (!isResetModeEnabled())) {
+} elseif ((isCssOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('newsletter')) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() == 1) || (!isResetModeEnabled())) {
+} elseif ((isCssOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('surfbar')) {
setConfigEntry('OUTPUT_MODE', 'direct');
// This hack prevents a backtrace in CSS output
- if (getScriptOutputMode() == 1) {
+ if (isCssOutputMode()) {
// Problem with config so set output mode
setConfigEntry('OUTPUT_MODE', 'render');
} // END - if
runFilterChain('init');
// Are we installation routine?
- if ((!isInstalling()) && (getScriptOutputMode() != 1) && (getScriptOutputMode() != -1)) {
+ if ((!isInstalling()) && (!isCssOutputMode()) && (!isRawOutputMode())) {
// You have to install first!
redirectToUrl('install.php');
} // END - if
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getOutputMode() != 0) || (!isResetModeEnabled())) {
+} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('')) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) {
+} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('bonus')) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) {
+} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('autopurge')) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) {
+} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif ((!isExtensionActive('beg')) || (!isBegRallyeEnabled())) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) {
+} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode
return;
} elseif (!isExtensionActive('birthday')) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) {
+} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('bonus')) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) {
+} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('sql_patches')) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) {
+} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif ((!isExtensionActive('doubler')) || (getConfig('doubler_send_mode') != 'RESET')) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) {
+} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('engine')) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() != 0) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == 'RESET'))) {
+} elseif ((!isHtmlOutputMode()) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == 'RESET'))) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('holiday')) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) {
+} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('profile')) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) {
+} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('surfbar')) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) {
+} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('yoomedia')) {
// Unset/set session variables
function setSession ($var, $value) {
// Abort in CSS mode here
- if (getScriptOutputMode() == 1) return true;
+ if (isCssOutputMode()) return true;
// Trim value and session variable
$var = trim(secureString($var)); $value = trim($value);
if (!isConfigEntrySet('css_php')) setConfigEntry('css_php', 'FILE');
// Output CSS files or content or link to css.php ?
-if ((getScriptOutputMode() == 1) || (getConfig('css_php') == 'DIRECT')) {
+if ((isCssOutputMode()) || (getConfig('css_php') == 'DIRECT')) {
// Load CSS files
$stylesList = merge_array($stylesList, getExtensionCssFiles());
} // END - switch
} // END - if
} // END - foreach
-} elseif ((getScriptOutputMode() == '0') || (getConfig('css_php') == 'INLINE')) {
+} elseif ((isHtmlOutputMode()) || (getConfig('css_php') == 'INLINE')) {
// Load CSS files
$stylesList = merge_array($stylesList, getExtensionCssFiles());
// Default: true
function isTemplateHtml () {
// Is the output_mode other than 0 (HTML), then no comments are enabled
- if (getScriptOutputMode() != 0) {
+ if (!isHtmlOutputMode()) {
// No HTML
return false;
} else {
$GLOBALS['output'] = doFinalCompilation($GLOBALS['output']);
// Extension 'rewrite' installed?
- if ((isExtensionActive('rewrite')) && (getScriptOutputMode() != 1)) {
+ if ((isExtensionActive('rewrite')) && (!isCssOutputMode())) {
$GLOBALS['output'] = rewriteLinksInCode($GLOBALS['output']);
} // END - if
$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 (getScriptOutputMode() == '0') {
+ if (isHtmlOutputMode()) {
// Add surrounding HTML comments to help finding bugs faster
$ret = '<!-- Template ' . $template . ' - Start //-->' . $GLOBALS['tpl_content'] . '<!-- Template ' . $template . ' - End //-->';
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getOutputMode() == 1) || (!isResetModeEnabled())) {
+} elseif ((isCssOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('')) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} elseif ((getScriptOutputMode() == 1) || (!isResetModeEnabled())) {
+} elseif ((isCssOutputMode()) || (!isResetModeEnabled())) {
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('surfbar')) {
$action = null;
// Is the value set?
- if (isActionSet(($strict) && (getScriptOutputMode() == 0))) {
+ if (isActionSet(($strict) && (isHtmlOutputMode()))) {
// Then use it
$action = $GLOBALS['action'];
} // END - if
return $GLOBALS['is_extension_task'][$content['task_type'] . '_' . $content['infos']];
}
+// Wrapper to check if output mode is CSS
+function isCssOutputMode () {
+ // Determine it
+ return (getScriptOutputMode() == 1);
+}
+
+// Wrapper to check if output mode is HTML
+function isHtmlOutputMode () {
+ // Determine it
+ return (getScriptOutputMode() == 0);
+}
+
+// Wrapper to check if output mode is RAW
+function isRawOutputMode () {
+ // Determine it
+ return (getScriptOutputMode() == -1);
+}
+
// [EOF]
?>
// Set module
$GLOBALS['module'] = 'view';
-$GLOBALS['output_mode'] = -3;
+$GLOBALS['output_mode'] = -1;
// Load the required file(s)
require('inc/config-global.php');