Refactor
This commit is contained in:
parent
82d908f385
commit
8c79e9ab58
2 changed files with 4 additions and 3 deletions
|
@ -22,7 +22,8 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
|||
|
||||
$response['data'] = array(
|
||||
'url' => $url->getPretty(),
|
||||
'wasPretty' => $url->isPretty(),
|
||||
'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