From b7a8179eb6bf0f1643970ac57a70b5b513a1cd4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 20 May 2011 09:46:15 +0200 Subject: [PATCH] Can not use redirector for setup. We currently have no reasonable way to protect it there. --- libraries/core.lib.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/libraries/core.lib.php b/libraries/core.lib.php index 1152d6ab1..1350247ae 100644 --- a/libraries/core.lib.php +++ b/libraries/core.lib.php @@ -681,15 +681,12 @@ function PMA_array_remove($path, &$array) * @return string URL for a link. */ function PMA_linkURL($url) { - $params = array(); - $params['url'] = $url; - $goto = 'url.php' . PMA_generate_common_url($params); - if (!preg_match('#^https?://#', $url)) { + if (!preg_match('#^https?://#', $url) || defined('PMA_SETUP')) { return $url; - } elseif (defined('PMA_SETUP')) { - return '../' . $goto; } else { - return './' . $goto; + $params = array(); + $params['url'] = $url; + return './url.php' . PMA_generate_common_url($params); } }