Index: branches/RC/core/units/categories/categories_tag_processor.php =================================================================== diff -u -r9704 -r9713 --- branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 9704) +++ branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 9713) @@ -736,6 +736,12 @@ $module_info = $category_helper->getCategoryModule($params, $parent_path); return $module_info['Var']; } + + function ImageSrc($params) + { + list ($ret, $tag_processed) = $this->processAggregatedTag('ImageSrc', $params, $this->getPrefixSpecial()); + return $tag_processed ? $ret : false; + } } ?> \ No newline at end of file Index: branches/RC/core/units/general/cat_tag_processor.php =================================================================== diff -u -r9598 -r9713 --- branches/RC/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 9598) +++ branches/RC/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 9713) @@ -638,6 +638,12 @@ return $this->ItemLink($params); } + + function ImageSrc($params) + { + list ($ret, $tag_processed) = $this->processAggregatedTag('ImageSrc', $params, $this->getPrefixSpecial()); + return $tag_processed ? $ret : false; + } } ?> \ No newline at end of file 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) Index: branches/RC/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r9657 -r9713 --- branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 9657) +++ branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 9713) @@ -2056,13 +2056,11 @@ /** * Performs image resize to required dimensions and returns resulting url (cached resized image) - * Do not uncomment this method, because kCatDBTagProcessor uses same method, - * but it is invoked via aggregated tag, which brokes down, when this method is uncommented * * @param Array $params * @return string */ - /*function ImageSrc($params) + function ImageSrc($params) { $max_width = isset($params['MaxWidth']) ? $params['MaxWidth'] : false; $max_height = isset($params['MaxHeight']) ? $params['MaxHeight'] : false; @@ -2074,7 +2072,7 @@ $field = $this->SelectParam($params, 'name,field'); return $object->GetField($field, 'resize:'.$max_width.'x'.$max_height.';wm:'.$logo_filename.'|'.$logo_h_margin.'|'.$logo_v_margin); - }*/ + } } ?> \ No newline at end of file