Fix page PIP GUI issues with content element
authorMatthias Schmidt <gravatronics@live.com>
Wed, 17 Oct 2018 17:59:09 +0000 (19:59 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 17 Oct 2018 17:59:09 +0000 (19:59 +0200)
See #2545

wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php

index 55aefa6b8c66109ea5d11c94bf63fe94e0b8dfd1..7fe1cc3ee261f710dbd5f5b2c879d743cd378c30 100644 (file)
@@ -574,7 +574,6 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                        TitleFormField::create('contentTitle')
                                ->objectProperty('title')
                                ->label('wcf.acp.pip.page.contentTitle')
-                               ->required()
                                ->i18n()
                                ->i18nRequired()
                                ->languageItemPattern('__NONE__'),
@@ -582,7 +581,6 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                        MultilineTextFormField::create('contentContent')
                                ->objectProperty('content')
                                ->label('wcf.acp.pip.page.contentContent')
-                               ->required()
                                ->i18n()
                                ->i18nRequired()
                                ->languageItemPattern('__NONE__'),
@@ -719,9 +717,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                                unset($data[$contentProperty]);
                        }
                        
-                       if (!empty($content)) {
-                               $data['content'] = $content;
-                       }
+                       $data['content'] = $content;
                }
                
                return $data;