Index: branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php
===================================================================
diff -u -r5609 -r5614
--- branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5609)
+++ branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5614)
@@ -394,7 +394,7 @@
if (!$temp_tables) {
$this->Application->RemoveVar($top_prefix.'_modified');
- return 'flag remoeved';
+ return '';
}
$block_name = $this->SelectParam($params, 'render_as,name');
Index: branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php
===================================================================
diff -u -r5609 -r5614
--- branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5609)
+++ branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5614)
@@ -394,7 +394,7 @@
if (!$temp_tables) {
$this->Application->RemoveVar($top_prefix.'_modified');
- return 'flag remoeved';
+ return '';
}
$block_name = $this->SelectParam($params, 'render_as,name');
Index: branches/unlabeled/unlabeled-1.2.2/core/admin_templates/categories/categories_tabs.tpl
===================================================================
diff -u -r5551 -r5614
--- branches/unlabeled/unlabeled-1.2.2/core/admin_templates/categories/categories_tabs.tpl (.../categories_tabs.tpl) (revision 5551)
+++ branches/unlabeled/unlabeled-1.2.2/core/admin_templates/categories/categories_tabs.tpl (.../categories_tabs.tpl) (revision 5614)
@@ -16,12 +16,16 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
|
Index: branches/unlabeled/unlabeled-1.23.2/kernel/admin_templates/catalog.tpl
===================================================================
diff -u -r5613 -r5614
--- branches/unlabeled/unlabeled-1.23.2/kernel/admin_templates/catalog.tpl (.../catalog.tpl) (revision 5613)
+++ branches/unlabeled/unlabeled-1.23.2/kernel/admin_templates/catalog.tpl (.../catalog.tpl) (revision 5614)
@@ -41,9 +41,11 @@
a_toolbar.AddButton( new ToolBarButton('editcat', '', function() {
- $edit_url = '';
- window.location.href = $edit_url.replace('#CATEGORY_ID#', get_hidden_field('m_cat_id'));
-
+ var $edit_url = '';
+ var $category_id = get_hidden_field('m_cat_id');
+ var $redirect_url = $edit_url.replace('#CATEGORY_ID#', $category_id);
+ $redirect_url = $redirect_url.replace('#TEMPLATE#', $category_id > 0 ? 'categories/categories_edit' : 'categories/categories_edit_permissions');
+ redirect($redirect_url);
}
) );
Index: branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/categories/categories_tabs.tpl
===================================================================
diff -u -r5551 -r5614
--- branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/categories/categories_tabs.tpl (.../categories_tabs.tpl) (revision 5551)
+++ branches/unlabeled/unlabeled-1.2.2/kernel/admin_templates/categories/categories_tabs.tpl (.../categories_tabs.tpl) (revision 5614)
@@ -16,12 +16,16 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
|
Index: branches/unlabeled/unlabeled-1.8.2/kernel/units/permissions/permissions_tag_processor.php
===================================================================
diff -u -r5552 -r5614
--- branches/unlabeled/unlabeled-1.8.2/kernel/units/permissions/permissions_tag_processor.php (.../permissions_tag_processor.php) (revision 5552)
+++ branches/unlabeled/unlabeled-1.8.2/kernel/units/permissions/permissions_tag_processor.php (.../permissions_tag_processor.php) (revision 5614)
@@ -67,9 +67,15 @@
$perm_live_table = $this->Application->getUnitOption('c-perm', 'TableName');
$perm_temp_table = $this->Application->GetTempName($perm_live_table);
-
- $categories = explode('|', substr($category->GetDBField('ParentPath'), 1, -1));
- if (count($categories) == 1) {
+
+ if ($category->GetID() == 0) {
+ $categories = Array(0);
+ }
+ else {
+ $categories = explode('|', substr($category->GetDBField('ParentPath'), 1, -1));
+ }
+
+ if (count($categories) == 1 || $category->GetID() == 0) {
// category located in root category ("Home") => then add it to path virtually
array_unshift($categories, 0);
}
Index: branches/unlabeled/unlabeled-1.8.2/core/units/permissions/permissions_tag_processor.php
===================================================================
diff -u -r5552 -r5614
--- branches/unlabeled/unlabeled-1.8.2/core/units/permissions/permissions_tag_processor.php (.../permissions_tag_processor.php) (revision 5552)
+++ branches/unlabeled/unlabeled-1.8.2/core/units/permissions/permissions_tag_processor.php (.../permissions_tag_processor.php) (revision 5614)
@@ -67,9 +67,15 @@
$perm_live_table = $this->Application->getUnitOption('c-perm', 'TableName');
$perm_temp_table = $this->Application->GetTempName($perm_live_table);
-
- $categories = explode('|', substr($category->GetDBField('ParentPath'), 1, -1));
- if (count($categories) == 1) {
+
+ if ($category->GetID() == 0) {
+ $categories = Array(0);
+ }
+ else {
+ $categories = explode('|', substr($category->GetDBField('ParentPath'), 1, -1));
+ }
+
+ if (count($categories) == 1 || $category->GetID() == 0) {
// category located in root category ("Home") => then add it to path virtually
array_unshift($categories, 0);
}
Index: branches/unlabeled/unlabeled-1.23.2/core/admin_templates/catalog/catalog.tpl
===================================================================
diff -u -r5613 -r5614
--- branches/unlabeled/unlabeled-1.23.2/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 5613)
+++ branches/unlabeled/unlabeled-1.23.2/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 5614)
@@ -41,9 +41,11 @@
a_toolbar.AddButton( new ToolBarButton('editcat', '', function() {
- $edit_url = '';
- window.location.href = $edit_url.replace('#CATEGORY_ID#', get_hidden_field('m_cat_id'));
-
+ var $edit_url = '';
+ var $category_id = get_hidden_field('m_cat_id');
+ var $redirect_url = $edit_url.replace('#CATEGORY_ID#', $category_id);
+ $redirect_url = $redirect_url.replace('#TEMPLATE#', $category_id > 0 ? 'categories/categories_edit' : 'categories/categories_edit_permissions');
+ redirect($redirect_url);
}
) );