Index: branches/5.2.x/core/units/forms/form_submissions/form_submissions_eh.php =================================================================== diff -u -N -r16027 -r16513 --- branches/5.2.x/core/units/forms/form_submissions/form_submissions_eh.php (.../form_submissions_eh.php) (revision 16027) +++ branches/5.2.x/core/units/forms/form_submissions/form_submissions_eh.php (.../form_submissions_eh.php) (revision 16513) @@ -1,6 +1,6 @@ Application->getUnitOption($event->Prefix, 'Fields'); $conf_grids = $this->Application->getUnitOption($event->Prefix, 'Grids'); + /** @var InpCustomFieldsHelper $helper */ $helper = $this->Application->recallObject('InpCustomFieldsHelper'); - /* @var $helper InpCustomFieldsHelper */ $sql = 'SELECT * FROM ' . TABLE_PREFIX . 'FormFields @@ -185,8 +185,8 @@ { parent::SetCustomQuery($event); + /** @var kDBList $object */ $object = $event->getObject(); - /* @var $object kDBList */ $object->addFilter('form_filter', '%1$s.FormId = ' . (int)$this->Application->GetVar('form_id')); } @@ -229,14 +229,14 @@ return; } + /** @var kDBItem $object */ $object = $event->getObject(); - /* @var $object kDBItem */ // allows user to view only it's last submission $this->Application->StoreVar('last_submission_id', $object->GetID()); + /** @var FormSubmissionHelper $form_submission_helper */ $form_submission_helper = $this->Application->recallObject('FormSubmissionHelper'); - /* @var $form_submission_helper FormSubmissionHelper */ $form =& $form_submission_helper->getForm($object); @@ -259,8 +259,8 @@ $event->SetRedirectParam('opener', 's'); $event->SetRedirectParam('m_cat_id', 0); + /** @var kDBItem $theme */ $theme = $this->Application->recallObject('theme.current'); - /* @var $theme kDBItem */ $template = $this->Application->unescapeRequestVariable($this->Application->GetVar('success_template')); $alias_template = $theme->GetField('TemplateAliases', $template); @@ -279,8 +279,8 @@ { parent::OnBeforeItemCreate($event); + /** @var kDBItem $object */ $object = $event->getObject(); - /* @var $object kDBItem */ $object->SetDBField('IPAddress', $this->Application->getClientIp()); @@ -295,15 +295,15 @@ $object->SetDBField('ReferrerURL', $referrer); } + /** @var FormSubmissionHelper $form_submission_helper */ $form_submission_helper = $this->Application->recallObject('FormSubmissionHelper'); - /* @var $form_submission_helper FormSubmissionHelper */ $form =& $form_submission_helper->getForm($object); // validate captcha code if ( $form->GetDBField('UseSecurityImage') && !$this->Application->LoggedIn() ) { + /** @var kCaptchaHelper $captcha_helper */ $captcha_helper = $this->Application->recallObject('CaptchaHelper'); - /* @var $captcha_helper kCaptchaHelper */ $captcha_helper->validateCode($event, false); } @@ -320,8 +320,8 @@ { parent::OnBeforeItemUpdate($event); + /** @var kDBItem $object */ $object = $event->getObject(); - /* @var $object kDBItem */ $object->setRequired('MergeToSubmission', $object->GetDBField('IsMergeToSubmission')); } @@ -402,8 +402,8 @@ return ; } + /** @var kDBItem $object */ $object = $event->getObject(); - /* @var $object kDBItem */ $form_id = $object->GetDBField('FormId'); $email_field = $this->getFieldByRole($form_id, SubmissionFormField::COMMUNICATION_ROLE_EMAIL); @@ -412,8 +412,8 @@ return ; } + /** @var kDBItem $merge_to */ $merge_to = $this->Application->recallObject($event->Prefix . '.merge-to', null, Array ('skip_autoload' => true)); - /* @var $merge_to kDBItem */ $sql = $merge_to->GetSelectSQL() . ' WHERE (FormId = ' . $form_id . ') AND (' . $email_field . ' = ' . $this->Conn->qstr( $object->GetDBField($email_field) ) . ')'; $submissions = $this->Conn->Query($sql, $object->IDField); @@ -430,8 +430,8 @@ $name_field = $this->getFieldByRole($form_id, SubmissionFormField::COMMUNICATION_ROLE_NAME); $subject_field = $this->getFieldByRole($form_id, SubmissionFormField::COMMUNICATION_ROLE_SUBJECT); + /** @var kDBItem $language */ $language = $this->Application->recallObject('lang.current'); - /* @var $language kDBItem */ $date_format = $language->GetDBField('DateFormat'); @@ -496,8 +496,8 @@ parent::OnUpdate($event); if ($event->status == kEvent::erSUCCESS) { + /** @var kDBItem $object */ $object = $event->getObject(); - /* @var $object kDBItem */ $merge_to = $object->GetDBField('MergeToSubmission'); @@ -512,8 +512,8 @@ WHERE FormId = ' . $form_id; $form_info = $this->Conn->GetRow($sql); + /** @var kDBItem $reply */ $reply = $this->Application->recallObject('submission-log.merge', null, Array ('skip_autoload' => true)); - /* @var $reply kDBItem */ $email_field = $this->getFieldByRole($form_id, SubmissionFormField::COMMUNICATION_ROLE_EMAIL); $subject_field = $this->getFieldByRole($form_id, SubmissionFormField::COMMUNICATION_ROLE_SUBJECT);