From: Alexander Ebert Date: Thu, 21 Jul 2016 12:12:24 +0000 (+0200) Subject: Resolved todo / minor fixes X-Git-Tag: 3.0.0_Beta_1~1019 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9d9aede4225060df9ec098cb9a75d1d6481b17b2;p=GitHub%2FWoltLab%2FWCF.git Resolved todo / minor fixes --- diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index e1b2c72463..0626150d1e 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -322,7 +322,7 @@ WCF.ACP.Package.Installation = Class.extend({ */ init: function(queueID, actionName, allowRollback, isUpdate) { this._actionName = (actionName) ? actionName : 'InstallPackage'; - this._allowRollback = (allowRollback === true) ? true : false; + this._allowRollback = (allowRollback === true); this._queueID = queueID; switch (this._actionName) { diff --git a/wcfsetup/install/files/lib/page/AbstractPage.class.php b/wcfsetup/install/files/lib/page/AbstractPage.class.php index f6a2948479..6ac6b47bc8 100644 --- a/wcfsetup/install/files/lib/page/AbstractPage.class.php +++ b/wcfsetup/install/files/lib/page/AbstractPage.class.php @@ -180,7 +180,7 @@ abstract class AbstractPage implements IPage { // check if current request URL matches the canonical URL if ($this->canonicalURL && (empty($_POST) || $this->forceCanonicalURL)) { - $canoncialURL = parse_url(preg_replace('~[?&]s=[a-f0-9]{40}~', '', $this->canonicalURL)); + $canonicalURL = parse_url(preg_replace('~[?&]s=[a-f0-9]{40}~', '', $this->canonicalURL)); // use $_SERVER['REQUEST_URI'] because it represents the URL used to access the site and not the internally rewritten one // IIS Rewrite-Module has a bug causing the REQUEST_URI to be ISO-encoded @@ -199,15 +199,15 @@ abstract class AbstractPage implements IPage { $requestURL = parse_url($requestURI); $redirect = false; - if ($canoncialURL['path'] != $requestURL['path']) { + if ($canonicalURL['path'] != $requestURL['path']) { $redirect = true; } - else if (isset($canoncialURL['query'])) { + else if (isset($canonicalURL['query'])) { if (!isset($requestURL['query'])) { $redirect = true; } else { - parse_str($canoncialURL['query'], $cQueryString); + parse_str($canonicalURL['query'], $cQueryString); parse_str($requestURL['query'], $rQueryString); foreach ($cQueryString as $key => $value) { @@ -221,14 +221,11 @@ abstract class AbstractPage implements IPage { if ($redirect) { $redirectURL = $this->canonicalURL; - // TODO - /* if (!empty($requestURL['query'])) { - $queryString = $requestURL['query']; parse_str($requestURL['query'], $rQueryString); - if (!empty($canoncialURL['query'])) { - parse_str($canoncialURL['query'], $cQueryString); + if (!empty($canonicalURL['query'])) { + parse_str($canonicalURL['query'], $cQueryString); // clean query string foreach ($cQueryString as $key => $value) { @@ -239,11 +236,9 @@ abstract class AbstractPage implements IPage { } // drop route data from query - if (!URL_LEGACY_MODE) { - foreach ($rQueryString as $key => $value) { - if ($value === '') { - unset($rQueryString[$key]); - } + foreach ($rQueryString as $key => $value) { + if ($value === '') { + unset($rQueryString[$key]); } } @@ -251,7 +246,6 @@ abstract class AbstractPage implements IPage { $redirectURL .= (mb_strpos($redirectURL, '?') === false ? '?' : '&') . http_build_query($rQueryString, '', '&'); } } - */ // force a permanent redirect as recommended by Google // https://support.google.com/webmasters/answer/6033086?hl=en#a_note_about_redirects