Fix bad merge
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 27 Jan 2021 16:28:25 +0000 (17:28 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 27 Jan 2021 16:28:25 +0000 (17:28 +0100)
see 521f18fb9505d68091945d6ee484277dac89645c
see fa8aae2ad5f9299fdbce5feed23fe03a4fb335d4

wcfsetup/install/files/lib/form/ArticleAddForm.class.php

index b16f4c48c898f3f4ff4f297f24fde165f71e3669..2dcce5bdc1fc1f878e3a514be09f13ee6affa6a4 100644 (file)
@@ -16,34 +16,39 @@ use wcf\util\HeaderUtil;
  * @package     WoltLabSuite\Core\Form
  * @since       5.2
  */
-class ArticleAddForm extends \wcf\acp\form\ArticleAddForm {
-       /**
-        * @inheritDoc
-        */
-       public function assignVariables() {
-               parent::assignVariables();
-               
-               WCF::getTPL()->assign(['articleIsFrontend' => true]);
-       }
-       
-       /**
-        * @inheritDoc
-        */
-       public function save() {
-               parent::save();
-               
-               /** @var Article $article */
-               $article = $this->objectAction->getReturnValues()['returnValues'];
-               if ($article->publicationStatus == Article::PUBLISHED) {
-                       HeaderUtil::redirect($article->getLink());
-                       
-                       exit;
-               }
-               else {
-                       WCF::getTPL()->assign([
-                               // We need to reassign the link here because otherwise it will lead to the admin panel.
-                               'objectEditLink' => LinkHandler::getInstance()->getControllerLink(ArticleEditForm::class, ['id' => $article->getObjectID()]),
-                       ]);
-               }
-       }
+class ArticleAddForm extends \wcf\acp\form\ArticleAddForm
+{
+    /**
+     * @inheritDoc
+     */
+    public function assignVariables()
+    {
+        parent::assignVariables();
+
+        WCF::getTPL()->assign(['articleIsFrontend' => true]);
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function save()
+    {
+        parent::save();
+
+        /** @var Article $article */
+        $article = $this->objectAction->getReturnValues()['returnValues'];
+        if ($article->publicationStatus == Article::PUBLISHED) {
+            HeaderUtil::redirect($article->getLink());
+
+            exit;
+        } else {
+            WCF::getTPL()->assign([
+                // We need to reassign the link here because otherwise it will lead to the admin panel.
+                'objectEditLink' => LinkHandler::getInstance()->getControllerLink(
+                    ArticleEditForm::class,
+                    ['id' => $article->getObjectID()]
+                ),
+            ]);
+        }
+    }
 }