Index: branches/unlabeled/unlabeled-1.22.2/kernel/units/categories/categories_event_handler.php =================================================================== diff -u -N -r5625 -r5627 --- branches/unlabeled/unlabeled-1.22.2/kernel/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 5625) +++ branches/unlabeled/unlabeled-1.22.2/kernel/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 5627) @@ -295,16 +295,6 @@ } parent::OnSave($event); - $this->UpdateCategoryCache($event); - } - - /** - * Redirects to Category Cache Updater - * - * @param kEvent $event - */ - function UpdateCategoryCache(&$event) - { 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')); @@ -372,6 +362,10 @@ foreach ($clipboard as $prefix => $clipboard_data) { $paste_event = new kEvent($prefix.':OnPaste', Array('clipboard_data' => $clipboard_data)); $this->Application->HandleEvent($paste_event); + + $event->redirect = $paste_event->redirect; + $event->redirect_params = $paste_event->redirect_params; + $event->status = $paste_event->status; } } @@ -394,7 +388,7 @@ $recursive_helper =& $this->Application->recallObject('RecursiveHelper'); if ($clipboard_data['cut']) { - $recursive_helper->MoveCategories($clipboard_data['cut']); + $recursive_helper->MoveCategories($clipboard_data['cut'], $this->Application->GetVar('m_cat_id')); } if ($clipboard_data['copy']) { @@ -404,7 +398,10 @@ } if ($clipboard_data['cut'] || $clipboard_data['copy']) { - $this->UpdateCategoryCache($event); + if ($this->Application->RecallVar('PermCache_UpdateRequired')) { + $this->Application->RemoveVar('PermCache_UpdateRequired'); + $event->redirect = 'categories/cache_updater'; + } } }