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'; +}