Index: trunk/core/kernel/db/db_event_handler.php =================================================================== diff -u -r4471 -r4528 --- trunk/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 4471) +++ trunk/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 4528) @@ -70,12 +70,10 @@ */ function getPassedID(&$event) { - // ?? We don't need to store selected id in session, as long as we have pass=all by default, which - // means that main item id will be passed to all sub-item screens by default - // another prove of that is that sub-items relay on main item '_mode' = 't' for switching to temp tables - // Also having id in session raised problems with the id of deleted item stuck in session + if ($event->getEventParam('raise_warnings') === false) { + $event->setEventParam('raise_warnings', 1); + } - // 1. get id from post (used in admin) $ret = $this->Application->GetVar($event->getPrefixSpecial(true).'_id'); if($ret) return $ret; @@ -139,10 +137,9 @@ // This is critical - otherwise getPassedID will return last ID stored in session! (not exactly true) // this smells... needs to be refactored $first_id = getArrayValue($ret,0); - if ($first_id === false) { + if (($first_id === false) && ($event->getEventParam('raise_warnings') == 1)) { trigger_error('Requested ID for prefix '.$event->getPrefixSpecial().' not passed',E_USER_NOTICE); } - $this->Application->SetVar($event->getPrefixSpecial(true).'_id', $first_id); return $ret; } @@ -295,7 +292,7 @@ if ($object->Load($id) ) { $actions =& $this->Application->recallObject('kActions'); - $actions->Set($event->Prefix_Special.'_id', $object->GetId() ); + $actions->Set($event->Prefix_Special.'_id', $object->GetID() ); } else {