From: Stricted Date: Wed, 20 Jul 2016 06:59:19 +0000 (+0200) Subject: fix last commit X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f039270f8efdfe7a3d95a3fd80d1bf158dde05d5;p=GitHub%2FStricted%2FDomain-Control-Panel.git fix last commit --- diff --git a/lib/system/RequestHandler.class.php b/lib/system/RequestHandler.class.php index f455894..54f076b 100644 --- a/lib/system/RequestHandler.class.php +++ b/lib/system/RequestHandler.class.php @@ -154,7 +154,7 @@ class RequestHandler extends SingletonFactory { } public function getLink (array $params = [], $query = '') { - $path_info = true; // TODO: add config constant for that + $path_info = false; // TODO: add config constant for that $url = $this->getBaseUrl() . 'index.php'; if ($path_info) { @@ -173,24 +173,26 @@ class RequestHandler extends SingletonFactory { if (!empty($params['id'])) { if (!empty($params['title'])) { - $url .= '/'.$params['id'].'-'.$params['title']; + $url .= '/' . $params['id'] . '-' . $params['title']; } else { - $url .= '/'.$params['id']; + $url .= '/' . $params['id']; } } if (!empty($query)) { if ($path_info) { if (strpos($query, '&') === 0) { - $query = '/' . substr($query, 1); + $query = '?' . substr($query, 1); } - else if (strpos($query, '/') !== 0) { - $query = '/' . $query; + else if (strpos($query, '?') !== 0) { + $query = '?' . $query; } + + $query = '/' . $query; } else { - if (strpos($query, '/') === 0) { + if (strpos($query, '?') === 0) { $query = '&' . substr($query, 1); } else if (strpos($query, '&') !== 0) {