Index: branches/5.2.x/units/link_validation/link_validation_eh.php =================================================================== diff -u -N -r14254 -r14626 --- branches/5.2.x/units/link_validation/link_validation_eh.php (.../link_validation_eh.php) (revision 14254) +++ branches/5.2.x/units/link_validation/link_validation_eh.php (.../link_validation_eh.php) (revision 14626) @@ -1,6 +1,6 @@ Name, $check_events)) { @@ -89,10 +91,12 @@ /** * Adds calculates fields for category name * - * @param kDBItem $object + * @param kDBItem|kDBList $object * @param kEvent $event + * @return void + * @access protected */ - function prepareObject(&$object, &$event) + protected function prepareObject(&$object, &$event) { parent::prepareObject($object, $event); @@ -103,8 +107,11 @@ * Allows to show only invalid links * * @param kEvent $event + * @return void + * @access protected + * @see kDBEventHandler::OnListBuild() */ - function SetCustomQuery(&$event) + protected function SetCustomQuery(&$event) { $object =& $event->getObject(); /* @var $object kDBList */ @@ -400,26 +407,29 @@ * Approves/declines selected links * * @param kEvent $event + * @return void + * @access protected */ - function iterateItems(&$event) + protected function iterateItems(&$event) { - if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) { + if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) { $event->status = kEvent::erFAIL; return; } $ids = $this->_getSelectedIds($event); - if (!$ids) { - return ; + if ( !$ids ) { + return; } $object =& $this->Application->recallObject('l.-item', null, Array ('skip_autoload' => true)); /* @var $object kCatDBItem */ foreach ($ids as $id) { + $ret = true; $object->Load($id); - switch ($event->Name) { + switch ( $event->Name ) { case 'OnApproveLinks': $ret = $object->ApproveChanges(); break; @@ -429,7 +439,7 @@ break; } - if (!$ret) { + if ( !$ret ) { $event->status = kEvent::erFAIL; $event->redirect = false; break;