From acf77801d4066055cfc3c20e5b634722923f865f Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 13 Feb 2006 03:19:48 +0000 Subject: Anonymous modules are allowed now. --- framework/Web/Services/TPageService.php | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'framework/Web/Services/TPageService.php') diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php index ad1320b3..988f665a 100644 --- a/framework/Web/Services/TPageService.php +++ b/framework/Web/Services/TPageService.php @@ -696,30 +696,14 @@ class TPageConfiguration extends TComponent { $properties=$node->getAttributes(); $type=$properties->remove('class'); - if(($id=$properties->itemAt('id'))===null) - throw new TConfigurationException('pageserviceconf_module_invalid',$configPath); - if(isset($this->_modules[$id])) - { - if($type===null || $type===$this->_modules[$id][0]) - { - $this->_modules[$id][1]=array_merge($this->_modules[$id][1],$properties->toArray()); - $elements=$this->_modules[$id][2]->getElements(); - foreach($node->getElements() as $element) - $elements->add($element); - } - else - { - $node->setParent(null); - $this->_modules[$id]=array($type,$properties->toArray(),$node); - } - } - else if($type===null) + $id=$properties->itemAt('id'); + if($type===null) throw new TConfigurationException('pageserviceconf_moduletype_required',$id,$configPath); + $node->setParent(null); + if($id===null) + $this->_modules[]=array($type,$properties->toArray(),$node); else - { - $node->setParent(null); $this->_modules[$id]=array($type,$properties->toArray(),$node); - } } } -- cgit v1.2.3