예제 #1
0
파일: Tag.php 프로젝트: sinfocol/gwf3
 private function templateTag(Slay_Song $song)
 {
     $user = GWF_Session::getUser();
     $has_tagged = Slay_TagVote::hasVoted($song, $user);
     $may_add_tag = Slay_Tag::mayAddTag($user);
     $form = $this->formTag($song);
     $tVars = array('song' => $song, 'has_tagged' => $has_tagged, 'form' => $form->templateY($this->module->lang('ft_tag')), 'href_add_tag' => $this->module->getMethodURL('AddTag', '&stid=' . $song->getID()));
     return $this->module->template('tag.tpl', $tVars);
 }
예제 #2
0
파일: AddTag.php 프로젝트: sinfocol/gwf3
 public function execute()
 {
     $user = GWF_Session::getUser();
     if (!Slay_Tag::mayAddTag($user)) {
         return $this->module->error('err_add_tag');
     }
     if (isset($_POST['add'])) {
         return $this->onAddTag();
     }
     return $this->templateAddTag();
 }