/**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     // save config in session
     $pmData = WCF::getSession()->getVar('pmData');
     if ($pmData === null) {
         $pmData = array();
     }
     $pmSessionID = count($pmData);
     $pmData[$pmSessionID] = array('groupIDs' => implode(',', $this->groupIDs), 'subject' => $this->subject, 'text' => $this->text, 'enableSmilies' => $this->enableSmilies, 'enableHtml' => $this->enableHtml, 'enableBBCodes' => $this->enableBBCodes, 'showSignature' => $this->showSignature, 'startTime' => TIME_NOW, 'maxLifeTime' => $this->maxLifeTime);
     WCF::getSession()->register('pmData', $pmData);
     $this->saved();
     // show worker template
     WCF::getTPL()->assign(array('pageTitle' => WCF::getLanguage()->get('wcf.pmToUgrps.pageTitle'), 'url' => 'index.php?action=PMToUserGroups&pmSessionID=' . $pmSessionID . '&packageID=' . PACKAGE_ID . SID_ARG_2ND_NOT_ENCODED));
     WCF::getTPL()->display('worker');
     exit;
 }
 /**
  * @see	Form::save()
  */
 public function save()
 {
     parent::save();
     // assign module
     $instanceID = $this->page->moduleManager->assign($this->moduleID, $this->position);
     // send redirect headers
     HeaderUtil::redirect('index.php?form=DynamicPageModuleEdit&instanceID=' . $instanceID . '&packageID=' . PACKAGE_ID . SID_ARG_2ND_NOT_ENCODED);
     // call event
     $this->executed();
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     //create date
     $date = (string) $this->dateValues['year'] . '-' . (string) $this->dateValues['month'] . '-' . (string) $this->dateValues['day'] . (MESSAGE_NEWSLETTERSYSTEM_GENERAL_HOURLYCRONJOB ? ' ' . (string) $this->dateValues['hour'] . ':00:00' : '');
     //convert date to timestamp
     $unixTime = strtotime($date);
     $newsletter = NewsletterEditor::create($unixTime, $this->subject, $this->text, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes);
     $this->saved();
     if ($this->sendTestmail) {
         $this->sendTestmail($newsletter);
     }
     //resetting cache
     $cacheName = 'newsletter-' . PACKAGE_ID;
     WCF::getCache()->clear(WCF_DIR . 'cache/', 'cache.' . $cacheName . '.php');
     HeaderUtil::redirect('index.php?form=NewsletterAdd&result=success&packageID=' . PACKAGE_ID . SID_ARG_2ND_NOT_ENCODED);
     exit;
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     if (empty($_POST['fDo']) || $_POST['fDo'] != 'mod') {
         return;
     }
     parent::save();
     if (!empty($this->tplID) && !empty($_POST['deleteTemplate'])) {
         $ret = UserWantedPosterData::deleteTemplate($this->tplID);
         if (!empty($ret)) {
             WCF::getTPL()->assign('success', WCF::getLanguage()->get('wcf.acp.wantedPoster.msgTplDeleted'));
         } else {
             WCF::getTPL()->assign('error', WCF::getLanguage()->get('wcf.acp.wantedPoster.errTplDeleted'));
         }
         $this->setDefaults();
     } else {
         $ret = UserWantedPosterData::saveTemplate($this->tplID, $this->subject, $this->text, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes, $this->enabled);
         if (!empty($ret)) {
             if (empty($this->tplID)) {
                 $this->tplID = $ret;
             }
             WCF::getTPL()->assign('success', WCF::getLanguage()->get('wcf.acp.wantedPoster.msgTplSaved'));
         } else {
             WCF::getTPL()->assign('error', WCF::getLanguage()->get('wcf.acp.wantedPoster.errTplSaved'));
         }
     }
 }
 /**
  * @see	Form::save()
  */
 public function save()
 {
     WysiwygCacheloaderForm::save();
     // save options
     $sql = "UPDATE\r\n\t\t\t\t\twcf" . WCF_N . "_page_module_to_page\r\n\t\t\t\tSET\r\n\t\t\t\t\toptions = '" . escapeString(serialize($this->optionGroupList)) . "'\r\n\t\t\t\tWHERE\r\n\t\t\t\t\tinstanceID = " . $this->instanceID;
     WCF::getDB()->sendQuery($sql);
     // remove cache
     WCF::getCache()->clear(WCF_DIR . 'cache/', 'cache.pageModules-' . $this->pageID . '-' . PACKAGE_ID . '.php');
     // display success message
     WCF::getTPL()->assign('success', true);
     // call event
     $this->saved();
 }