$action = null;
// Is the value set?
- if (isActionSet(($strict) && (getScriptOutputMode() == 0))) {
+ if (isActionSet(($strict) && (isHtmlOutputMode()))) {
// Then use it
$action = $GLOBALS['action'];
} // END - if
unset($GLOBALS['ref_level']);
// Call more complicated method (due to more parameters)
- return addPointsThroughReferalSystem($subject, $userid, $points, false, 0, false, 'direct');
+ return addPointsThroughReferalSystem($subject, $userid, $points, false, 0, 'direct');
}
// Wrapper for redirectToUrl but URL comes from a configuration entry
// check if running on IIS < 6 with CGI-PHP
if ((isset($_SERVER['SERVER_SOFTWARE'])) && (isset($_SERVER['GATEWAY_INTERFACE'])) &&
- (strpos($_SERVER['GATEWAY_INTERFACE'],'CGI') !== false) &&
+ (strpos($_SERVER['GATEWAY_INTERFACE'], 'CGI') !== false) &&
(preg_match('|^Microsoft-IIS/(\d)\.\d$|', trim($_SERVER['SERVER_SOFTWARE']), $matches)) &&
($matches[1] < 6)) {
// Send the IIS header
// Encodes entities
function encodeEntities ($str) {
// Secure it first
- $str = secureString($str);
+ $str = secureString($str, true, true);
// Encode dollar sign as well
$str = str_replace('$', '$', $str);
return $GLOBALS['mt_word'];
}
+// "Getter" for mt_word2
+function getMtWord2 () {
+ // Do we have cache?
+ if (!isset($GLOBALS['mt_word2'])) {
+ // Determine it
+ $GLOBALS['mt_word2'] = getConfig('mt_word2');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['mt_word2'];
+}
+
// "Getter" for main_title
function getMainTitle () {
// Do we have cache?
return $GLOBALS['index_home'];
}
+// "Getter" for one_day
+function getOneDay () {
+ // Do we have cache?
+ if (!isset($GLOBALS['one_day'])) {
+ // Determine it
+ $GLOBALS['one_day'] = getConfig('ONE_DAY');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['one_day'];
+}
+
// Checks wether proxy configuration is used
function isProxyUsed () {
// Do we have cache?
// Do we have cache?
if (!isset($GLOBALS['post_contains_selections'][$element])) {
// Determine it
- $GLOBALS['post_contains_selections'][$element] = (countPostSelection($element) > 0);
+ $GLOBALS['post_contains_selections'][$element] = ((isPostRequestParameterSet($element)) && (countPostSelection($element) > 0));
} // END - if
// Return cache
return $GLOBALS['total_points'][$userid];
}
+// Wrapper to check if url_blacklist is enabled
+function isUrlBlacklistEnabled () {
+ // Do we have cache?
+ if (!isset($GLOBALS['is_url_blacklist_enabled'])) {
+ // Determine it
+ $GLOBALS['is_url_blacklist_enabled'] = (getConfig('url_blacklist') == 'Y');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['is_url_blacklist_enabled'];
+}
+
+// Checks wether direct payment is allowed in configuration
+function isDirectPaymentAllowed () {
+ // Do we have cache?
+ if (!isset($GLOBALS['is_direct_payment_allowed'])) {
+ // Determine it
+ $GLOBALS['is_direct_payment_allowed'] = (getConfig('allow_direct_pay') == 'Y');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['is_direct_payment_allowed'];
+}
+
+// Wrapper to check if current task is for extension (not update)
+function isExtensionTask ($content) {
+ // Do we have cache?
+ if (!isset($GLOBALS['is_extension_task'][$content['task_type'] . '_' . $content['infos']])) {
+ // Determine it
+ $GLOBALS['is_extension_task'][$content['task_type'] . '_' . $content['infos']] = (($content['task_type'] == 'EXTENSION') && (isExtensionNameValid($content['infos'])) && (!isExtensionInstalled($content['infos'])));
+ } // END - if
+
+ // Return cache
+ 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]
?>