Index: branches/5.1.x/core/kernel/processors/tag_processor.php
===================================================================
diff -u -r12127 -r12657
--- branches/5.1.x/core/kernel/processors/tag_processor.php (.../tag_processor.php) (revision 12127)
+++ branches/5.1.x/core/kernel/processors/tag_processor.php (.../tag_processor.php) (revision 12657)
@@ -1,6 +1,6 @@
ProcessParsedTag($tag->Tag, $tag->NP, $tag->getPrefixSpecial());
-
- /*$Method=$tag->Tag;
- if(method_exists($this, $Method))
- {
- //echo htmlspecialchars($tag->GetFullTag()).'
';
- return $this->$Method($tag->NP);
- }
- else
- {
- if ($this->Application->hasObject('TagsAggregator')) {
- $aggregator =& $this->Application->recallObject('TagsAggregator');
- $tag_mapping = $aggregator->GetArrayValue($tag->Prefix, $Method);
- if ($tag_mapping) {
-
- $mapped_tag = new Tag('', $this->Application->Parser);
- $mapped_tag->CopyFrom($tag);
- $mapped_tag->Processor = $tag_mapping[0];
- $mapped_tag->Tag = $tag_mapping[1];
- $mapped_tag->NP['PrefixSpecial'] = $tag->getPrefixSpecial();
- $mapped_tag->RebuildTagData();
- return $mapped_tag->DoProcessTag();
- }
- }
- trigger_error('Tag '.$Method.' Undefined in '.get_class($this).'[Agregated Tag]:
'.$tag->RebuildTagData().'',E_USER_WARNING);
- return false;
- }*/
}
function CheckTag($tag, $prefix)
@@ -91,7 +67,7 @@
{
$Method = $tag;
if (method_exists($this, $Method)) {
- if ($this->Application->isDebugMode() && constOn('DBG_SHOW_TAGS')) {
+ if (defined('DEBUG_MODE') && defined('DBG_SHOW_TAGS') && DBG_SHOW_TAGS && $this->Application->isDebugMode()) {
$this->Application->Debugger->appendHTML('Processing PreParsed Tag '.$Method.' in '.$this->Prefix);
}
@@ -256,6 +232,38 @@
return false;
}
+
+ /**
+ * Returns templates path for module, which is gathered from prefix module
+ *
+ * @param Array $params
+ * @return string
+ * @author Alex
+ */
+ function ModulePath($params)
+ {
+ $force_module = getArrayValue($params, 'module');
+ if ($force_module) {
+ if ($force_module == '#session#') {
+ $force_module = preg_replace('/([^:]*):.*/', '\1', $this->Application->RecallVar('module'));
+ if (!$force_module) $force_module = 'core';
+ }
+ else {
+ $force_module = mb_strtolower($force_module);
+ }
+
+ if ($force_module == 'core') {
+ $module_folder = 'core';
+ }
+ else {
+ $module_folder = trim( $this->Application->findModule('Name', $force_module, 'Path'), '/');
+ }
+ }
+ else {
+ $module_folder = $this->Application->getUnitOption($this->Prefix, 'ModuleFolder');
+ }
+ return '../../'.$module_folder.'/admin_templates/';
+ }
}
/*class ProcessorsPool {
@@ -302,6 +310,4 @@
$this->CreateProcessor($prefix, $tag);
return $this->Processors[$prefix];
}
-}*/
-
-?>
\ No newline at end of file
+}*/
\ No newline at end of file