From 12a74128ad47e706fd0acc6a3367cbe8bd4e7f1e Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 22 Nov 2005 12:39:09 +0000 Subject: --- .gitattributes | 26 +++++++-------- framework/Exceptions/TErrorHandler.php | 6 ++-- framework/Exceptions/error.html | 28 ----------------- framework/Exceptions/error404-en.html | 29 ----------------- framework/Exceptions/error404-zh.html | 29 ----------------- framework/Exceptions/error404.html | 29 ----------------- framework/Exceptions/error500-en.html | 29 ----------------- framework/Exceptions/error500-zh.html | 28 ----------------- framework/Exceptions/error500.html | 29 ----------------- framework/Exceptions/error503-en.html | 27 ---------------- framework/Exceptions/error503-zh.html | 27 ---------------- framework/Exceptions/error503.html | 27 ---------------- framework/Exceptions/exception-en.html | 40 ------------------------ framework/Exceptions/exception-zh.html | 40 ------------------------ framework/Exceptions/exception.html | 40 ------------------------ framework/Exceptions/templates/error.html | 28 +++++++++++++++++ framework/Exceptions/templates/error404-en.html | 29 +++++++++++++++++ framework/Exceptions/templates/error404-zh.html | 29 +++++++++++++++++ framework/Exceptions/templates/error404.html | 29 +++++++++++++++++ framework/Exceptions/templates/error500-en.html | 29 +++++++++++++++++ framework/Exceptions/templates/error500-zh.html | 28 +++++++++++++++++ framework/Exceptions/templates/error500.html | 29 +++++++++++++++++ framework/Exceptions/templates/error503-en.html | 27 ++++++++++++++++ framework/Exceptions/templates/error503-zh.html | 27 ++++++++++++++++ framework/Exceptions/templates/error503.html | 27 ++++++++++++++++ framework/Exceptions/templates/exception-en.html | 40 ++++++++++++++++++++++++ framework/Exceptions/templates/exception-zh.html | 40 ++++++++++++++++++++++++ framework/Exceptions/templates/exception.html | 40 ++++++++++++++++++++++++ 28 files changed, 418 insertions(+), 418 deletions(-) delete mode 100644 framework/Exceptions/error.html delete mode 100644 framework/Exceptions/error404-en.html delete mode 100644 framework/Exceptions/error404-zh.html delete mode 100644 framework/Exceptions/error404.html delete mode 100644 framework/Exceptions/error500-en.html delete mode 100644 framework/Exceptions/error500-zh.html delete mode 100644 framework/Exceptions/error500.html delete mode 100644 framework/Exceptions/error503-en.html delete mode 100644 framework/Exceptions/error503-zh.html delete mode 100644 framework/Exceptions/error503.html delete mode 100644 framework/Exceptions/exception-en.html delete mode 100644 framework/Exceptions/exception-zh.html delete mode 100644 framework/Exceptions/exception.html create mode 100644 framework/Exceptions/templates/error.html create mode 100644 framework/Exceptions/templates/error404-en.html create mode 100644 framework/Exceptions/templates/error404-zh.html create mode 100644 framework/Exceptions/templates/error404.html create mode 100644 framework/Exceptions/templates/error500-en.html create mode 100644 framework/Exceptions/templates/error500-zh.html create mode 100644 framework/Exceptions/templates/error500.html create mode 100644 framework/Exceptions/templates/error503-en.html create mode 100644 framework/Exceptions/templates/error503-zh.html create mode 100644 framework/Exceptions/templates/error503.html create mode 100644 framework/Exceptions/templates/exception-en.html create mode 100644 framework/Exceptions/templates/exception-zh.html create mode 100644 framework/Exceptions/templates/exception.html diff --git a/.gitattributes b/.gitattributes index f05a3c28..24b7d228 100644 --- a/.gitattributes +++ b/.gitattributes @@ -39,20 +39,20 @@ framework/Data/TSqliteCache.php -text framework/Data/TXmlDocument.php -text framework/Exceptions/TErrorHandler.php -text framework/Exceptions/TException.php -text -framework/Exceptions/error.html -text -framework/Exceptions/error404-en.html -text -framework/Exceptions/error404-zh.html -text -framework/Exceptions/error404.html -text -framework/Exceptions/error500-en.html -text -framework/Exceptions/error500-zh.html -text -framework/Exceptions/error500.html -text -framework/Exceptions/error503-en.html -text -framework/Exceptions/error503-zh.html -text -framework/Exceptions/error503.html -text -framework/Exceptions/exception-en.html -text -framework/Exceptions/exception-zh.html -text -framework/Exceptions/exception.html -text framework/Exceptions/messages.txt -text +framework/Exceptions/templates/error.html -text +framework/Exceptions/templates/error404-en.html -text +framework/Exceptions/templates/error404-zh.html -text +framework/Exceptions/templates/error404.html -text +framework/Exceptions/templates/error500-en.html -text +framework/Exceptions/templates/error500-zh.html -text +framework/Exceptions/templates/error500.html -text +framework/Exceptions/templates/error503-en.html -text +framework/Exceptions/templates/error503-zh.html -text +framework/Exceptions/templates/error503.html -text +framework/Exceptions/templates/exception-en.html -text +framework/Exceptions/templates/exception-zh.html -text +framework/Exceptions/templates/exception.html -text framework/IO/TTextWriter.php -text framework/Security/TAuthManager.php -text framework/Security/TAuthorizationRule.php -text diff --git a/framework/Exceptions/TErrorHandler.php b/framework/Exceptions/TErrorHandler.php index 779224ca..592ba615 100644 --- a/framework/Exceptions/TErrorHandler.php +++ b/framework/Exceptions/TErrorHandler.php @@ -175,7 +175,7 @@ class TErrorHandler extends TComponent implements IModule if(!($exception instanceof THttpException)) error_log($exception->__toString()); if($this->_templatePath===null) - $this->_templatePath=dirname(__FILE__); + $this->_templatePath=Prado::getFrameworkPath().'/Exceptions/templates'; $base=$this->_templatePath.'/'.self::ERROR_FILE_NAME; $lang=Prado::getPreferredLanguage(); if(is_file("$base$statusCode-$lang.html")) @@ -276,9 +276,9 @@ class TErrorHandler extends TComponent implements IModule strftime('%Y-%m-%d %H:%m',time()) ); $lang=Prado::getPreferredLanguage(); - $exceptionFile=dirname(__FILE__).'/'.self::EXCEPTION_FILE_NAME.'-'.$lang.'.html'; + $exceptionFile=Prado::getFrameworkPath().'/Exceptions/templates/'.self::EXCEPTION_FILE_NAME.'-'.$lang.'.html'; if(!is_file($exceptionFile)) - $exceptionFile=dirname(__FILE__).'/'.self::EXCEPTION_FILE_NAME.'.html'; + $exceptionFile=Prado::getFrameworkPath().'/Exceptions/templates/'.self::EXCEPTION_FILE_NAME.'.html'; if(($content=@file_get_contents($exceptionFile))===false) die("Unable to open exception template file '$exceptionFile'."); echo str_replace($fields,$values,$content); diff --git a/framework/Exceptions/error.html b/framework/Exceptions/error.html deleted file mode 100644 index cff0f910..00000000 --- a/framework/Exceptions/error.html +++ /dev/null @@ -1,28 +0,0 @@ - -
--The above error happened when the server was processing your request. -
--If you think this is a server error, please contact the webmaster. -
--The requested URL was not found on this server. -If you entered the URL manually please check your spelling and try again. -
--If you think this is a server error, please contact the webmaster. -
--服务器无法找到您所请求的页面。 -如果您是手工输入页面地址的,请检查拼写是否正确。 -
--如果您确认这是服务器错误,请联系系统管理员。 -
--The requested URL was not found on this server. -If you entered the URL manually please check your spelling and try again. -
--If you think this is a server error, please contact the webmaster. -
--An internal error occurred while the Web server was handling your request. -Please contact the webmaster to report this problem. -
--Thank you. -
--服务器在处理您的请求时发生了一个内部错误。请向系统管理员汇报这个错误。 -
--谢谢。 -
--An internal error occurred while the Web server was handling your request. -Please contact the webmaster to report this problem. -
--Thank you. -
--Our system is currently under maintenance. Please come back later. -
--Thank you. -
--系统维护中,请稍后再来访问。 -
--谢谢。 -
--Our system is currently under maintenance. Please come back later. -
--Thank you. -
-%%ErrorMessage%%
--
%%SourceFile%%
-
-%%SourceCode%%
-
-
-%%StackTrace%%
-
-%%ErrorMessage%%
--
%%SourceFile%%
-
-%%SourceCode%%
-
-
-%%StackTrace%%
-
-%%ErrorMessage%%
--
%%SourceFile%%
-
-%%SourceCode%%
-
-
-%%StackTrace%%
-
-+The above error happened when the server was processing your request. +
++If you think this is a server error, please contact the webmaster. +
++The requested URL was not found on this server. +If you entered the URL manually please check your spelling and try again. +
++If you think this is a server error, please contact the webmaster. +
++服务器无法找到您所请求的页面。 +如果您是手工输入页面地址的,请检查拼写是否正确。 +
++如果您确认这是服务器错误,请联系系统管理员。 +
++The requested URL was not found on this server. +If you entered the URL manually please check your spelling and try again. +
++If you think this is a server error, please contact the webmaster. +
++An internal error occurred while the Web server was handling your request. +Please contact the webmaster to report this problem. +
++Thank you. +
++服务器在处理您的请求时发生了一个内部错误。请向系统管理员汇报这个错误。 +
++谢谢。 +
++An internal error occurred while the Web server was handling your request. +Please contact the webmaster to report this problem. +
++Thank you. +
++Our system is currently under maintenance. Please come back later. +
++Thank you. +
++系统维护中,请稍后再来访问。 +
++谢谢。 +
++Our system is currently under maintenance. Please come back later. +
++Thank you. +
+%%ErrorMessage%%
++
%%SourceFile%%
+
+%%SourceCode%%
+
+
+%%StackTrace%%
+
+%%ErrorMessage%%
++
%%SourceFile%%
+
+%%SourceCode%%
+
+
+%%StackTrace%%
+
+%%ErrorMessage%%
++
%%SourceFile%%
+
+%%SourceCode%%
+
+
+%%StackTrace%%
+
+