Index: branches/RC/core/kernel/db/db_event_handler.php =================================================================== diff -u -N -r11501 -r11546 --- branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 11501) +++ branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 11546) @@ -515,33 +515,14 @@ } /** - * Enter description here... + * Checks, that object used in event should use temp tables * * @param kEvent $event - * @return unknown + * @return bool */ function UseTempTables(&$event) { - $object = &$event->getObject(); - $top_prefix = $this->Application->GetTopmostPrefix($event->Prefix); - - $var_names = Array ( - $top_prefix, - rtrim($top_prefix.'_'.$event->Special, '_'), - rtrim($top_prefix.'.'.$event->Special, '.'), - ); - $var_names = array_unique($var_names); - - $temp_mode = false; - foreach ($var_names as $var_name) { - $value = $this->Application->GetVar($var_name.'_mode'); - if (substr($value, 0, 1) == 't') { - $temp_mode = true; - break; - } - } - - return $temp_mode; + return $this->Application->IsTempMode($event->Prefix, $event->Special); } /** @@ -2106,8 +2087,7 @@ */ function OnExport(&$event) { - $this->StoreSelectedIDs($event); - $selected_ids = $this->getSelectedIDs($event); + $selected_ids = $this->StoreSelectedIDs($event); if (implode(',', $selected_ids) == '') { // K4 fix when no ids found bad selected ids array is formed @@ -2116,20 +2096,20 @@ $this->Application->StoreVar($event->Prefix.'_export_ids', $selected_ids ? implode(',', $selected_ids) : '' ); - $export_t = $this->Application->GetVar('export_template'); $this->Application->LinkVar('export_finish_t'); $this->Application->LinkVar('export_progress_t'); $this->Application->StoreVar('export_oroginal_special', $event->Special); + $export_helper =& $this->Application->recallObject('CatItemExportHelper'); - $event->redirect = $export_t ? $export_t : $export_helper->getModuleFolder($event).'/export'; - list($index_file, $env) = explode('|', $this->Application->RecallVar('last_template')); + /*list ($index_file, $env) = explode('|', $this->Application->RecallVar('last_template')); $finish_url = $this->Application->BaseURL('/admin').$index_file.'?'.ENV_VAR_NAME.'='.$env; - $this->Application->StoreVar('export_finish_url', $finish_url); + $this->Application->StoreVar('export_finish_url', $finish_url);*/ - $redirect_params = Array( - $this->Prefix.'.export_event' => 'OnNew', - 'pass' => 'all,'.$this->Prefix.'.export'); + $redirect_params = Array ( + $this->Prefix . '.export_event' => 'OnNew', + 'pass' => 'all,' . $this->Prefix . '.export' + ); $event->setRedirectParams($redirect_params); }