// Is the value set?
if (isWhatSet(true)) {
// Then use it
- $what = $GLOBALS['what'];
+ $what = $GLOBALS['__what'];
} // END - if
// Return it
// Setter for 'what' value
function setWhat ($newWhat) {
- $GLOBALS['what'] = SQL_ESCAPE($newWhat);
+ $GLOBALS['__what'] = $newWhat;
}
// Setter for 'what' from configuration
// Checks wether what is set and optionally aborts on miss
function isWhatSet ($strict = false) {
// Check for it
- $isset = isset($GLOBALS['what']);
+ $isset = (isset($GLOBALS['__what']) && (!empty($GLOBALS['__what'])));
// Should we abort here?
if (($strict === true) && ($isset === false)) {
// Is the value set?
if (isActionSet(($strict) && (isHtmlOutputMode()))) {
// Then use it
- $action = $GLOBALS['action'];
+ $action = $GLOBALS['__action'];
} // END - if
// Return it
// Setter for 'action' value
function setAction ($newAction) {
- $GLOBALS['action'] = SQL_ESCAPE($newAction);
+ $GLOBALS['__action'] = $newAction;
}
// Checks wether action is set and optionally aborts on miss
function isActionSet ($strict = false) {
// Check for it
- $isset = ((isset($GLOBALS['action'])) && (!empty($GLOBALS['action'])));
+ $isset = ((isset($GLOBALS['__action'])) && (!empty($GLOBALS['__action'])));
// Should we abort here?
if (($strict === true) && ($isset === false)) {
// Is the value set?
if (isModuleSet($strict)) {
// Then use it
- $module = $GLOBALS['module'];
+ $module = $GLOBALS['__module'];
} // END - if
// Return it
// Setter for 'module' value
function setModule ($newModule) {
// Secure it and make all modules lower-case
- $GLOBALS['module'] = SQL_ESCAPE(strtolower($newModule));
+ $GLOBALS['__module'] = strtolower($newModule);
}
// Checks wether module is set and optionally aborts on miss
function isModuleSet ($strict = false) {
// Check for it
- $isset = (!empty($GLOBALS['module']));
+ $isset = ((isset($GLOBALS['__module'])) && (!empty($GLOBALS['__module'])));
// Should we abort here?
if (($strict === true) && ($isset === false)) {
} // END - if
// Return it
- return (($isset === true) && ($GLOBALS['module'] != 'unknown')) ;
+ return (($isset === true) && ($GLOBALS['__module'] != 'unknown')) ;
}
// Getter for 'output_mode' value
return (getScriptOutputMode() == -1);
}
+// Wrapper to check if output mode is AJAX
+function isAjaxOutputMode () {
+ // Determine it
+ return (getScriptOutputMode() == -2);
+}
+
// Wrapper to generate a user email link
function generateWrappedUserEmailLink ($email) {
// Just call the inner function
return $GLOBALS[__FUNCTION__][$userid];
}
+// Checks wether 'mailer_theme' was found in session
+function isMailerThemeSet () {
+ // Check session
+ return isSessionVariableSet('mailer_theme');
+}
+
+/**
+ * Setter for theme in session (This setter does return the success of
+ * setSession() which is required e.g. for destroySponsorSession().
+ */
+function setMailerTheme ($newTheme) {
+ // Set it in session
+ return setSession('mailer_theme', $newTheme);
+}
+
+/**
+ * Getter for theme from session (This getter does return 'mailer_theme' from
+ * session data or throws an error if not possible
+ */
+function getMailerTheme () {
+ // Is 'mailer_theme' set?
+ if (!isMailerThemeSet()) {
+ // No, then abort here
+ debug_report_bug(__FUNCTION__, __LINE__, 'mailer_theme not set in session. Please fix your code.');
+ } // END - if
+
+ // Return the theme from session
+ return getSession('mailer_theme');
+}
+
// [EOF]
?>