コード例 #1
0
ファイル: Hopam.php プロジェクト: ngdvan/lntguitar
 /**
  * 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, '');
 }
コード例 #2
0
ファイル: HopamController.php プロジェクト: ngdvan/lntguitar
 /**
  * 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);
         }
     }
 }