Index: branches/5.2.x/core/units/forms/form_submissions/form_submissions_eh.php =================================================================== diff -u -N -r14955 -r14989 --- branches/5.2.x/core/units/forms/form_submissions/form_submissions_eh.php (.../form_submissions_eh.php) (revision 14955) +++ branches/5.2.x/core/units/forms/form_submissions/form_submissions_eh.php (.../form_submissions_eh.php) (revision 14989) @@ -1,6 +1,6 @@ Application->isAdmin) { - if ($event->Name == 'OnCreate') { + if ( !$this->Application->isAdmin ) { + if ( $event->Name == 'OnCreate' ) { // anybody can submit forms on front return true; } @@ -43,12 +43,15 @@ /** * Always allow to view feedback form * + * @return void + * @access protected + * @see kEventHandler::$permMapping */ - function mapPermissions() + protected function mapPermissions() { parent::mapPermissions(); - $permissions = Array( + $permissions = Array ( 'OnItemBuild' => Array ('self' => true), 'OnEdit' => Array ('self' => 'view', 'subitem' => 'view'), ); @@ -178,8 +181,10 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(&$event) + protected function SetCustomQuery(kEvent &$event) { + parent::SetCustomQuery($event); + $object =& $event->getObject(); /* @var $object kDBList */ @@ -191,15 +196,16 @@ * * @param kEvent $event * @return int + * @access public */ - function getPassedID(&$event) + public function getPassedID(kEvent &$event) { - if ($event->Special == 'last') { + if ( $event->Special == 'last' ) { // allow user to see his last submitted form return $this->Application->RecallVar('last_submission_id'); } - if ($this->Application->isAdminUser) { + if ( $this->Application->isAdminUser ) { // don't check ids in admin return parent::getPassedID($event); }