Index: trunk/kernel/units/categories/categories_event_handler.php =================================================================== diff -u -r5219 -r5326 --- trunk/kernel/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 5219) +++ trunk/kernel/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 5326) @@ -210,17 +210,6 @@ } /** - * Rebuilds category cache - * - * @param kEvent $event - */ - function OnRebuildCache(&$event) - { - $this->Application->StoreVar('PermCache_UpdateRequired', 1); - $event->SetRedirectParam('index_file', 'category/category_maint.php'); - } - - /** * Adds calculates fields for item statuses * * @param kCatDBItem $object @@ -279,7 +268,9 @@ foreach ($cached_fields as $cached_field) { if ($live_object->GetDBField($cached_field) != $temp_object->GetDBField($cached_field)) { - $this->Application->SetVar('require_cache_update', 1); + // use session instead of REQUEST because of permission editing in category can contain + // multiple submits, that changes data before OnSave event occurs + $this->Application->StoreVar('PermCache_UpdateRequired', 1); break; } } @@ -293,11 +284,12 @@ function OnSave(&$event) { parent::OnSave($event); - if ($event->status == erSUCCESS && $this->Application->GetVar('require_cache_update')) { + if ($event->status == erSUCCESS && $this->Application->RecallVar('PermCache_UpdateRequired')) { // "catalog" should be in opener stack by now $opener_stack = unserialize($this->Application->RecallVar('opener_stack')); $opener_stack[0] = str_replace('catalog', 'categories/cache_updater', $opener_stack[0]); $this->Application->StoreVar('opener_stack', serialize($opener_stack)); + $this->Application->RemoveVar('PermCache_UpdateRequired'); } }