Index: branches/5.3.x/units/links/links_event_handler.php =================================================================== diff -u -r15937 -r16523 --- branches/5.3.x/units/links/links_event_handler.php (.../links_event_handler.php) (revision 15937) +++ branches/5.3.x/units/links/links_event_handler.php (.../links_event_handler.php) (revision 16523) @@ -1,6 +1,6 @@ getObject(); - /* @var $object kDBList */ if ( !$this->Application->isAdminUser ) { $object->addFilter('expire_filter', '(Expire > ' . time() . ' OR Expire IS NULL)'); @@ -60,8 +60,8 @@ if ( substr($event->Special, 0, 10) == 'duplicates' ) { $object->removeFilter('category_filter'); + /** @var LinkHelper $link_helper */ $link_helper = $this->Application->recallObject('LinkHelper'); - /* @var $link_helper LinkHelper */ $grouping = $link_helper->getGrouping($event->getPrefixSpecial()); @@ -75,8 +75,8 @@ break; case 'duplicates-sub': + /** @var kDBItem $main_object */ $main_object = $this->Application->recallObject($event->Prefix . '.duplicates'); - /* @var $main_object kDBItem */ foreach ($grouping as $field_index => $group_field) { $object->addFilter('dupe_filter_' . $field_index, '%1$s.`' . $group_field . '` = ' . $this->Conn->qstr($main_object->GetDBField($group_field))); @@ -105,8 +105,8 @@ */ function OnMerge($event) { + /** @var LinkHelper $link_helper */ $link_helper = $this->Application->recallObject('LinkHelper'); - /* @var $link_helper LinkHelper */ $grouping = $link_helper->getGrouping($event->getPrefixSpecial()); @@ -146,8 +146,8 @@ } if ( !$groping_error ) { + /** @var kTempTablesHandler $temp_handler */ $temp_handler = $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event)); - /* @var $temp_handler kTempTablesHandler */ $categories_sql = ' SELECT main_table.ResourceId, ci.CategoryId, main_table.' . $id_field . ' FROM ' . $table_name . ' main_table @@ -218,8 +218,8 @@ return; } + /** @var kDBItem $object */ $object = $event->getObject(); - /* @var $object kDBItem */ // replace 0 id in post with actual created id (used in enhancement process) $items_info = $this->Application->GetVar($event->getPrefixSpecial(true)); @@ -296,8 +296,8 @@ if (!strlen($field_value) || ($field_value != $this->Application->RecallVar($event->Prefix . '_captcha_code'))) { $this->Application->SetVar('error_'.$field_name, 1); + /** @var kCaptchaHelper $captcha_helper */ $captcha_helper = $this->Application->recallObject('CaptchaHelper'); - /* @var $captcha_helper kCaptchaHelper */ $this->Application->StoreVar($event->Prefix . '_captcha_code', $captcha_helper->GenerateCaptchaCode()); $event->status = kEvent::erFAIL; @@ -321,7 +321,7 @@ } $object = $event->getObject(); // get link object - /* @var $object kDBItem */ + /** @var kDBItem $object */ $send_params = $object->getEmailParams(Array( 'from_name' => $this->Application->GetVar('ContactFormFullName'), @@ -392,14 +392,14 @@ return ; } + /** @var kDBItem $object */ $object = $event->getObject(); - /* @var $object kDBItem */ if ($object->GetDBField('Url') != $object->GetOriginalField('Url')) { // check only when url was changed + /** @var LinkHelper $link_helper */ $link_helper = $this->Application->recallObject('LinkHelper'); - /* @var $link_helper LinkHelper */ $link_checked = $link_helper->CheckReciprocalURL($object->GetDBField('Url')); @@ -422,11 +422,11 @@ return; } + /** @var kCatDBItem $object */ $object = $event->getObject( Array('skip_autoload' => true) ); - /* @var $object kCatDBItem */ + /** @var LinkHelper $link_helper */ $link_helper = $this->Application->recallObject('LinkHelper'); - /* @var $link_helper LinkHelper */ $config = $event->getUnitConfig(); $id_field = $config->getIDField(); @@ -565,8 +565,8 @@ { parent::OnBeforeDeleteOriginal($event); + /** @var kDBItem $object */ $object = $event->getObject(); - /* @var $object kDBItem */ $link_id = $event->getEventParam('original_id'); $new_resource_id = $object->GetDBField('ResourceId'); @@ -592,8 +592,8 @@ { parent::OnAfterDeleteOriginal($event); + /** @var kDBItem $object */ $object = $event->getObject(); - /* @var $object kDBItem */ $old_resource_id = $this->Application->GetVar('original_resource_id'); $new_resource_id = $object->GetDBField('ResourceId'); @@ -618,4 +618,4 @@ $this->Conn->doUpdate($fields_hash, $table_name, $field . ' = ' . $old_resource_id); } - } \ No newline at end of file + }