# HG changeset patch # User Tom Fredrik "BFG" Klaussen # Date 1350501782 -7200 # Node ID aafc23919e79e8ab35064b5e2cf0dcded7f31b34 # Parent fd39d7d5e9be656244142484f1c48876c2664b76 Validating errorPage. diff -r fd39d7d5e9be -r aafc23919e79 FileCacheSet.inc --- a/FileCacheSet.inc Wed Oct 17 20:43:25 2012 +0200 +++ b/FileCacheSet.inc Wed Oct 17 21:23:02 2012 +0200 @@ -66,7 +66,7 @@ { if (!file_exists($path)) { Logger::warn("${path} does not exist"); - errorPage("Resource is not available"); + errorPage("Resource is not available", 404); } array_push($this->files, $path); diff -r fd39d7d5e9be -r aafc23919e79 common-functions.inc --- a/common-functions.inc Wed Oct 17 20:43:25 2012 +0200 +++ b/common-functions.inc Wed Oct 17 21:23:02 2012 +0200 @@ -115,7 +115,15 @@ function errorPage($errorText, $errorCode = 403) { header(StatusCodes::httpHeaderFor($errorCode)); + print ''; + print ' +'; + + print '' . StatusCodes::httpHeaderFor($errorCode) . ''; + print ''; print "

${errorText}

"; + print ''; + exit; } diff -r fd39d7d5e9be -r aafc23919e79 constants.inc --- a/constants.inc Wed Oct 17 20:43:25 2012 +0200 +++ b/constants.inc Wed Oct 17 21:23:02 2012 +0200 @@ -8,14 +8,14 @@ define(VERBOSITY_WARNING, 10); define(VERBOSITY_DEBUG, 100); -define(DEBUG_LEVEL, VERBOSITY_WARNING); +define(DEBUG_LEVEL, VERBOSITY_NONE); define(DUMP, 0); define(MAX_RECURSE, 50); define(CACHING, 1); define(VALIDATE, 0); -define(ABORT_ON_LOG, TRUE); +define(ABORT_ON_LOG, FALSE); if (DEBUG_LEVEL >= VERBOSITY_WARNING) {