Index: branches/5.2.x/core/kernel/db/db_event_handler.php =================================================================== diff -u -N -r16339 -r16379 --- branches/5.2.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 16339) +++ branches/5.2.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 16379) @@ -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; } @@ -258,11 +262,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; @@ -554,8 +567,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; } Index: branches/5.2.x/core/units/languages/languages_event_handler.php =================================================================== diff -u -N -r16353 -r16379 --- branches/5.2.x/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 16353) +++ branches/5.2.x/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 16379) @@ -1,6 +1,6 @@ setEventParam(kEvent::FLAG_ID_FROM_REQUEST, true); + } $this->Application->SetVar('m_lang', $language_id); $this->Application->SetVar($event->getPrefixSpecial() . '_id', $language_id); Index: branches/5.2.x/core/units/themes/themes_eh.php =================================================================== diff -u -N -r16353 -r16379 --- branches/5.2.x/core/units/themes/themes_eh.php (.../themes_eh.php) (revision 16353) +++ branches/5.2.x/core/units/themes/themes_eh.php (.../themes_eh.php) (revision 16379) @@ -1,6 +1,6 @@ setEventParam(kEvent::FLAG_ID_FROM_REQUEST, true); + } $this->Application->SetVar('m_theme', $theme_id); $this->Application->SetVar($event->getPrefixSpecial() . '_id', $theme_id); Index: branches/5.2.x/core/units/categories/categories_event_handler.php =================================================================== diff -u -N -r16374 -r16379 --- branches/5.2.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 16374) +++ branches/5.2.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 16379) @@ -1,6 +1,6 @@ setEventParam(kEvent::FLAG_ID_FROM_REQUEST, true); + return $this->Application->GetVar('m_cat_id'); } @@ -619,6 +621,8 @@ static $page_by_template = Array (); if ( $event->Special == 'current' ) { + $event->setEventParam(kEvent::FLAG_ID_FROM_REQUEST, true); + return $this->Application->GetVar('m_cat_id'); } @@ -657,6 +661,7 @@ if ( !$page_id && !$this->Application->isAdmin ) { $page_id = $this->Application->GetVar('m_cat_id'); + $event->setEventParam(kEvent::FLAG_ID_FROM_REQUEST, true); } return $page_id; Index: branches/5.2.x/core/kernel/utility/event.php =================================================================== diff -u -N -r15374 -r16379 --- branches/5.2.x/core/kernel/utility/event.php (.../event.php) (revision 15374) +++ branches/5.2.x/core/kernel/utility/event.php (.../event.php) (revision 16379) @@ -1,6 +1,6 @@ getPrefixSpecial() . ':' . $this->Name; } - } \ No newline at end of file + } Index: branches/5.2.x/core/units/users/users_event_handler.php =================================================================== diff -u -N -r16352 -r16379 --- branches/5.2.x/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 16352) +++ branches/5.2.x/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 16379) @@ -1,6 +1,6 @@ Application->GetVar('user_id'); - if ( !$id ) { - // if none user_id given use current user id - $id = $this->Application->RecallVar('user_id'); + if ( $id ) { + $event->setEventParam(kEvent::FLAG_ID_FROM_REQUEST, true); + + return $id; } - return $id; + // If none user_id given use current user id. + return $this->Application->RecallVar('user_id'); break; case 'forgot':