Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/img/progress_left.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.3.2/core/units/general/helpers/recursive_helper.php =================================================================== diff -u -r6438 -r7018 --- branches/unlabeled/unlabeled-1.3.2/core/units/general/helpers/recursive_helper.php (.../recursive_helper.php) (revision 6438) +++ branches/unlabeled/unlabeled-1.3.2/core/units/general/helpers/recursive_helper.php (.../recursive_helper.php) (revision 7018) @@ -85,18 +85,18 @@ * * @param int $category_id */ - function PasteCategory($category_id) + function PasteCategory($category_id, $prefix = 'c') { $backup_category_id = $this->Application->GetVar('m_cat_id'); // 1. clone category - $temp_handler =& $this->Application->recallObject('c_TempHandler', 'kTempTablesHandler'); - $temp_handler->BuildTables('c', Array($category_id)); - $new_category_id = array_pop( $temp_handler->CloneItems('c', '', Array($category_id)) ); + $temp_handler =& $this->Application->recallObject($prefix.'_TempHandler', 'kTempTablesHandler'); + $temp_handler->BuildTables($prefix, Array($category_id)); + $new_category_id = array_pop( $temp_handler->CloneItems($prefix, '', Array($category_id)) ); $this->Application->SetVar('m_cat_id', $new_category_id); - $id_field = $this->Application->getUnitOption('c', 'IDField'); - $table_name = $this->Application->getUnitOption('c', 'TableName'); + $id_field = $this->Application->getUnitOption($prefix, 'IDField'); + $table_name = $this->Application->getUnitOption($prefix, 'TableName'); // 2. assign supplemental items to current category to new category $paste_ids = $this->getCategoryItems($category_id, false); @@ -137,7 +137,7 @@ $sub_categories = $this->Conn->GetCol($sql); if ($sub_categories) { foreach ($sub_categories as $sub_category_id) { - $this->PasteCategory($sub_category_id); + $this->PasteCategory($sub_category_id, $prefix); } } Index: branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r7014 -r7018 --- branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7014) +++ branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7018) @@ -745,7 +745,7 @@ { $block_params['key'] = $key; $block_params['option'] = $val; - $block_params[$selected_param_name] = ( $key == $value ? ' '.$selected : ''); + $block_params[$selected_param_name] = (strlen($key) == strlen($value) && ($key == $value) ? ' '.$selected : ''); $o .= $this->Application->ParseBlock($block_params, 1); } } Index: branches/unlabeled/unlabeled-1.9.2/kernel/units/relationship/relationship_event_handler.php =================================================================== diff -u -r6866 -r7018 --- branches/unlabeled/unlabeled-1.9.2/kernel/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 6866) +++ branches/unlabeled/unlabeled-1.9.2/kernel/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 7018) @@ -235,6 +235,8 @@ if ($prefix == 'm') { $prefix = 'c'; } + if (!$this->Application->prefixRegistred($prefix)) continue; + $configs[$prefix] = $this->Application->getUnitOptions($prefix); if($configs[$prefix] === false) unset($configs[$prefix]); if(!isset($configs[$prefix]['CatalogItem']) || !$configs[$prefix]['CatalogItem']) unset($configs[$prefix]); Index: branches/unlabeled/unlabeled-1.9.2/core/units/relationship/relationship_event_handler.php =================================================================== diff -u -r6866 -r7018 --- branches/unlabeled/unlabeled-1.9.2/core/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 6866) +++ branches/unlabeled/unlabeled-1.9.2/core/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 7018) @@ -235,6 +235,8 @@ if ($prefix == 'm') { $prefix = 'c'; } + if (!$this->Application->prefixRegistred($prefix)) continue; + $configs[$prefix] = $this->Application->getUnitOptions($prefix); if($configs[$prefix] === false) unset($configs[$prefix]); if(!isset($configs[$prefix]['CatalogItem']) || !$configs[$prefix]['CatalogItem']) unset($configs[$prefix]); Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/img/progress_done.gif =================================================================== diff -u Binary files differ Index: branches/unlabeled/unlabeled-1.25.2/core/units/categories/categories_event_handler.php =================================================================== diff -u -r7014 -r7018 --- branches/unlabeled/unlabeled-1.25.2/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 7014) +++ branches/unlabeled/unlabeled-1.25.2/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 7018) @@ -337,6 +337,17 @@ } /** + * Calls kDBEventHandler::OnSave original event + * Used in proj-cms:StructureEventHandler->OnSave + * + * @param kEvent $event + */ + function parentOnSave(&$event) + { + parent::OnSave($event); + } + + /** * Checks cache update mark and redirect to cache if needed * * @param kEvent $event @@ -379,6 +390,8 @@ $ids = $this->StoreSelectedIDs($event); if ($ids) { $recursive_helper =& $this->Application->recallObject('RecursiveHelper'); + /* @var $recursive_helper kRecursiveHelper */ + foreach ($ids as $id) { $recursive_helper->DeleteCategory($id); } @@ -446,13 +459,15 @@ } $recursive_helper =& $this->Application->recallObject('RecursiveHelper'); + /* @var $recursive_helper kRecursiveHelper */ + if ($clipboard_data['cut']) { $recursive_helper->MoveCategories($clipboard_data['cut'], $this->Application->GetVar('m_cat_id')); } if ($clipboard_data['copy']) { foreach ($clipboard_data['copy'] as $id) { - $recursive_helper->PasteCategory($id); + $recursive_helper->PasteCategory($id, $event->Prefix); } }