Index: branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php
===================================================================
diff -u -r5644 -r5802
--- branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5644)
+++ branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5802)
@@ -294,7 +294,7 @@
$object->addFilter('perm_filter2', $view_filter);
$object->addFilter('status_filter', $object->TableName.'.Status = 1');
}
-
+
$types = $event->getEventParam('types');
$except_types = $event->getEventParam('except');
$type_clauses = $this->getTypeClauses($event);
@@ -393,7 +393,9 @@
function prepareObject(&$object, &$event)
{
$this->prepareItemStatuses($event);
-
+
+ $object->addCalculatedField('CachedNavbar', 'l'.$this->Application->GetVar('m_lang').'_CachedNavbar');
+
if ($event->Special == 'export' || $event->Special == 'import')
{
$this->prepareExportColumns($event);
Index: branches/unlabeled/unlabeled-1.3.2/core/admin_templates/categories/ci_blocks.tpl
===================================================================
diff -u -r5795 -r5802
--- branches/unlabeled/unlabeled-1.3.2/core/admin_templates/categories/ci_blocks.tpl (.../ci_blocks.tpl) (revision 5795)
+++ branches/unlabeled/unlabeled-1.3.2/core/admin_templates/categories/ci_blocks.tpl (.../ci_blocks.tpl) (revision 5802)
@@ -17,6 +17,12 @@
+
+
+
+ |
+
+
Index: branches/unlabeled/unlabeled-1.64.2/core/units/general/cat_event_handler.php
===================================================================
diff -u -r5644 -r5802
--- branches/unlabeled/unlabeled-1.64.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5644)
+++ branches/unlabeled/unlabeled-1.64.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5802)
@@ -294,7 +294,7 @@
$object->addFilter('perm_filter2', $view_filter);
$object->addFilter('status_filter', $object->TableName.'.Status = 1');
}
-
+
$types = $event->getEventParam('types');
$except_types = $event->getEventParam('except');
$type_clauses = $this->getTypeClauses($event);
@@ -393,7 +393,9 @@
function prepareObject(&$object, &$event)
{
$this->prepareItemStatuses($event);
-
+
+ $object->addCalculatedField('CachedNavbar', 'l'.$this->Application->GetVar('m_lang').'_CachedNavbar');
+
if ($event->Special == 'export' || $event->Special == 'import')
{
$this->prepareExportColumns($event);
Index: branches/unlabeled/unlabeled-1.3.2/kernel/admin_templates/categories/ci_blocks.tpl
===================================================================
diff -u -r5795 -r5802
--- branches/unlabeled/unlabeled-1.3.2/kernel/admin_templates/categories/ci_blocks.tpl (.../ci_blocks.tpl) (revision 5795)
+++ branches/unlabeled/unlabeled-1.3.2/kernel/admin_templates/categories/ci_blocks.tpl (.../ci_blocks.tpl) (revision 5802)
@@ -17,6 +17,12 @@
+
+
+
+ |
+
+
Index: branches/unlabeled/unlabeled-1.11.2/kernel/units/general/cat_tag_processor.php
===================================================================
diff -u -r5735 -r5802
--- branches/unlabeled/unlabeled-1.11.2/kernel/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5735)
+++ branches/unlabeled/unlabeled-1.11.2/kernel/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5802)
@@ -160,8 +160,36 @@
$params['cat_prefix'] = trim('c.'.($tab_params['special'] ? $tab_params['special'] : $this->Special), '.');
$params['tab_mode'] = $tab_params['mode'];
$params['tab_dependant'] = $tab_params['dependant'];
+ $params['show_category'] = $tab_params['special'] == 'showall' ? 1 : 0; // this is advanced view -> show category name
+
return $this->Application->ParseBlock($params, 1);
}
+
+ /**
+ * Show CachedNavbar of current item primary category
+ *
+ * @param Array $params
+ * @return string
+ */
+ function CategoryName($params)
+ {
+ // show category cachednavbar of
+ $object =& $this->getObject($params);
+ $category_id = isset($params['cat_id']) ? $params['cat_id'] : $object->GetDBField('CategoryId');
+
+ $category_path = $this->Application->getCache('category_paths', $category_id);
+ if ($category_path === false) {
+ // not chached
+ if ($category_id > 0) {
+ $category_path = trim($this->CategoryName( Array('cat_id' => 0) ).' > '.str_replace('&|&', ' > ', $object->GetDBField('CachedNavbar')), ' > ');
+ }
+ else {
+ $category_path = $this->Application->Phrase( $this->Application->ConfigValue('Root_Name') );
+ }
+ $this->Application->setCache('category_paths', $category_id, $category_path);
+ }
+ return $category_path;
+ }
}
?>
\ No newline at end of file
Index: branches/unlabeled/unlabeled-1.11.2/core/units/general/cat_tag_processor.php
===================================================================
diff -u -r5735 -r5802
--- branches/unlabeled/unlabeled-1.11.2/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5735)
+++ branches/unlabeled/unlabeled-1.11.2/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5802)
@@ -160,8 +160,36 @@
$params['cat_prefix'] = trim('c.'.($tab_params['special'] ? $tab_params['special'] : $this->Special), '.');
$params['tab_mode'] = $tab_params['mode'];
$params['tab_dependant'] = $tab_params['dependant'];
+ $params['show_category'] = $tab_params['special'] == 'showall' ? 1 : 0; // this is advanced view -> show category name
+
return $this->Application->ParseBlock($params, 1);
}
+
+ /**
+ * Show CachedNavbar of current item primary category
+ *
+ * @param Array $params
+ * @return string
+ */
+ function CategoryName($params)
+ {
+ // show category cachednavbar of
+ $object =& $this->getObject($params);
+ $category_id = isset($params['cat_id']) ? $params['cat_id'] : $object->GetDBField('CategoryId');
+
+ $category_path = $this->Application->getCache('category_paths', $category_id);
+ if ($category_path === false) {
+ // not chached
+ if ($category_id > 0) {
+ $category_path = trim($this->CategoryName( Array('cat_id' => 0) ).' > '.str_replace('&|&', ' > ', $object->GetDBField('CachedNavbar')), ' > ');
+ }
+ else {
+ $category_path = $this->Application->Phrase( $this->Application->ConfigValue('Root_Name') );
+ }
+ $this->Application->setCache('category_paths', $category_id, $category_path);
+ }
+ return $category_path;
+ }
}
?>
\ No newline at end of file