diff options
author | Michal Čihař <michal@cihar.com> | 2015-12-15 12:24:03 +0300 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2015-12-15 12:24:03 +0300 |
commit | 605ce3388bd81c45903dd10947aa447b8ad8cffa (patch) | |
tree | 51ae436eb4c627da3d8a7ea36dea463dfd3cb3a1 /sql.php | |
parent | 0a207085339b888293900998432585e3231d3b11 (diff) |
Remove duplicate checking of goto
It's already done in common.inc.php, no need to check again here (and
the check was wrong anyway).
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'sql.php')
-rw-r--r-- | sql.php | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -45,15 +45,8 @@ if (isset($ajax_reload) && $ajax_reload['reload'] === true) { /** * Defines the url to return to in case of error in a sql statement */ -// Security checks -if (! empty($goto)) { - $is_gotofile = preg_replace('@^([^?]+).*$@s', '\\1', $goto); - if (! @file_exists('' . $is_gotofile)) { - unset($goto); - } else { - $is_gotofile = ($is_gotofile == $goto); - } -} else { +$is_gotofile = true; +if (empty($goto)) { if (empty($table)) { $goto = Util::getScriptNameForOption( $GLOBALS['cfg']['DefaultTabDatabase'], 'database' @@ -63,7 +56,6 @@ if (! empty($goto)) { $GLOBALS['cfg']['DefaultTabTable'], 'table' ); } - $is_gotofile = true; } // end if if (! isset($err_url)) { |