Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauriciofauth@gmail.com>2017-06-02 20:09:23 +0300
committerMaurício Meneghini Fauth <mauriciofauth@gmail.com>2017-06-03 06:52:22 +0300
commite330402b5b57380587c576d1c03c542176423681 (patch)
treebcd0552fab0be5eb957d053ab32ed7d65c8d4b85 /url.php
parent2af08b93f10660db3e14884ff792ed153ec9df50 (diff)
Refactor the core functions into static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'url.php')
-rw-r--r--url.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/url.php b/url.php
index 6cbce0f557..086b0eedb7 100644
--- a/url.php
+++ b/url.php
@@ -5,6 +5,8 @@
*
* @package PhpMyAdmin
*/
+
+use PMA\libraries\Core;
use PMA\libraries\Sanitize;
use PMA\libraries\Response;
@@ -19,11 +21,11 @@ $response = Response::getInstance();
$response->getHeader()->sendHttpHeaders();
$response->disable();
-if (! PMA_isValid($_REQUEST['url'])
+if (! Core::isValid($_REQUEST['url'])
|| ! preg_match('/^https:\/\/[^\n\r]*$/', $_REQUEST['url'])
- || ! PMA_isAllowedDomain($_REQUEST['url'])
+ || ! Core::isAllowedDomain($_REQUEST['url'])
) {
- PMA_sendHeaderLocation('./');
+ Core::sendHeaderLocation('./');
} else {
// JavaScript redirection is necessary. Because if header() is used
// then web browser sometimes does not change the HTTP_REFERER