function createForm() { global $gorumroll, $lll; $_S =& new AppSettings(); $_EC = EComm::createObject(); if ($gorumroll->rollid && !G::getAttr($gorumroll->rollid, "appcategory", "allowAd")) { $gorumroll->rollid = 0; } LocationHistory::saveGorumCategory($this->cid = $gorumroll->rollid); $this->hasObjectRights($hasRight, "create", FALSE); hasAdminRights($isAdm); if (!$_S->showSubmitAd() && !$isAdm) { handleError("Permission denied"); } if (!$hasRight->objectRight) { Roll::setInfoText("registerOrLoginToSubmit"); $this->nextAction =& new AppController("user/login_form"); $gorumroll->afterAction($this); } if ($this->cid) { $this->activateVariableFields(); $this->initClassVars(); $this->cName = $this->getCatName(); $_EC->confirmRules($gorumroll->rollid); } parent::createForm(); $_S->handleCategorySelect("item-create_form"); }
function createForm($elementName = "") { global $gorumrecognised; hasAdminRights($isAdm); if ($gorumrecognised && !$isAdm) { Roll::setInfoText("cantRegisterUntilLoggedIn"); } else { $this->activateVariableFields(); $this->initClassVars(); parent::createForm($elementName); } }