From: Matthias Schmidt Date: Sun, 7 Aug 2016 11:55:04 +0000 (+0200) Subject: Unify code for showing form success message X-Git-Tag: 3.0.0_Beta_1~796 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=47b90344e6ed4e15facaca2ed2224e90c02fd113;p=GitHub%2FWoltLab%2FWCF.git Unify code for showing form success message --- diff --git a/wcfsetup/install/files/lib/acp/form/ApplicationEditForm.class.php b/wcfsetup/install/files/lib/acp/form/ApplicationEditForm.class.php index 8754db2669..0c313ddc70 100644 --- a/wcfsetup/install/files/lib/acp/form/ApplicationEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/ApplicationEditForm.class.php @@ -178,10 +178,8 @@ class ApplicationEditForm extends AbstractForm { // re-calculate cookie settings ApplicationHandler::rebuild(); - // show success. - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php b/wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php index f2f162c4e5..b99ee458f5 100644 --- a/wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php @@ -351,7 +351,7 @@ class ArticleAddForm extends AbstractForm { // call saved event $this->saved(); - // show success + // show success message WCF::getTPL()->assign('success', true); // reset variables diff --git a/wcfsetup/install/files/lib/acp/form/ArticleEditForm.class.php b/wcfsetup/install/files/lib/acp/form/ArticleEditForm.class.php index 22d053ade0..310d28e4e6 100644 --- a/wcfsetup/install/files/lib/acp/form/ArticleEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/ArticleEditForm.class.php @@ -103,7 +103,7 @@ class ArticleEditForm extends ArticleAddForm { // call saved event $this->saved(); - // show success + // show success message WCF::getTPL()->assign('success', true); } diff --git a/wcfsetup/install/files/lib/acp/form/BBCodeAddForm.class.php b/wcfsetup/install/files/lib/acp/form/BBCodeAddForm.class.php index 33d74bb59d..45c4a230bb 100644 --- a/wcfsetup/install/files/lib/acp/form/BBCodeAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/BBCodeAddForm.class.php @@ -261,10 +261,8 @@ class BBCodeAddForm extends AbstractForm { I18nHandler::getInstance()->reset(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/BBCodeEditForm.class.php b/wcfsetup/install/files/lib/acp/form/BBCodeEditForm.class.php index 6747446c58..2333a7ec30 100644 --- a/wcfsetup/install/files/lib/acp/form/BBCodeEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/BBCodeEditForm.class.php @@ -123,10 +123,8 @@ class BBCodeEditForm extends BBCodeAddForm { $this->saved(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/BBCodeMediaProviderAddForm.class.php b/wcfsetup/install/files/lib/acp/form/BBCodeMediaProviderAddForm.class.php index 02868dd737..798b8b0a65 100644 --- a/wcfsetup/install/files/lib/acp/form/BBCodeMediaProviderAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/BBCodeMediaProviderAddForm.class.php @@ -102,10 +102,8 @@ class BBCodeMediaProviderAddForm extends AbstractForm { // reset values $this->title = $this->regex = $this->html = ''; - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/BBCodeMediaProviderEditForm.class.php b/wcfsetup/install/files/lib/acp/form/BBCodeMediaProviderEditForm.class.php index f0314dff83..a010e98d15 100644 --- a/wcfsetup/install/files/lib/acp/form/BBCodeMediaProviderEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/BBCodeMediaProviderEditForm.class.php @@ -66,10 +66,8 @@ class BBCodeMediaProviderEditForm extends BBCodeMediaProviderAddForm { $this->saved(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php b/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php index 21e84a6e52..60e1a1b249 100644 --- a/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php @@ -496,7 +496,7 @@ class BoxAddForm extends AbstractForm { // call saved event $this->saved(); - // show success + // show success message WCF::getTPL()->assign('success', true); // reset variables diff --git a/wcfsetup/install/files/lib/acp/form/BoxEditForm.class.php b/wcfsetup/install/files/lib/acp/form/BoxEditForm.class.php index 8e6dcc7e65..b526dffa63 100644 --- a/wcfsetup/install/files/lib/acp/form/BoxEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/BoxEditForm.class.php @@ -127,7 +127,7 @@ class BoxEditForm extends BoxAddForm { // call saved event $this->saved(); - // show success + // show success message WCF::getTPL()->assign('success', true); } diff --git a/wcfsetup/install/files/lib/acp/form/CronjobAddForm.class.php b/wcfsetup/install/files/lib/acp/form/CronjobAddForm.class.php index 530213ee21..c276ad27ac 100755 --- a/wcfsetup/install/files/lib/acp/form/CronjobAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/CronjobAddForm.class.php @@ -187,10 +187,8 @@ class CronjobAddForm extends AbstractForm { $this->startMinute = $this->startHour = $this->startDom = $this->startMonth = $this->startDow = '*'; I18nHandler::getInstance()->reset(); - // show success. - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/CronjobEditForm.class.php b/wcfsetup/install/files/lib/acp/form/CronjobEditForm.class.php index 08fc6de29e..5570996dd9 100755 --- a/wcfsetup/install/files/lib/acp/form/CronjobEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/CronjobEditForm.class.php @@ -79,10 +79,8 @@ class CronjobEditForm extends CronjobAddForm { $this->saved(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/LabelAddForm.class.php b/wcfsetup/install/files/lib/acp/form/LabelAddForm.class.php index 4a3891dd8f..681e0e8c3a 100644 --- a/wcfsetup/install/files/lib/acp/form/LabelAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/LabelAddForm.class.php @@ -190,7 +190,7 @@ class LabelAddForm extends AbstractForm { I18nHandler::getInstance()->reset(); - // show success + // show success message WCF::getTPL()->assign('success', true); } diff --git a/wcfsetup/install/files/lib/acp/form/LabelEditForm.class.php b/wcfsetup/install/files/lib/acp/form/LabelEditForm.class.php index 40257c6e38..84638c3aa7 100644 --- a/wcfsetup/install/files/lib/acp/form/LabelEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/LabelEditForm.class.php @@ -88,10 +88,8 @@ class LabelEditForm extends LabelAddForm { // reset values if non-custom value was choosen if ($this->cssClassName != 'custom') $this->customCssClassName = ''; - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/LabelGroupAddForm.class.php b/wcfsetup/install/files/lib/acp/form/LabelGroupAddForm.class.php index 237ff36068..39bef2b23a 100644 --- a/wcfsetup/install/files/lib/acp/form/LabelGroupAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/LabelGroupAddForm.class.php @@ -196,10 +196,8 @@ class LabelGroupAddForm extends AbstractForm { $this->showOrder = 0; $this->setObjectTypeRelations(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); I18nHandler::getInstance()->reset(); } diff --git a/wcfsetup/install/files/lib/acp/form/LabelGroupEditForm.class.php b/wcfsetup/install/files/lib/acp/form/LabelGroupEditForm.class.php index 69aa01e9c2..9fb1100b74 100644 --- a/wcfsetup/install/files/lib/acp/form/LabelGroupEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/LabelGroupEditForm.class.php @@ -89,10 +89,8 @@ class LabelGroupEditForm extends LabelGroupAddForm { $this->saved(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/MenuAddForm.class.php b/wcfsetup/install/files/lib/acp/form/MenuAddForm.class.php index 772ce2ce4f..0059cd05d0 100644 --- a/wcfsetup/install/files/lib/acp/form/MenuAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/MenuAddForm.class.php @@ -186,10 +186,8 @@ class MenuAddForm extends AbstractForm { // reset values $this->title = ''; - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); I18nHandler::getInstance()->reset(); } diff --git a/wcfsetup/install/files/lib/acp/form/MenuEditForm.class.php b/wcfsetup/install/files/lib/acp/form/MenuEditForm.class.php index 7d9effbc34..7b88d133de 100644 --- a/wcfsetup/install/files/lib/acp/form/MenuEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/MenuEditForm.class.php @@ -91,11 +91,9 @@ class MenuEditForm extends MenuAddForm { } $this->saved(); - - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/MenuItemAddForm.class.php b/wcfsetup/install/files/lib/acp/form/MenuItemAddForm.class.php index 3cc0b31365..456e6bb324 100644 --- a/wcfsetup/install/files/lib/acp/form/MenuItemAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/MenuItemAddForm.class.php @@ -262,7 +262,7 @@ class MenuItemAddForm extends AbstractForm { // call saved event $this->saved(); - // show success + // show success message WCF::getTPL()->assign('success', true); // reset variables diff --git a/wcfsetup/install/files/lib/acp/form/MenuItemEditForm.class.php b/wcfsetup/install/files/lib/acp/form/MenuItemEditForm.class.php index 41803de3ec..3ee433fdbe 100644 --- a/wcfsetup/install/files/lib/acp/form/MenuItemEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/MenuItemEditForm.class.php @@ -99,10 +99,8 @@ class MenuItemEditForm extends MenuItemAddForm { $this->objectAction->executeAction(); $this->saved(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/PageAddForm.class.php b/wcfsetup/install/files/lib/acp/form/PageAddForm.class.php index de2148ab01..c15faa9129 100644 --- a/wcfsetup/install/files/lib/acp/form/PageAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PageAddForm.class.php @@ -464,7 +464,7 @@ class PageAddForm extends AbstractForm { // call saved event $this->saved(); - // show success + // show success message WCF::getTPL()->assign('success', true); // reset variables diff --git a/wcfsetup/install/files/lib/acp/form/PageEditForm.class.php b/wcfsetup/install/files/lib/acp/form/PageEditForm.class.php index 17deca08b3..04bca23b31 100644 --- a/wcfsetup/install/files/lib/acp/form/PageEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PageEditForm.class.php @@ -205,7 +205,7 @@ class PageEditForm extends PageAddForm { // call saved event $this->saved(); - // show success + // show success message WCF::getTPL()->assign('success', true); } diff --git a/wcfsetup/install/files/lib/acp/form/PaidSubscriptionAddForm.class.php b/wcfsetup/install/files/lib/acp/form/PaidSubscriptionAddForm.class.php index d775e2ade4..1b084cf809 100644 --- a/wcfsetup/install/files/lib/acp/form/PaidSubscriptionAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PaidSubscriptionAddForm.class.php @@ -282,10 +282,8 @@ class PaidSubscriptionAddForm extends AbstractForm { $this->groupIDs = []; I18nHandler::getInstance()->reset(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/PaidSubscriptionEditForm.class.php b/wcfsetup/install/files/lib/acp/form/PaidSubscriptionEditForm.class.php index 1d6e3e3653..cba189d1de 100644 --- a/wcfsetup/install/files/lib/acp/form/PaidSubscriptionEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PaidSubscriptionEditForm.class.php @@ -142,10 +142,8 @@ class PaidSubscriptionEditForm extends PaidSubscriptionAddForm { $this->objectAction->executeAction(); $this->saved(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/PaidSubscriptionUserAddForm.class.php b/wcfsetup/install/files/lib/acp/form/PaidSubscriptionUserAddForm.class.php index 0befc932d3..2462248c32 100644 --- a/wcfsetup/install/files/lib/acp/form/PaidSubscriptionUserAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PaidSubscriptionUserAddForm.class.php @@ -146,10 +146,8 @@ class PaidSubscriptionUserAddForm extends AbstractForm { // reset values $this->username = $this->endDate = ''; - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/SmileyEditForm.class.php b/wcfsetup/install/files/lib/acp/form/SmileyEditForm.class.php index 9ac7b1d4c3..e6f81a357d 100644 --- a/wcfsetup/install/files/lib/acp/form/SmileyEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/SmileyEditForm.class.php @@ -84,10 +84,8 @@ class SmileyEditForm extends SmileyAddForm { $this->saved(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/TagAddForm.class.php b/wcfsetup/install/files/lib/acp/form/TagAddForm.class.php index ec0be84082..78f065905b 100644 --- a/wcfsetup/install/files/lib/acp/form/TagAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/TagAddForm.class.php @@ -178,10 +178,8 @@ class TagAddForm extends AbstractForm { $this->name = ''; $this->synonyms = []; - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/TagEditForm.class.php b/wcfsetup/install/files/lib/acp/form/TagEditForm.class.php index 4dfc8dd1d0..1290d050d8 100644 --- a/wcfsetup/install/files/lib/acp/form/TagEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/TagEditForm.class.php @@ -97,10 +97,8 @@ class TagEditForm extends TagAddForm { $this->saved(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/TemplateAddForm.class.php b/wcfsetup/install/files/lib/acp/form/TemplateAddForm.class.php index 917459611b..85c02d51fb 100644 --- a/wcfsetup/install/files/lib/acp/form/TemplateAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/TemplateAddForm.class.php @@ -203,10 +203,8 @@ class TemplateAddForm extends AbstractForm { $this->tplName = $this->templateSource = ''; $this->templateGroupID = 0; - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/TemplateEditForm.class.php b/wcfsetup/install/files/lib/acp/form/TemplateEditForm.class.php index 586116a6a3..2731069b05 100644 --- a/wcfsetup/install/files/lib/acp/form/TemplateEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/TemplateEditForm.class.php @@ -78,10 +78,8 @@ class TemplateEditForm extends TemplateAddForm { $this->objectAction->executeAction(); $this->saved(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/TemplateGroupAddForm.class.php b/wcfsetup/install/files/lib/acp/form/TemplateGroupAddForm.class.php index 6eccbe2ce5..9a5af945d0 100644 --- a/wcfsetup/install/files/lib/acp/form/TemplateGroupAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/TemplateGroupAddForm.class.php @@ -139,10 +139,8 @@ class TemplateGroupAddForm extends AbstractForm { $this->templateGroupName = $this->templateGroupFolderName = ''; $this->parentTemplateGroupID = 0; - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/TemplateGroupEditForm.class.php b/wcfsetup/install/files/lib/acp/form/TemplateGroupEditForm.class.php index 1bbfb1f4a3..c44197d47e 100644 --- a/wcfsetup/install/files/lib/acp/form/TemplateGroupEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/TemplateGroupEditForm.class.php @@ -81,10 +81,8 @@ class TemplateGroupEditForm extends TemplateGroupAddForm { $this->objectAction->executeAction(); $this->saved(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php b/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php index 9c28785cc7..044291da7b 100755 --- a/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php @@ -181,9 +181,7 @@ class UserGroupAddForm extends AbstractOptionListForm { $this->saved(); // show success message - WCF::getTPL()->assign([ - 'success' => true - ]); + WCF::getTPL()->assign('success', true); // reset values $this->groupName = ''; diff --git a/wcfsetup/install/files/lib/acp/form/UserOptionCategoryAddForm.class.php b/wcfsetup/install/files/lib/acp/form/UserOptionCategoryAddForm.class.php index b431f22dea..040c32da7b 100644 --- a/wcfsetup/install/files/lib/acp/form/UserOptionCategoryAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserOptionCategoryAddForm.class.php @@ -100,10 +100,8 @@ class UserOptionCategoryAddForm extends AbstractForm { I18nHandler::getInstance()->reset(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/UserRankAddForm.class.php b/wcfsetup/install/files/lib/acp/form/UserRankAddForm.class.php index 379c29197e..1e124e863c 100644 --- a/wcfsetup/install/files/lib/acp/form/UserRankAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserRankAddForm.class.php @@ -210,10 +210,8 @@ class UserRankAddForm extends AbstractForm { I18nHandler::getInstance()->reset(); - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /** diff --git a/wcfsetup/install/files/lib/acp/form/UserRankEditForm.class.php b/wcfsetup/install/files/lib/acp/form/UserRankEditForm.class.php index 874ca43c01..3ed5f88386 100644 --- a/wcfsetup/install/files/lib/acp/form/UserRankEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserRankEditForm.class.php @@ -77,10 +77,8 @@ class UserRankEditForm extends UserRankAddForm { // reset values if non-custom value was choosen if ($this->cssClassName != 'custom') $this->customCssClassName = ''; - // show success - WCF::getTPL()->assign([ - 'success' => true - ]); + // show success message + WCF::getTPL()->assign('success', true); } /**