diff options
Diffstat (limited to 'framework/Web/Services/TPageService.php')
-rw-r--r-- | framework/Web/Services/TPageService.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php index a52efd13..2973e67b 100644 --- a/framework/Web/Services/TPageService.php +++ b/framework/Web/Services/TPageService.php @@ -495,8 +495,9 @@ class TPageService extends \Prado\TService { $className=basename($path); $namespacedClassName = static::PAGE_NAMESPACE_PREFIX .str_replace('.', '\\', $pagePath); - if(!class_exists($className,false) && !class_exists($namespacedClassName, false)) - include_once($path.Prado::CLASS_FILE_EXT); + + if(!class_exists($className,false) && !class_exists($namespacedClassName, false)) + include_once($path.Prado::CLASS_FILE_EXT); if(!class_exists($className,false)) $className = $namespacedClassName; @@ -504,6 +505,9 @@ class TPageService extends \Prado\TService else { $className=$this->getBasePageClass(); + Prado::using($className); + if(($pos=strrpos($className,'.'))!==false) + $className=substr($className,$pos+1); } if(!class_exists($className,false) || ($className!=='TPage' && !is_subclass_of($className,'TPage'))) |