Esempio n. 1
0
 /**
  * @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);
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
 /**
  * Пересчитывает счетчики голосований
  *
  * @return bool
  */
 public function RecalculateVote()
 {
     return $this->oMapperTopic->RecalculateVote();
 }