Index: branches/5.2.x/core/units/phrases/phrases_event_handler.php =================================================================== diff -u -N -r14955 -r14989 --- branches/5.2.x/core/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 14955) +++ branches/5.2.x/core/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 14989) @@ -1,6 +1,6 @@ Special == 'import' || $event->Special == 'export') { + if ( $event->Special == 'import' || $event->Special == 'export' ) { $this->RemoveRequiredFields($object); - $object->setRequired( Array ('LangFile', 'PhraseType', 'Module') ); + $object->setRequired(Array ('LangFile', 'PhraseType', 'Module')); // allow multiple phrase types to be selected during import/export $object->SetFieldOption('PhraseType', 'type', 'string'); @@ -45,20 +45,27 @@ * @return bool * @access public */ - public function CheckPermission(&$event) + public function CheckPermission(kEvent &$event) { - if (!$this->Application->isAdmin && $this->Application->isDebugMode(false) && kUtil::constOn('DBG_PHRASES')) { + if ( !$this->Application->isAdmin && $this->Application->isDebugMode(false) && kUtil::constOn('DBG_PHRASES') ) { $allow_events = Array ('OnCreate', 'OnUpdate'); - if (in_array($event->Name, $allow_events)) { + if ( in_array($event->Name, $allow_events) ) { return true; } } return parent::CheckPermission($event); } - function mapPermissions() + /** + * Allows to override standard permission mapping + * + * @return void + * @access protected + * @see kEventHandler::$permMapping + */ + protected function mapPermissions() { parent::mapPermissions();