Refactor
This commit is contained in:
parent
82d908f385
commit
8c79e9ab58
2 changed files with 4 additions and 3 deletions
|
@ -21,8 +21,9 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
|||
$url = new URL(base64_decode($_GET['url']));
|
||||
|
||||
$response['data'] = array(
|
||||
'url' => $url->getPretty(),
|
||||
'wasPretty' => $url->isPretty(),
|
||||
'url' => $url->getPretty(),
|
||||
'url_old' => $url->url,
|
||||
'url_old_pretty' => $url->isPretty(),
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -172,7 +172,7 @@ class URL
|
|||
$queryString = parse_url($this->getPermalink(), PHP_URL_QUERY);
|
||||
$GET = array();
|
||||
|
||||
if ($this->isPretty()) {
|
||||
if ($this->isPretty() && $queryString) {
|
||||
parse_str($queryString, $GET);
|
||||
} else {
|
||||
$GET = $_GET;
|
||||
|
|
Loading…
Reference in a new issue