コード例 #1
0
ファイル: Topic.class.php プロジェクト: AlexSSN/altocms
 /**
  * @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);
 }
コード例 #2
0
ファイル: Topic.mapper.class.php プロジェクト: lifecom/test
 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;
 }
コード例 #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;
 }
コード例 #4
0
ファイル: Topic.class.php プロジェクト: lunavod/bunker_stable
 /**
  * Пересчитывает счетчики голосований
  *
  * @return bool
  */
 public function RecalculateVote()
 {
     return $this->oMapperTopic->RecalculateVote();
 }