Index: branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php =================================================================== diff -u -r5820 -r5833 --- branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5820) +++ branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5833) @@ -1587,41 +1587,6 @@ } /** - * Saves selected category as new import category - * - * @param kEvent $event - */ - function OnSelectItems(&$event) - { - $dst_field = $this->Application->RecallVar('dst_field'); - $items_info = $this->Application->GetVar('c'); - if ($items_info) { - $category_id = array_shift( array_keys($items_info) ); - $sql = 'SELECT CategoryId - FROM '.TABLE_PREFIX.'Category - WHERE ResourceId = '.$category_id; - $category_id = $this->Conn->GetOne($sql); - } - else { - $category_id = 0; - } - - if ($dst_field == 'ImportCategory') { - $this->Application->StoreVar('ImportCategory', $category_id); - $this->Application->StoreVar($event->getPrefixSpecial().'_ForceNotValid', 1); // not to loose import/export values on form refresh - - $this->Application->SetVar($event->getPrefixSpecial().'_id', 0); - $this->Application->SetVar($event->getPrefixSpecial().'_event', 'OnExportBegin'); - - $passed = $this->Application->GetVar('passed'); - $this->Application->SetVar('passed', $passed.','.$event->getPrefixSpecial()); - $event->setEventParam('pass_events', true); - } - - $this->finalizePopup($event); - } - - /** * Process items selected in item_selector * * @param kEvent $event @@ -1633,13 +1598,27 @@ $dst_field = $this->Application->RecallVar('dst_field'); if ($dst_field == 'ItemCategory') { + // Item Edit -> Categories Tab -> New Categories $object =& $event->getObject(); $category_ids = explode(',', $selected_ids['c']); foreach ($category_ids as $category_id) { $object->assignToCategory($category_id); } } + + if ($dst_field == 'ImportCategory') { + // Tools -> Import -> Item Import -> Select Import Category + $this->Application->StoreVar('ImportCategory', $selected_ids['c']); + $this->Application->StoreVar($event->getPrefixSpecial().'_ForceNotValid', 1); // not to loose import/export values on form refresh + $this->Application->SetVar($event->getPrefixSpecial().'_id', 0); + $this->Application->SetVar($event->getPrefixSpecial().'_event', 'OnExportBegin'); + + $passed = $this->Application->GetVar('passed'); + $this->Application->SetVar('passed', $passed.','.$event->getPrefixSpecial()); + $event->setEventParam('pass_events', true); + } + $this->finalizePopup($event); } Index: branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php =================================================================== diff -u -r5795 -r5833 --- branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5795) +++ branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5833) @@ -490,7 +490,7 @@ elseif ($tab_prefixes != 'all') { // prefix list here $tab_prefixes = explode(',', $tab_prefixes); // list of prefixes that should stay - $skip_prefixes = array_diff($prefixes, $tab_prefixes); + $skip_prefixes = array_unique(array_merge($skip_prefixes, array_diff($prefixes, $tab_prefixes))); } $params['name'] = $params['render_as']; Index: branches/unlabeled/unlabeled-1.64.2/core/units/general/cat_event_handler.php =================================================================== diff -u -r5820 -r5833 --- branches/unlabeled/unlabeled-1.64.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5820) +++ branches/unlabeled/unlabeled-1.64.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5833) @@ -1587,41 +1587,6 @@ } /** - * Saves selected category as new import category - * - * @param kEvent $event - */ - function OnSelectItems(&$event) - { - $dst_field = $this->Application->RecallVar('dst_field'); - $items_info = $this->Application->GetVar('c'); - if ($items_info) { - $category_id = array_shift( array_keys($items_info) ); - $sql = 'SELECT CategoryId - FROM '.TABLE_PREFIX.'Category - WHERE ResourceId = '.$category_id; - $category_id = $this->Conn->GetOne($sql); - } - else { - $category_id = 0; - } - - if ($dst_field == 'ImportCategory') { - $this->Application->StoreVar('ImportCategory', $category_id); - $this->Application->StoreVar($event->getPrefixSpecial().'_ForceNotValid', 1); // not to loose import/export values on form refresh - - $this->Application->SetVar($event->getPrefixSpecial().'_id', 0); - $this->Application->SetVar($event->getPrefixSpecial().'_event', 'OnExportBegin'); - - $passed = $this->Application->GetVar('passed'); - $this->Application->SetVar('passed', $passed.','.$event->getPrefixSpecial()); - $event->setEventParam('pass_events', true); - } - - $this->finalizePopup($event); - } - - /** * Process items selected in item_selector * * @param kEvent $event @@ -1633,13 +1598,27 @@ $dst_field = $this->Application->RecallVar('dst_field'); if ($dst_field == 'ItemCategory') { + // Item Edit -> Categories Tab -> New Categories $object =& $event->getObject(); $category_ids = explode(',', $selected_ids['c']); foreach ($category_ids as $category_id) { $object->assignToCategory($category_id); } } + + if ($dst_field == 'ImportCategory') { + // Tools -> Import -> Item Import -> Select Import Category + $this->Application->StoreVar('ImportCategory', $selected_ids['c']); + $this->Application->StoreVar($event->getPrefixSpecial().'_ForceNotValid', 1); // not to loose import/export values on form refresh + $this->Application->SetVar($event->getPrefixSpecial().'_id', 0); + $this->Application->SetVar($event->getPrefixSpecial().'_event', 'OnExportBegin'); + + $passed = $this->Application->GetVar('passed'); + $this->Application->SetVar('passed', $passed.','.$event->getPrefixSpecial()); + $event->setEventParam('pass_events', true); + } + $this->finalizePopup($event); } Index: branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php =================================================================== diff -u -r5795 -r5833 --- branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5795) +++ branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5833) @@ -490,7 +490,7 @@ elseif ($tab_prefixes != 'all') { // prefix list here $tab_prefixes = explode(',', $tab_prefixes); // list of prefixes that should stay - $skip_prefixes = array_diff($prefixes, $tab_prefixes); + $skip_prefixes = array_unique(array_merge($skip_prefixes, array_diff($prefixes, $tab_prefixes))); } $params['name'] = $params['render_as']; Index: branches/unlabeled/unlabeled-1.24.2/kernel/units/admin/admin_tag_processor.php =================================================================== diff -u -r5820 -r5833 --- branches/unlabeled/unlabeled-1.24.2/kernel/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 5820) +++ branches/unlabeled/unlabeled-1.24.2/kernel/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 5833) @@ -386,7 +386,7 @@ function SelectorLink($params) { $mode = 'catalog'; - if (isset($params['mode'])) { + if (isset($params['mode'])) { // {catalog, advanced_view} $mode = $params['mode']; unset($params['mode']); } Index: branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/img/toolbar/tool_new_link_f2.gif =================================================================== diff -u -r5187 -r5833 Binary files differ Index: branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/img/toolbar/tool_new_link_f3.gif =================================================================== diff -u -r5187 -r5833 Binary files differ Index: branches/unlabeled/unlabeled-1.24.2/core/units/admin/admin_tag_processor.php =================================================================== diff -u -r5820 -r5833 --- branches/unlabeled/unlabeled-1.24.2/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 5820) +++ branches/unlabeled/unlabeled-1.24.2/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 5833) @@ -386,7 +386,7 @@ function SelectorLink($params) { $mode = 'catalog'; - if (isset($params['mode'])) { + if (isset($params['mode'])) { // {catalog, advanced_view} $mode = $params['mode']; unset($params['mode']); } Index: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/index.tpl =================================================================== diff -u -r5566 -r5833 --- branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/index.tpl (.../index.tpl) (revision 5566) +++ branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/index.tpl (.../index.tpl) (revision 5833) @@ -38,10 +38,10 @@ - " name="head" scrolling="no" noresize> + " name="head" scrolling="no" noresize>