Application->getUnitOption($item_prefix,'IDField'); $object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params); $item_id = $object->GetDBField($id_field); return $this->Application->HREF($params['edit_template'],'', Array( 'm_opener' => 'd', $item_prefix.'_mode' => 't', $item_prefix.'_event' => 'OnEdit', $item_prefix.'_id' => $item_id, 'pass' => 'all,'.$item_prefix ), 'index.php'); } /** * Get's reuested field value * * @param Array $params * @return string * @access public */ function Field($params) { $field = $this->SelectParam($params, 'name,field'); $object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params); if ($field == 'ReviewText') { if ($object->GetDBField('TextFormat') == 1) { $params['no_special'] = 'no_special'; } else { unset($params['no_special']); } } return parent::Field($params); } function AlreadyReviewed($params) { $object =& $this->getObject( Array('skip_autoload' => true) ); $parent_info = $object->getLinkedInfo(); $spam_helper =& $this->Application->recallObject('SpamHelper'); /* @var $spam_helper SpamHelper */ $spam_helper->InitHelper($parent_info['ParentId'], 'Review', 0); return $spam_helper->InSpamControl(); } function HasError($params) { $object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params); if (method_exists($object, 'GetErrorMsg')) { return parent::HasError($params); } else { return 0; } } /** * Preserve main item id in subitem pagination url * * @param Array $params * @return string */ function PageLink($params) { $object =& $this->getObject($params); /* @var kDBList */ $parent_info = $object->getLinkedInfo(); if ($parent_info['ParentId'] > 0) { $params['pass'] = 'm,'.$this->getPrefixSpecial().','.$parent_info['ParentPrefix']; } return parent::PageLink($params); } } ?>