Remove metaKeywords from page PIP
authorMatthias Schmidt <gravatronics@live.com>
Fri, 23 Oct 2020 14:15:14 +0000 (16:15 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 23 Oct 2020 14:15:14 +0000 (16:15 +0200)
wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 9a0c0b29fbc84c466ab2a869c4c3a1be7e4dc960..48e80af4f5ee9d4bc81b5bd42caff811748ec84d 100644 (file)
@@ -135,7 +135,6 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                                        'content' => (!empty($contentData['content'])) ? StringUtil::trim($contentData['content']) : '',
                                        'customURL' => (!empty($contentData['customURL'])) ? StringUtil::trim($contentData['customURL']) : '',
                                        'metaDescription' => (!empty($contentData['metaDescription'])) ? StringUtil::trim($contentData['metaDescription']) : '',
-                                       'metaKeywords' => (!empty($contentData['metaKeywords'])) ? StringUtil::trim($contentData['metaKeywords']) : '',
                                        'title' => (!empty($contentData['title'])) ? StringUtil::trim($contentData['title']) : ''
                                ];
                        }
@@ -348,7 +347,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                        $statement = WCF::getDB()->prepareStatement($sql);
                        
                        $sql = "INSERT IGNORE INTO      wcf".WCF_N."_page_content
-                                                       (pageID, languageID, title, content, metaDescription, metaKeywords, customURL)
+                                                       (pageID, languageID, title, content, metaDescription, customURL)
                                VALUES                  (?, ?, ?, ?, ?, ?, ?)";
                        $insertStatement = WCF::getDB()->prepareStatement($sql);
                        
@@ -374,8 +373,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                                                $content['title'],
                                                $content['content'],
                                                $content['metaDescription'],
-                                               $content['metaKeywords'],
-                                               $content['customURL']
+                                               $content['customURL'],
                                        ]);
                                        
                                        // generate template if page's type is 'tpl'
@@ -598,13 +596,6 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                                ->i18n()
                                ->i18nRequired()
                                ->languageItemPattern('__NONE__'),
-                       
-                       TextFormField::create('contentMetaKeywords')
-                               ->objectProperty('metaKeywords')
-                               ->label('wcf.acp.pip.page.contentMetaKeywords')
-                               ->i18n()
-                               ->i18nRequired()
-                               ->languageItemPattern('__NONE__'),
                ]);
                
                // dependencies
@@ -619,7 +610,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                        );
                }
                
-               foreach (['contentContent', 'contentCustomURL', 'contentMetaDescription', 'contentMetaKeywords'] as $nonSystemElement) {
+               foreach (['contentContent', 'contentCustomURL', 'contentMetaDescription'] as $nonSystemElement) {
                        $form->getNodeById($nonSystemElement)->addDependency(
                                ValueFormFieldDependency::create('pageType')
                                        ->field($pageType)
@@ -644,7 +635,6 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                        'content' => [],
                        'customURL' => [],
                        'metaDescription' => [],
-                       'metaKeywords' => []
                ];
                
                /** @var \DOMElement $name */
@@ -682,7 +672,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                }
                
                $readData = function($languageID, \DOMElement $content) use (&$data, $saveData) {
-                       foreach (['title', 'content', 'customURL', 'metaDescription', 'metaKeywords'] as $contentElementName) {
+                       foreach (['title', 'content', 'customURL', 'metaDescription'] as $contentElementName) {
                                $contentElement = $content->getElementsByTagName($contentElementName)->item(0);
                                if (!isset($data[$contentElementName])) {
                                        $data[$contentElementName] = [];
@@ -740,7 +730,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                        
                        $content = [];
                        
-                       foreach (['title', 'content', 'customURL', 'metaDescription', 'metaKeywords'] as $contentProperty) {
+                       foreach (['title', 'content', 'customURL', 'metaDescription'] as $contentProperty) {
                                if (!empty($data[$contentProperty])) {
                                        foreach ($data[$contentProperty] as $languageID => $value) {
                                                $languageCode = LanguageFactory::getInstance()->getLanguage($languageID)->languageCode;
@@ -757,7 +747,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                        }
                        
                        foreach ($content as $languageCode => $values) {
-                               foreach (['title', 'content', 'customURL', 'metaDescription', 'metaKeywords'] as $contentProperty) {
+                               foreach (['title', 'content', 'customURL', 'metaDescription'] as $contentProperty) {
                                        if (!isset($values[$contentProperty])) {
                                                $content[$languageCode][$contentProperty] = '';
                                        }
@@ -858,7 +848,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                foreach ($languages as $language) {
                        $content = null;
                        
-                       foreach (['title', 'content', 'customURL', 'metaDescription', 'metaKeywords'] as $property) {
+                       foreach (['title', 'content', 'customURL', 'metaDescription'] as $property) {
                                if (!empty($formData[$property . '_i18n'][$language->languageID])) {
                                        if ($content === null) {
                                                $content = $document->createElement('content');
index 577be3b506f7160b00bde46f204875b2c7ce8380..9062ac6d36ced0f4e04de272ddbac9efd68d5d7b 100644 (file)
@@ -2552,7 +2552,6 @@ Kein Abschnitt darf leer sein und alle Abschnitten dürfen nur folgende Zeichen
                <item name="wcf.acp.pip.page.contentContent"><![CDATA[Inhalt]]></item>
                <item name="wcf.acp.pip.page.contentCustomURL"><![CDATA[Individuelle URL]]></item>
                <item name="wcf.acp.pip.page.contentMetaDescription"><![CDATA[Meta Description]]></item>
-               <item name="wcf.acp.pip.page.contentMetaKeywords"><![CDATA[Meta Keywords]]></item>
                <item name="wcf.acp.pip.page.contentTitle"><![CDATA[Titel]]></item>
                <item name="wcf.acp.pip.page.controller"><![CDATA[Seiten-Controller]]></item>
                <item name="wcf.acp.pip.page.cssClassName"><![CDATA[CSS-Klassen]]></item>
index c20e910ab451a5c0d0a34645808d69c103de5642..01affdf20dabf4d8ae777d8d48a37fbd8c118c91 100644 (file)
@@ -2324,7 +2324,6 @@ If you have <strong>already bought the licenses for the listed apps</strong>, th
                <item name="wcf.acp.pip.page.contentContent"><![CDATA[Content]]></item>
                <item name="wcf.acp.pip.page.contentCustomURL"><![CDATA[Custom URL]]></item>
                <item name="wcf.acp.pip.page.contentMetaDescription"><![CDATA[Meta Description]]></item>
-               <item name="wcf.acp.pip.page.contentMetaKeywords"><![CDATA[Meta Keywords]]></item>
                <item name="wcf.acp.pip.page.content"><![CDATA[Page Contents]]></item>
                <item name="wcf.acp.pip.eventListener.listenerName"><![CDATA[Event Listener Identifier]]></item>
                <item name="wcf.acp.pip.eventListener.listenerName.description"><![CDATA[Unique textual identifier of the event listener that may only contain letters and must start with a lowercase letter.]]></item>