/** * @param ModuleTopic_EntityTopic $oTopic * @param null $sTargetTmp * @return bool */ public function AttachTmpPhotoToTopic($oTopic, $sTargetTmp = null) { if (is_null($sTargetTmp)) { $sTargetTmp = E::ModuleSession()->GetCookie(ModuleUploader::COOKIE_TARGET_TMP); } E::ModuleMresource()->ResetTmpRelById($sTargetTmp, $oTopic->getId()); return $this->oMapper->attachTmpPhotoToTopic($oTopic, $sTargetTmp); }
protected function buildFilter($aFilter) { $where = parent::buildFilter($aFilter); //we are extending the core, right? //this makes sure there is NO content listed in case there are no entries commented by me or my friends if (empty($aFilter['topic_id'])) { $aFilter['topic_id'] = 0; } //extend the default filter if (isset($aFilter['topic_id'])) { $aFilter['topic_id'] = (array) $aFilter['topic_id']; $aFilter['topic_id'][] = 0; //safety pin $where .= ' AND topic_id IN (' . implode(',', $aFilter['topic_id']) . ') '; } //debug output dump($where); return $where; }
public function UpdateTopicByType($sType, $sTypeNew) { $res = $this->oMapperTopic->UpdateTopicByType($sType, $sTypeNew); $this->Cache_Clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array("topic_update")); return $res; }
/** * Пересчитывает счетчики голосований * * @return bool */ public function RecalculateVote() { return $this->oMapperTopic->RecalculateVote(); }