/** * @see DatabaseObjectList::readObjects() */ public function readObjects() { $sql = "SELECT\t\t" . (!empty($this->sqlSelects) ? $this->sqlSelects . ',' : '') . "\n\t\t\t\t\tavatar.*, user_table.*, contest_jurytalk.*\n\t\t\tFROM\t\twcf" . WCF_N . "_contest_jurytalk contest_jurytalk\n\t\t\tLEFT JOIN\twcf" . WCF_N . "_user user_table\n\t\t\tON\t\t(user_table.userID = contest_jurytalk.userID)\n\t\t\tLEFT JOIN\twcf" . WCF_N . "_avatar avatar\n\t\t\tON\t\t(avatar.avatarID = user_table.avatarID)\n\t\t\t" . $this->sqlJoins . "\n\t\t\tWHERE\t(" . ContestJurytalk::getStateConditions() . ")\n\t\t\t\n\t\t\t" . (!empty($this->sqlConditions) ? "AND " . $this->sqlConditions : '') . "\n\t\t\t" . (!empty($this->sqlOrderBy) ? "ORDER BY " . $this->sqlOrderBy : ''); $result = WCF::getDB()->sendQuery($sql, $this->sqlLimit, $this->sqlOffset); while ($row = WCF::getDB()->fetchArray($result)) { $this->jurytalks[] = new ViewableContestJurytalk(null, $row); } }
/** * @see Form::assignVariables() */ public function assignVariables() { parent::assignVariables(); // display branding require_once WCF_DIR . 'lib/util/ContestUtil.class.php'; ContestUtil::assignVariablesBranding(); // init form if ($this->action == 'edit') { require_once WCF_DIR . 'lib/form/ContestJurytalkEditForm.class.php'; new ContestJurytalkEditForm($this->entry); } else { if ($this->entry->isJurytalkable()) { require_once WCF_DIR . 'lib/form/ContestJurytalkAddForm.class.php'; new ContestJurytalkAddForm($this->entry); } } $this->sidebar->assignVariables(); WCF::getTPL()->assign(array('entry' => $this->entry, 'contestID' => $this->contestID, 'userID' => $this->entry->userID, 'jurytalks' => $this->jurytalkList->getObjects(), 'templateName' => $this->templateName, 'allowSpidersToIndexThisPage' => true, 'contestmenu' => ContestMenu::getInstance())); }
/** * @see DatabaseObject::handleData() */ protected function handleData($data) { parent::handleData($data); $this->user = new UserProfile(null, $data); }