Index: trunk/kernel/units/categories/categories_event_handler.php =================================================================== diff -u -N -r5218 -r5219 --- trunk/kernel/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 5218) +++ trunk/kernel/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 5219) @@ -63,7 +63,7 @@ } $object->addFilter('parent_filter', 'ParentId = '.$parent_cat_id); - + $object->addFilter('perm_filter', 'PermId = 1'); // check for CATEGORY.VIEW permission if ($this->Application->GetVar('u_id') > 0) { // apply permission filters to all users except "root" @@ -208,7 +208,7 @@ return parent::getPassedID($event); } - + /** * Rebuilds category cache * @@ -237,7 +237,7 @@ %1$s.NewItem )'); } - + /** * Set correct parent path for newly created categories * @@ -248,12 +248,12 @@ if ($event->getEventParam('temp_id') == 0) { $object =& $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true, 'live_table' => true)); $object->Load($event->getEventParam('id')); - + $fields_hash = Array('ParentPath' => $object->buildParentPath()); $this->Conn->doUpdate($fields_hash, $object->TableName, 'CategoryId = '.$object->GetID()); } } - + /** * Set cache modification mark if needed * @@ -267,24 +267,24 @@ $this->Application->SetVar('require_cache_update', 1); return ; } - + // existing category was edited, check if in-cache fields are modified $temp_object =& $event->getObject( Array('skip_autoload' => true) ); $temp_object->Load($id); - + $live_object =& $this->Application->recallObject($event->Prefix.'.-item', null, Array('live_table' => true)); $live_object->Load($id); - + $cached_fields = Array('Name', 'Filename', 'CategoryTemplate', 'ItemTemplate'); - + foreach ($cached_fields as $cached_field) { if ($live_object->GetDBField($cached_field) != $temp_object->GetDBField($cached_field)) { $this->Application->SetVar('require_cache_update', 1); break; } } } - + /** * Checks cache update mark and redirect to cache if needed * @@ -300,7 +300,7 @@ $this->Application->StoreVar('opener_stack', serialize($opener_stack)); } } - + /** * Deletes all selected items. * Automatically recurse into sub-items using temp handler, and deletes sub-items