Exemplo n.º 1
0
 /**
  * This is invoked after the record is deleted.
  */
 protected function afterDelete()
 {
     parent::afterDelete();
     //Comment::model()->deleteAll('post_id='.$this->id);
     HopamTag::model()->updateFrequency($this->tags, '');
     Ban::model()->updateFrequency($this->ban_artist, '');
 }
Exemplo n.º 2
0
 /**
  * Suggests tags based on the current user input.
  * This is called via AJAX when the user is entering the tags input.
  */
 public function actionSuggestTags()
 {
     if (isset($_GET['q']) && ($keyword = trim($_GET['q'])) !== '') {
         $tags = HopamTag::model()->suggestTags($keyword);
         if ($tags !== array()) {
             echo implode("\n", $tags);
         }
     }
 }
Exemplo n.º 3
0
 public function normalizeTags($attribute, $params)
 {
     $this->ban_artist = SongBans::array2string(array_unique(HopamTag::string2array($this->tags)));
 }