From 5de5dc8463e5049541b1e03569e0f4563b2016db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 17 Dec 2015 11:57:14 +0100 Subject: [PATCH] Simplify detection of current script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #11754 Signed-off-by: Michal Čihař Signed-off-by: Marc Delisle --- libraries/tbl_common.inc.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libraries/tbl_common.inc.php b/libraries/tbl_common.inc.php index fe0c488113..7903499ebc 100644 --- a/libraries/tbl_common.inc.php +++ b/libraries/tbl_common.inc.php @@ -50,9 +50,6 @@ $err_url = PMA_Util::getScriptNameForOption( * Ensures the database and the table exist (else move to the "parent" script) * Skip test if we are exporting as we can't tell whether a table name is an alias (which would fail the test). */ -$URL = explode('/',$_SERVER['REQUEST_URI']); -if ($URL[2]) - $requested_function = explode('?',$URL[2])[0]; - -if (!$URL[2] || $requested_function != 'tbl_export.php') - require_once './libraries/db_table_exists.lib.php'; +if (basename($_SERVER['PHP_SELF']) != 'tbl_export.php') { + require_once './libraries/db_table_exists.lib.php'; +}