/** * Create voting table. * @param Module_Download $module * @return boolean */ public function createVotes(Module_Download $module) { if (false === ($votes = Module_Votes::installVoteScoreTable('dl_' . $this->getVar('dl_id'), $module->cfgMinVote(), $module->cfgMaxVote(), $module->cfgGuestVote()))) { return false; } if (false === $this->saveVar('dl_voteid', $votes->getID())) { return false; } $this->setVar('dl_voteid', $votes); return true; }
public function validate_expire(Module_Download $m, $arg) { return GWF_Time::isValidDuration($arg, 0, GWF_Time::ONE_YEAR * 10) ? false : $m->lang('err_dl_expire'); }