}
// Getter for 'what' value
-function getWhat () {
+function getWhat ($strict = true) {
// Default is null
$what = NULL;
// Is the value set?
- if (isWhatSet(true)) {
+ if (isWhatSet($strict)) {
// Then use it
$what = $GLOBALS['__what'];
} // END - if
// Setter for 'output_mode' value
function setOutputMode ($newOutputMode) {
- $GLOBALS['output_mode'] = (int) $newOutputMode;
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'output_mode=' . $newOutputMode);
+ $GLOBALS['output_mode'] = (int) $newOutputMode;
+ $GLOBALS['getScriptOutputMode'] = (int) $newOutputMode;
}
// Checks wether output_mode is set and optionally aborts on miss
* @access private
*/
function sendRawRedirect ($url) {
+ // Clear output buffer
+ clearOutputBuffer();
+
+ // Clear own output buffer
+ $GLOBALS['output'] = '';
+
+ // To make redirects working (no content type), output mode must be raw
+ setOutputMode(-1);
+
// Send helping header
setHttpStatus('302 Found');
// Is given userid valid?
function isValidUserId ($userid) {
+ // Handle NULL
+ if (is_null($userid)) {
+ // Do not handle this as of below isset() will always return false
+ return false;
+ } // END - if
+
// Do we have cache?
if (!isset($GLOBALS[__FUNCTION__][$userid])) {
// Check it out