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); }
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(); }