From 6fa35ef1af363599a615aa66cb14e12ac905fc08 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Sat, 19 Nov 2011 14:53:57 +0000 Subject: fix for #35 --- framework/Web/Services/TPageService.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'framework') diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php index 0d2c1e86..a9b74724 100644 --- a/framework/Web/Services/TPageService.php +++ b/framework/Web/Services/TPageService.php @@ -92,7 +92,11 @@ class TPageService extends TService implements IPageEvents /** * Default base path */ - const DEFAULT_BASEPATH='pages'; + const DEFAULT_BASEPATH='Pages'; + /** + * Fallback base path - used to be the default up to Prado < 3.2 + */ + const FALLBACK_BASEPATH='pages'; /** * Prefix of ID used for storing parsed configuration in cache */ @@ -426,7 +430,11 @@ class TPageService extends TService implements IPageEvents { $basePath=$this->getApplication()->getBasePath().DIRECTORY_SEPARATOR.self::DEFAULT_BASEPATH; if(($this->_basePath=realpath($basePath))===false || !is_dir($this->_basePath)) - throw new TConfigurationException('pageservice_basepath_invalid',$basePath); + { + $basePath=$this->getApplication()->getBasePath().DIRECTORY_SEPARATOR.self::FALLBACK_BASEPATH; + if(($this->_basePath=realpath($basePath))===false || !is_dir($this->_basePath)) + throw new TConfigurationException('pageservice_basepath_invalid',$basePath); + } } return $this->_basePath; } -- cgit v1.2.3