Index: branches/RC/core/kernel/processors/tag_processor.php =================================================================== diff -u -r9360 -r9713 --- branches/RC/core/kernel/processors/tag_processor.php (.../tag_processor.php) (revision 9360) +++ branches/RC/core/kernel/processors/tag_processor.php (.../tag_processor.php) (revision 9713) @@ -62,8 +62,7 @@ function ProcessParsedTag($tag, $params, $prefix, $file='unknown', $line=0) { $Method = $tag; - if(method_exists($this, $Method)) - { + if (method_exists($this, $Method)) { if ($this->Application->isDebugMode() && constOn('DBG_SHOW_TAGS')) { $this->Application->Debugger->appendHTML('Processing PreParsed Tag '.$Method.' in '.$this->Prefix); } @@ -83,40 +82,54 @@ $this->Prefix = $backup_prefix; $this->Special = $backup_special; - $ret = $this->PostProcess($ret, $flag_values); + return $this->PostProcess($ret, $flag_values); + } + else { + list ($ret, $tag_found) = $this->processAggregatedTag($tag, $params, $prefix, $file, $line); - return $ret; + if ($tag_found) { + return $ret; + } + + $this->Application->handleError(E_USER_ERROR, 'Tag Undefined:
'.$prefix.':'.$tag.'', $file, $line); + return false; } - else - { - if ($this->Application->hasObject('TagsAggregator')) { - $aggregator =& $this->Application->recallObject('TagsAggregator'); - $tmp = $this->Application->processPrefix($prefix); - $tag_mapping = $aggregator->GetArrayValue($tmp['prefix'], $Method); - if ($tag_mapping) { - $tmp = $this->Application->processPrefix($tag_mapping[0]); - $__tag_processor = $tmp['prefix'].'_TagProcessor'; - $processor =& $this->Application->recallObject($__tag_processor); - $processor->Prefix = $tmp['prefix']; - $processor->Special = getArrayValue($tag_mapping, 2) ? $tag_mapping[2] : $tmp['special']; + } - $params['original_tag'] = $Method; // allows to define same method for different aggregated tags in same tag processor - $params['PrefixSpecial'] = $this->getPrefixSpecial(); // $prefix; - $ret = $processor->ProcessParsedTag($tag_mapping[1], $params, $prefix); - if (isset($params['result_to_var'])) { - $this->Application->Parser->SetParam($params['result_to_var'], $ret); - $ret = ''; - } - return $ret; + function processAggregatedTag($tag, $params, $prefix, $file = 'unknown', $line = 0) + { + if ($this->Application->hasObject('TagsAggregator')) { + $Method = $tag; + $aggregator =& $this->Application->recallObject('TagsAggregator'); + $tmp = $this->Application->processPrefix($prefix); + $tag_mapping = $aggregator->GetArrayValue($tmp['prefix'], $Method); + if ($tag_mapping) { + // aggregated tag defined + $tmp = $this->Application->processPrefix($tag_mapping[0]); + $__tag_processor = $tmp['prefix'].'_TagProcessor'; + $processor =& $this->Application->recallObject($__tag_processor); + $processor->Prefix = $tmp['prefix']; + $processor->Special = getArrayValue($tag_mapping, 2) ? $tag_mapping[2] : $tmp['special']; + + $params['original_tag'] = $Method; // allows to define same method for different aggregated tags in same tag processor + $params['PrefixSpecial'] = $this->getPrefixSpecial(); // $prefix; + $ret = $processor->ProcessParsedTag($tag_mapping[1], $params, $prefix); + if (isset($params['result_to_var'])) { + $this->Application->Parser->SetParam($params['result_to_var'], $ret); + $ret = ''; } + return Array ($ret, true); + } + else { + // aggregated tag not defined if ($this->Application->isDebugMode()) { $this->Application->Debugger->appendTrace(); } $this->Application->handleError(E_USER_ERROR, 'Tag '.$Method.' Undefined in '.get_class($this).'[Agregated Tag]:
'.$tag.'', $file, $line); } - $this->Application->handleError(E_USER_ERROR, 'Tag Undefined:
'.$prefix.':'.$tag.'', $file, $line); - return false; } + + return Array ('', false); } function PreparePostProcess(&$params)