Index: branches/5.0.x/core/kernel/db/db_event_handler.php =================================================================== diff -u -r12644 -r12726 --- branches/5.0.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 12644) +++ branches/5.0.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 12726) @@ -1,6 +1,6 @@ Application->IsAdmin()) { + if (!$this->Application->isAdmin) { $allow_events = Array('OnSearch', 'OnSearchReset', 'OnNew'); if (in_array($event->Name, $allow_events)) { // allow search on front @@ -98,7 +98,7 @@ } if ($event->Name == 'OnSaveWidths') { - return $this->Application->IsAdmin() && $this->Application->LoggedIn(); + return $this->Application->isAdminUser; } return parent::CheckPermission($event); @@ -517,7 +517,7 @@ $status_checked = true; $editing_mode = defined('EDITING_MODE') ? EDITING_MODE : false; - if ($user_id != -1 && !$this->Application->IsAdmin() && !($editing_mode || $this->checkItemStatus($event))) { + if ($user_id != -1 && !$this->Application->isAdmin && !($editing_mode || $this->checkItemStatus($event))) { // non-root user AND on front-end AND (not editing mode || incorrect status) $perm_status = false; } @@ -532,7 +532,7 @@ $this->Application->Debugger->appendTrace(); } trigger_error('ItemLoad Permission Failed for prefix ['.$event->getPrefixSpecial().'] in '.($status_checked ? 'checkItemStatus' : 'CheckPermission').'', E_USER_WARNING); - $next_template = $this->Application->IsAdmin() ? 'no_permission' : $this->Application->ConfigValue('NoPermissionTemplate'); + $next_template = $this->Application->isAdmin ? 'no_permission' : $this->Application->ConfigValue('NoPermissionTemplate'); $this->Application->Redirect($next_template, Array('next_template' => $this->Application->GetVar('t'))); } } @@ -2460,7 +2460,7 @@ */ function OnSuggestValues(&$event) { - if (!$this->Application->IsAdmin() || !$this->Application->LoggedIn()) { + if (!$this->Application->isAdminUser) { // very careful here, because this event allows to // view every object field -> limit only to logged-in admins return ;