Simplify detection of current script

Fixes #11754

Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Marc Delisle <marc@infomarc.info>
This commit is contained in:
Michal Čihař 2015-12-17 11:57:14 +01:00 committed by Marc Delisle
parent a81ac373c8
commit 5de5dc8463

View File

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