summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/Web/Services/TPageService.php6
-rw-r--r--framework/Web/UI/TPage.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php
index 39f659e9..90222df5 100644
--- a/framework/Web/Services/TPageService.php
+++ b/framework/Web/Services/TPageService.php
@@ -742,9 +742,9 @@ class TPageConfiguration extends TComponent
foreach($pagesNode->getElementsByTagName('page') as $node)
{
$properties=$node->getAttributes();
- $type=$properties->remove('class');
- $id=$properties->itemAt('id');
- if($id===null || $type===null)
+ if(($type=$properties->remove('class'))===null)
+ $type='TPage';
+ if(($id=$properties->itemAt('id'))===null)
throw new TConfigurationException('pageserviceconf_page_invalid',$configPath);
if($id===$page)
{
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php
index e01cb7f5..69b0cc31 100644
--- a/framework/Web/UI/TPage.php
+++ b/framework/Web/UI/TPage.php
@@ -212,7 +212,7 @@ class TPage extends TTemplateControl
*/
public function setTemplateFile($value)
{
- if(($templateFile=Prado::getPathOfNamespace($value,TTemplateManager::TEMPLATE_FILE_EXT))===null)
+ if(($templateFile=Prado::getPathOfNamespace($value,TTemplateManager::TEMPLATE_FILE_EXT))===null || !is_file($templateFile))
throw new TInvalidDataValueException('page_templatefile_invalid',$value);
else
$this->_templateFile=$templateFile;