Index: branches/5.3.x/core/kernel/db/db_event_handler.php =================================================================== diff -u -N -r16111 -r16395 --- branches/5.3.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 16111) +++ branches/5.3.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 16395) @@ -1,6 +1,6 @@ Application->GetVar($event->getPrefixSpecial(true) . '_id'); if ( ($ret !== false) && ($ret != '') ) { + $event->setEventParam(kEvent::FLAG_ID_FROM_REQUEST, true); + return $ret; } // 2. get id from env (used in front) $ret = $this->Application->GetVar($event->getPrefixSpecial() . '_id'); if ( ($ret !== false) && ($ret != '') ) { + $event->setEventParam(kEvent::FLAG_ID_FROM_REQUEST, true); + return $ret; } @@ -254,11 +258,20 @@ $ids = explode(',', $ids); if ( $ids ) { $ret = array_shift($ids); + $event->setEventParam(kEvent::FLAG_ID_FROM_REQUEST, true); } } else { // if selected ids are not yet stored $this->StoreSelectedIDs($event); - return $this->Application->GetVar($event->getPrefixSpecial() . '_id'); // StoreSelectedIDs sets this variable + + // StoreSelectedIDs sets this variable. + $ret = $this->Application->GetVar($event->getPrefixSpecial() . '_id'); + + if ( ($ret !== false) && ($ret != '') ) { + $event->setEventParam(kEvent::FLAG_ID_FROM_REQUEST, true); + + return $ret; + } } return $ret; @@ -551,8 +564,12 @@ $status_checked = true; $editing_mode = defined('EDITING_MODE') ? EDITING_MODE : false; + $id_from_request = $event->getEventParam(kEvent::FLAG_ID_FROM_REQUEST); - if ( $user_id != USER_ROOT && !$this->Application->isAdmin && !($editing_mode || $this->checkItemStatus($event)) ) { + if ( $user_id != USER_ROOT + && !$this->Application->isAdmin + && !($editing_mode || ($id_from_request ? $this->checkItemStatus($event) : true)) + ) { // non-root user AND on front-end AND (not editing mode || incorrect status) $perm_status = false; } @@ -2949,14 +2966,9 @@ $this->Application->LinkVar('export_finish_t'); $this->Application->LinkVar('export_progress_t'); - $this->Application->StoreVar('export_oroginal_special', $event->Special); + $this->Application->StoreVar('export_special', $event->Special); + $this->Application->StoreVar('export_grid', $this->Application->GetVar('grid', 'Default')); - $export_helper = $this->Application->recallObject('CatItemExportHelper'); - - /*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);*/ - $redirect_params = Array ( $this->Prefix . '.export_event' => 'OnNew', 'pass' => 'all,' . $this->Prefix . '.export'