diff options
author | ctrlaltca@gmail.com <> | 2011-11-19 14:53:57 +0000 |
---|---|---|
committer | ctrlaltca@gmail.com <> | 2011-11-19 14:53:57 +0000 |
commit | 6fa35ef1af363599a615aa66cb14e12ac905fc08 (patch) | |
tree | 123dce3565ce319003ec67da0eb05ee65505b620 /framework | |
parent | d782ffa2a4f55cb2ef66cf80d000f2bf5c195024 (diff) |
fix for #35
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Web/Services/TPageService.php | 12 |
1 files changed, 10 insertions, 2 deletions
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;
}
|