diff options
Diffstat (limited to 'framework')
-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 |
14 files changed, 3 insertions, 3 deletions
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 |