From: Marcel Werk Date: Fri, 5 May 2023 10:16:21 +0000 (+0200) Subject: Make sitemap priority no longer configurable X-Git-Tag: 6.0.0_Alpha_1~153^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=66670d7b431a9edae70c47eaaa2e6f916de96805;p=GitHub%2FWoltLab%2FWCF.git Make sitemap priority no longer configurable Closes #5309 --- diff --git a/wcfsetup/install/files/acp/templates/sitemapEdit.tpl b/wcfsetup/install/files/acp/templates/sitemapEdit.tpl index 9b19fa0901..8b1e33d85d 100755 --- a/wcfsetup/install/files/acp/templates/sitemapEdit.tpl +++ b/wcfsetup/install/files/acp/templates/sitemapEdit.tpl @@ -23,19 +23,6 @@
- -
-
- - {if $errorField == 'priority'} - - {lang}wcf.acp.sitemap.priority.error.{$errorType}{/lang} - - {/if} - {lang}wcf.acp.sitemap.priority.description{/lang} -
- -
diff --git a/wcfsetup/install/files/lib/acp/form/SitemapEditForm.class.php b/wcfsetup/install/files/lib/acp/form/SitemapEditForm.class.php index 69a5358604..bb03af7e71 100755 --- a/wcfsetup/install/files/lib/acp/form/SitemapEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/SitemapEditForm.class.php @@ -48,12 +48,6 @@ class SitemapEditForm extends AbstractForm */ public $objectType; - /** - * The priority for this sitemap object. - * @var float - */ - public $priority = 0.5; - /** * The changeFreq for this sitemap object. * @var string @@ -122,14 +116,10 @@ class SitemapEditForm extends AbstractForm $sitemapData = @\unserialize($sitemapData); if (\is_array($sitemapData)) { - $this->priority = $sitemapData['priority']; $this->changeFreq = $sitemapData['changeFreq']; $this->rebuildTime = $sitemapData['rebuildTime']; $this->isDisabled = $sitemapData['isDisabled']; } else { - if ($this->objectType->priority !== null) { - $this->priority = $this->objectType->priority; - } if ($this->objectType->changeFreq !== null) { $this->changeFreq = $this->objectType->changeFreq; } @@ -150,9 +140,6 @@ class SitemapEditForm extends AbstractForm { parent::readFormParameters(); - if (isset($_POST['priority'])) { - $this->priority = \round(\floatval($_POST['priority']), 1); - } if (isset($_POST['changeFreq'])) { $this->changeFreq = $_POST['changeFreq']; } @@ -169,10 +156,6 @@ class SitemapEditForm extends AbstractForm { parent::validate(); - if ($this->priority > 1 || $this->priority < 0) { - throw new UserInputException('priority', 'invalid'); - } - if (!\in_array($this->changeFreq, $this->validChangeFreq)) { throw new UserInputException('changeFreq'); } @@ -189,7 +172,6 @@ class SitemapEditForm extends AbstractForm 'com.woltlab.wcf', SitemapRebuildWorker::REGISTRY_PREFIX . $this->objectTypeName, \serialize([ - 'priority' => $this->priority, 'changeFreq' => $this->changeFreq, 'rebuildTime' => $this->rebuildTime, 'isDisabled' => $this->isDisabled, @@ -211,7 +193,6 @@ class SitemapEditForm extends AbstractForm WCF::getTPL()->assign([ 'objectType' => $this->objectType, - 'priority' => $this->priority, 'changeFreq' => $this->changeFreq, 'rebuildTime' => $this->rebuildTime, 'validChangeFreq' => $this->validChangeFreq, diff --git a/wcfsetup/install/files/lib/system/worker/SitemapRebuildWorker.class.php b/wcfsetup/install/files/lib/system/worker/SitemapRebuildWorker.class.php index 8d53963cdc..d7cf537a14 100755 --- a/wcfsetup/install/files/lib/system/worker/SitemapRebuildWorker.class.php +++ b/wcfsetup/install/files/lib/system/worker/SitemapRebuildWorker.class.php @@ -524,7 +524,6 @@ class SitemapRebuildWorker extends AbstractRebuildDataWorker $sitemapData = @\unserialize($sitemapData); if (\is_array($sitemapData)) { - $object->priority = $sitemapData['priority']; $object->changeFreq = $sitemapData['changeFreq']; $object->rebuildTime = $sitemapData['rebuildTime']; $object->isDisabled = $sitemapData['isDisabled']; diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 69ee54f1cb..262ad59f42 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2717,8 +2717,6 @@ Abschnitte dürfen nicht leer sein und nur folgende Zeichen enthalten: [a-z - - diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 0560434073..467f5401ef 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2647,8 +2647,6 @@ If you have already bought the licenses for the listed apps, th - -