/** * @see Form::save() */ public function save() { parent::save(); //save activation token into database $token = StringUtil::getRandomID(); $sql = 'INSERT INTO wcf' . WCF_N . '_' . $this->subscriberTable . "\n \t\t(email)\n \t\t\tVALUES\n \t\t('" . escapeString($this->email) . "')"; WCF::getDB()->sendQuery($sql); $subscriberID = WCF::getDB()->getInsertID(); //clears cache WCF::getCache()->clear(WCF_DIR . 'cache/', 'cache.newsletter-subscriber-' . PACKAGE_ID . '.php', true); $sql = 'INSERT INTO wcf' . WCF_N . '_' . $this->activationTable . ' (subscriberID, token) VALUES (' . intval($subscriberID) . ", '" . escapeString($token) . "')"; WCF::getDB()->sendQuery($sql); $url = PAGE_URL . '/index.php?action=NewsletterGuestActivate&id=' . $subscriberID . '&t=' . $token; $subject = WCF::getLanguage()->get('wcf.acp.newsletter.optin.subject'); $content = WCF::getLanguage()->getDynamicVariable('wcf.acp.newsletter.optin.text', array('username' => WCF::getLanguage()->get('wcf.acp.newsletter.optin.hello'), 'url' => $url)); WCF::getTPL()->assign(array('subject' => $subject, 'content' => $content)); $output = WCF::getTPL()->fetch('validationEmail'); $mail = new Mail($this->email, $subject, $output, MESSAGE_NEWSLETTERSYSTEM_GENERAL_FROM); $mail->setContentType('text/html'); $mail->send(); $this->saved(); WCF::getTPL()->assign(array('message' => WCF::getLanguage()->get('wcf.acp.newsletter.optin.activationPending'), 'url' => PAGE_URL . '/index.php?page=Index' . SID_ARG_2ND)); WCF::getTPL()->display('redirect'); exit; }
/** * @see Form::save() */ public function save() { parent::save(); // delete ignored boards $sql = "DELETE FROM\twbb" . WBB_N . "_board_ignored_by_user\n\t\t\tWHERE\t\tuserID = " . WCF::getUser()->userID; WCF::getDB()->sendQuery($sql); // fix not ignorable boards foreach ($this->boards as $board) { if (!$board->ignorable) { if (!in_array($board->boardID, $this->unignoredBoardIDArray)) { $this->unignoredBoardIDArray[] = $board->boardID; } $parentBoards = $board->getParentBoards(); foreach ($parentBoards as $parentBoard) { if (!in_array($parentBoard->boardID, $this->unignoredBoardIDArray)) { $this->unignoredBoardIDArray[] = $parentBoard->boardID; } } } } // save ignored boards foreach ($this->boards as $board) { if (!in_array($board->boardID, $this->unignoredBoardIDArray) && $board->getPermission('canViewBoard')) { $sql = "INSERT INTO\twbb" . WBB_N . "_board_ignored_by_user\n\t\t\t\t\t\t\t(userID, boardID)\n\t\t\t\t\tVALUES\t\t(" . WCF::getUser()->userID . ", " . $board->boardID . ")"; WCF::getDB()->sendQuery($sql); } } WCF::getSession()->resetUserData(); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { parent::save(); AllianceEditor::create($this->allianceName, $this->allianceTag, WCF::getUser()->userID); WCF::getSession()->setUpdate(true); header('Location: index.php?page=Alliance'); exit; }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // update $this->suspension->update($this->title, $this->points, $this->suspension->suspensions == 0 ? $this->suspensionType : $this->suspension->suspensionType, $this->suspension->suspensions == 0 ? $this->suspensionTypeObject->getData() : unserialize($this->suspension->suspensionData), $this->expiresHour * 3600 + $this->expiresDay * 86400 + $this->expiresWeek * 86400 * 7); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { AbstractForm::save(); $this->source->update($this->name, $this->sourceDirectory, $this->buildDirectory, $this->scm, $this->url, $this->username, $this->password, null, $this->trustServerCert, $this->enableCheckout); // call saved event $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // save server $this->updateServer->update($this->server, $this->htUsername, $this->htPassword); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::validate() */ public function save() { AbstractForm::save(); // update $this->rank->update($this->title, $this->image, $this->groupID, $this->neededPoints, $this->gender, $this->repeatImage); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { parent::save(); $sql = "UPDATE ugml_users\n\t\t\t\tSET ally_request = " . $this->allianceID . ",\n\t\t\t\t\tally_request_text = '" . escapeString($this->applicationText) . "',\n\t\t\t\t\tally_register_time = " . TIME_NOW . "\n\t\t\t\tWHERE id = " . WCF::getUser()->userID; WCF::getDB()->sendQuery($sql); WCF::getSession()->setUpdate(true); header('Location: index.php?page=Alliance'); exit; }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // save server $this->entry->update($this->kind, $this->rulesetTable, $this->rulesetColumn, $this->rulesetColumnTime); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // update item $this->contestRatingoption->update($this->classID, $this->topic, $this->text, $this->languageID); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // save rule $this->rule->update($this->title, $this->logicalOperator, $this->ruleConditions, $this->ruleAction, $this->ruleDestination, intval(!$this->enabled)); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // save sponsortalk $this->entry->update($this->message); $this->saved(); // forward HeaderUtil::redirect('index.php?page=ContestSponsortalk&contestID=' . $this->entry->contestID . '&sponsortalkID=' . $this->entry->sponsortalkID . SID_ARG_2ND_NOT_ENCODED . '#sponsortalk' . $this->entry->sponsortalkID); exit; }
/** * @see Form::save() */ public function save() { parent::save(); foreach ($this->hideOventTypes as $oventTypeID => $hide) { WCF::getUser()->setSetting('hideOventType' . $oventTypeID, $hide); } WCF::getUser()->setSetting('dontAskOnOventHiding', $this->dontAskOnHiding); WCF::getUser()->setSetting('hideInformation', $this->hideInformation); WCF::getUser()->setSetting('hideColonies', $this->hideColonies); }
/** * @see Form::save() */ public function save() { parent::save(); foreach ($this->planets as $sortID => $planetID) { $sql = "UPDATE ugml_planets\r\n\t\t\t\t\tSET sortID = " . $sortID . "\r\n\t\t\t\t\tWHERE id = " . $planetID; WCF::getDB()->sendQuery($sql); Planet::getInstance($planetID)->sortID = $sortID; } $this->planetObjs = array(); }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // save entry $this->entry->update($this->entry->contestID, $this->entry->userID, $this->entry->groupID, $this->state); $this->saved(); // forward HeaderUtil::redirect('index.php?page=ContestSponsor&contestID=' . $this->entry->contestID . SID_ARG_2ND_NOT_ENCODED . '#entry' . $this->entry->sponsorID); exit; }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // save price $this->entry->update($this->subject, $this->text, $this->secretMessage, $this->state, $this->attachmentListEditor); $this->saved(); // forward HeaderUtil::redirect('index.php?page=ContestPrice&contestID=' . $this->entry->contestID . '&priceID=' . $this->entry->priceID . SID_ARG_2ND_NOT_ENCODED . '#priceObj' . $this->entry->priceID); exit; }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // update item $this->helpItem->update($this->topic, $this->text, $this->parentItem, $this->refererPattern, $this->showOrder, $this->isDisabled, $this->languageID); HelpItemEditor::clearCache(); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::validate() */ public function save() { AbstractForm::save(); // update $this->bbcode->update($this->bbcodeTag, $this->htmlOpen, $this->htmlClose, $this->textOpen, $this->textClose, $this->allowedChildren, $this->className, $this->sourceCode, $this->attributes, $this->wysiwyg, $this->wysiwygIcon); // show success message WCF::getTPL()->assign('success', true); // delete cache WCF::getCache()->clear(WCF_DIR . 'cache', 'cache.bbcodes.php'); $this->saved(); }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // update $this->pageMenuItem->update($this->name, $this->link, $this->iconS, $this->iconM, $this->showOrder, $this->position, $this->languageID); // delete Cache PageMenuItemEditor::clearCache(); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::validate() */ public function save() { AbstractForm::save(); // update $this->templatePack->update($this->templatePackName, $this->templatePackFolderName, $this->parentTemplatePackID); // reset cache WCF::getCache()->clear(WCF_DIR . 'cache', 'cache.templatePacks.php'); // show success message WCF::getTPL()->assign('success', true); $this->saved(); }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // save $this->application->updateByLeader($this->applicationStatus, $this->reply, WCF::getUser()->userID); // reset session Session::resetSessions($this->application->userID); $this->saved(); HeaderUtil::redirect('index.php?page=UserGroupLeader' . SID_ARG_2ND_NOT_ENCODED); exit; }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // save group $this->group->update($this->groupName, $this->activeOptions, $this->additionalFields); // update sessions require_once WCF_DIR . 'lib/system/session/Session.class.php'; Session::resetSessions(); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // save style $finalVariables = $this->getFinalVariables(); $this->style = StyleEditor::create($this->styleName, $finalVariables, $this->templatePackID, $this->styleDescription, $this->styleVersion, $this->styleDate, $this->image, $this->copyright, $this->license, $this->authorName, $this->authorURL, intval(!$this->enableStyle)); // reset cache WCF::getCache()->clear(WCF_DIR . 'cache', 'cache.style.php'); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { parent::save(); // save require_once WCF_DIR . 'lib/data/user/group/GroupApplicationEditor.class.php'; $this->applicationID = GroupApplicationEditor::create(WCF::getUser()->userID, $this->groupID, $this->reason, $this->enableNotification); $application = new GroupApplicationEditor($this->applicationID); $application->sendLeaderNotification(); $this->saved(); HeaderUtil::redirect('index.php?page=UserGroups' . SID_ARG_2ND_NOT_ENCODED); exit; }
/** * @see Form::validate() */ public function save() { AbstractForm::save(); // update $this->smiley->update($this->path, $this->title, $this->code, $this->showOrder, $this->smileyCategoryID); $this->smiley->removePositions(); $this->smiley->addPosition($this->smileyCategoryID, $this->showOrder ? $this->showOrder : null); // reset cache SmileyEditor::resetCache(); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { global $game_config; AbstractForm::save(); $data = LWUtil::serialize(array('text' => $this->applicationText), 1); $this->alliance2->addInterrelation($this->allianceID, $this->interrelationType, 1, $data); if ($this->interrelationType == 3) { require_once WCF_DIR . 'lib/system/exception/NamedUserException.class.php'; throw new NamedUserException(WCF::getLanguage()->get('wot.alliance.diplomacy.newWar', array('boardURL' => $game_config['diplomacyBoardURL'], 'boardID' => $game_config['diplomacyBoardID']))); } header('Location: index.php?page=Alliance'); exit; }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // enable new email $sql = "UPDATE\twcf" . WCF_N . "_user\n\t\t\tSET\temail = newEmail,\n\t\t\t\tnewEmail = '',\n\t\t\t\treactivationCode = 0\n\t\t\tWHERE\tuserID = " . $this->userID; WCF::getDB()->sendQuery($sql); // reset session WCF::getSession()->resetUserData(); $this->saved(); // forward to index page WCF::getTPL()->assign(array('url' => 'index.php' . SID_ARG_1ST, 'message' => WCF::getLanguage()->get('wcf.user.emailChange.reactivation.success'))); WCF::getTPL()->display('redirect'); exit; }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // store search result in database $sql = "INSERT INTO \twcf" . WCF_N . "_search\n\t\t\t\t\t(userID, searchData, searchDate, searchType)\n\t\t\tVALUES\t\t(" . WCF::getUser()->userID . ",\n\t\t\t\t\t'" . escapeString(serialize($this->matches)) . "',\n\t\t\t\t\t" . TIME_NOW . ",\n\t\t\t\t\t'members')"; WCF::getDB()->sendQuery($sql); unset($sql); // save memory // get new search id $this->searchID = WCF::getDB()->getInsertID(); $this->saved(); // forward to result page HeaderUtil::redirect('index.php?page=MembersList&searchID=' . $this->searchID . SID_ARG_2ND_NOT_ENCODED); exit; }
/** * @see Form::validate() */ public function save() { AbstractForm::save(); // update $this->userOption->update($this->userOption->optionName, $this->categoryName, $this->optionType, $this->defaultValue, $this->validationPattern, $this->selectOptions, '', $this->required, $this->askDuringRegistration, $this->editable, $this->visible, $this->getOutputClass(), $this->searchable, $this->showOrder); // update languages variables require_once WCF_DIR . 'lib/system/language/LanguageEditor.class.php'; $language = new LanguageEditor(WCF::getLanguage()->getLanguageID()); $language->updateItems(array('wcf.user.option.' . $this->userOption->optionName => $this->optionName, 'wcf.user.option.' . $this->userOption->optionName . '.description' => $this->optionDescription), 0, PACKAGE_ID, array('wcf.user.option.' . $this->userOption->optionName => 1, 'wcf.user.option.' . $this->userOption->optionName . '.description' => 1)); // delete cache WCF::getCache()->clear(WCF_DIR . 'cache', 'cache.user-option-*'); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // update style if ($this->style->isDefault) { $this->enableStyle = 1; } $finalVariables = $this->importedVariables !== null ? $this->importedVariables : $this->getFinalVariables(); $this->style->update($this->styleName, $finalVariables, $this->templatePackID, $this->styleDescription, $this->styleVersion, $this->styleDate, $this->image, $this->copyright, $this->license, $this->authorName, $this->authorURL, intval(!$this->enableStyle)); // reset cache WCF::getCache()->clear(WCF_DIR . 'cache', 'cache.style.php'); $this->saved(); // show success message WCF::getTPL()->assign('success', true); $this->variables = $this->getFormVariables(); }