Project

General

Profile

Bug #16428 ยป bug_3973.diff

Administrator Admin, 2006-08-03 19:02

View differences:

typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie)
* Page not found handler.
* Exits.
*
* @param mixed Which type of handling; If a true PHP-boolean and TRUE then a ->printError message is outputted. If integer an error message with that number is shown. Otherwise the $code value is expected to be a "Location:" header value.
* @param mixed Which type of handling; If a true PHP-boolean or TRUE then a ->printError message is outputted. If integer an error message with that number is shown. Otherwise the $code value is expected to be a "Location:" header value.
* @param string If set, this is passed directly to the PHP function, header()
* @param string If set, error messages will also mention this as the reason for the page-not-found.
* @return void (The function exits!)
......
// Issue header in any case:
if ($header) {header($header);}
// Convert $code in case it was written as a string (e.g. if edited in Install Tool)
if (!strcasecmp($code,'TRUE')) {$code=TRUE;}
// Create response:
if (gettype($code)=='boolean' || !strcmp($code,1)) { // Simply boolean; Just shows TYPO3 error page with reason:
$this->printError('The page did not exist or was inaccessible.'.($reason ? ' Reason: '.htmlspecialchars($reason) : ''));
    (1-1/1)