Round priority to one decimal place
authorJoshua Rüsweg <josh@bastelstu.be>
Sun, 11 Jun 2017 14:42:44 +0000 (16:42 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Sun, 11 Jun 2017 14:42:44 +0000 (16:42 +0200)
wcfsetup/install/files/lib/acp/form/SitemapEditForm.class.php

index a2d48ce3df7c32ea44f76cf8949525730be7d5c0..5b4dd2f761fa61d142ab26b59b6e6ee0c13d4431 100755 (executable)
@@ -118,7 +118,7 @@ class SitemapEditForm extends AbstractForm {
        public function readFormParameters() {
                parent::readFormParameters();
                
-               if (isset($_POST['priority'])) $this->priority = floatval($_POST['priority']);
+               if (isset($_POST['priority'])) $this->priority = round(floatval($_POST['priority']), 1);
                if (isset($_POST['changeFreq'])) $this->changeFreq = $_POST['changeFreq'];
                if (isset($_POST['rebuildTime'])) $this->rebuildTime = intval($_POST['rebuildTime']);
                $this->isDisabled = (isset($_POST['isDisabled'])) ? 1 : 0;