Index: trunk/kernel/units/reviews/reviews_tag_processor.php =================================================================== diff -u -N --- trunk/kernel/units/reviews/reviews_tag_processor.php (revision 8444) +++ trunk/kernel/units/reviews/reviews_tag_processor.php (revision 0) @@ -1,97 +0,0 @@ -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) - { - $parent_prefix = $this->Application->getUnitOption($this->Prefix, 'ParentPrefix'); - $main_object =& $this->Application->recallObject($parent_prefix); - /* @var $main_object kCatDBItem */ - - $spam_helper =& $this->Application->recallObject('SpamHelper'); - /* @var $spam_helper SpamHelper */ - - $spam_helper->InitHelper($main_object->GetDBField('ResourceId'), '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); - } -} - - -?> \ No newline at end of file