diff options
author | xue <> | 2005-11-22 12:39:09 +0000 |
---|---|---|
committer | xue <> | 2005-11-22 12:39:09 +0000 |
commit | 12a74128ad47e706fd0acc6a3367cbe8bd4e7f1e (patch) | |
tree | d1efdcf657b9a488ba10ae5666d513cb94bfd3a9 | |
parent | b404b6fed5dc814ceb2cf03a17b20ff9d6da775d (diff) |
-rw-r--r-- | .gitattributes | 26 | ||||
-rw-r--r-- | framework/Exceptions/TErrorHandler.php | 6 | ||||
-rw-r--r-- | framework/Exceptions/templates/error.html (renamed from framework/Exceptions/error.html) | 0 | ||||
-rw-r--r-- | framework/Exceptions/templates/error404-en.html (renamed from framework/Exceptions/error404-en.html) | 0 | ||||
-rw-r--r-- | framework/Exceptions/templates/error404-zh.html (renamed from framework/Exceptions/error404-zh.html) | 0 | ||||
-rw-r--r-- | framework/Exceptions/templates/error404.html (renamed from framework/Exceptions/error404.html) | 0 | ||||
-rw-r--r-- | framework/Exceptions/templates/error500-en.html (renamed from framework/Exceptions/error500-en.html) | 0 | ||||
-rw-r--r-- | framework/Exceptions/templates/error500-zh.html (renamed from framework/Exceptions/error500-zh.html) | 0 | ||||
-rw-r--r-- | framework/Exceptions/templates/error500.html (renamed from framework/Exceptions/error500.html) | 0 | ||||
-rw-r--r-- | framework/Exceptions/templates/error503-en.html (renamed from framework/Exceptions/error503-en.html) | 0 | ||||
-rw-r--r-- | framework/Exceptions/templates/error503-zh.html (renamed from framework/Exceptions/error503-zh.html) | 0 | ||||
-rw-r--r-- | framework/Exceptions/templates/error503.html (renamed from framework/Exceptions/error503.html) | 0 | ||||
-rw-r--r-- | framework/Exceptions/templates/exception-en.html (renamed from framework/Exceptions/exception-en.html) | 0 | ||||
-rw-r--r-- | framework/Exceptions/templates/exception-zh.html (renamed from framework/Exceptions/exception-zh.html) | 0 | ||||
-rw-r--r-- | framework/Exceptions/templates/exception.html (renamed from framework/Exceptions/exception.html) | 0 |
15 files changed, 16 insertions, 16 deletions
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/templates/error.html index cff0f910..cff0f910 100644 --- a/framework/Exceptions/error.html +++ b/framework/Exceptions/templates/error.html diff --git a/framework/Exceptions/error404-en.html b/framework/Exceptions/templates/error404-en.html index 11585661..11585661 100644 --- a/framework/Exceptions/error404-en.html +++ b/framework/Exceptions/templates/error404-en.html diff --git a/framework/Exceptions/error404-zh.html b/framework/Exceptions/templates/error404-zh.html index 98ec04d8..98ec04d8 100644 --- a/framework/Exceptions/error404-zh.html +++ b/framework/Exceptions/templates/error404-zh.html diff --git a/framework/Exceptions/error404.html b/framework/Exceptions/templates/error404.html index 11585661..11585661 100644 --- a/framework/Exceptions/error404.html +++ b/framework/Exceptions/templates/error404.html diff --git a/framework/Exceptions/error500-en.html b/framework/Exceptions/templates/error500-en.html index 2f0901fb..2f0901fb 100644 --- a/framework/Exceptions/error500-en.html +++ b/framework/Exceptions/templates/error500-en.html diff --git a/framework/Exceptions/error500-zh.html b/framework/Exceptions/templates/error500-zh.html index 4c7f6436..4c7f6436 100644 --- a/framework/Exceptions/error500-zh.html +++ b/framework/Exceptions/templates/error500-zh.html diff --git a/framework/Exceptions/error500.html b/framework/Exceptions/templates/error500.html index 2f0901fb..2f0901fb 100644 --- a/framework/Exceptions/error500.html +++ b/framework/Exceptions/templates/error500.html diff --git a/framework/Exceptions/error503-en.html b/framework/Exceptions/templates/error503-en.html index 60527c45..60527c45 100644 --- a/framework/Exceptions/error503-en.html +++ b/framework/Exceptions/templates/error503-en.html diff --git a/framework/Exceptions/error503-zh.html b/framework/Exceptions/templates/error503-zh.html index b6b5915c..b6b5915c 100644 --- a/framework/Exceptions/error503-zh.html +++ b/framework/Exceptions/templates/error503-zh.html diff --git a/framework/Exceptions/error503.html b/framework/Exceptions/templates/error503.html index 60527c45..60527c45 100644 --- a/framework/Exceptions/error503.html +++ b/framework/Exceptions/templates/error503.html diff --git a/framework/Exceptions/exception-en.html b/framework/Exceptions/templates/exception-en.html index 67e15dfe..67e15dfe 100644 --- a/framework/Exceptions/exception-en.html +++ b/framework/Exceptions/templates/exception-en.html diff --git a/framework/Exceptions/exception-zh.html b/framework/Exceptions/templates/exception-zh.html index e0897688..e0897688 100644 --- a/framework/Exceptions/exception-zh.html +++ b/framework/Exceptions/templates/exception-zh.html diff --git a/framework/Exceptions/exception.html b/framework/Exceptions/templates/exception.html index 67e15dfe..67e15dfe 100644 --- a/framework/Exceptions/exception.html +++ b/framework/Exceptions/templates/exception.html |