/**
  * Test for PMA_getUrlParameters
  *
  * @return void
  */
 public function testGetUrlParameters()
 {
     $_REQUEST['sql_query'] = 'SELECT';
     $GLOBALS['goto'] = 'tbl_change.php';
     $this->assertEquals(array('db' => 'foo', 'sql_query' => 'SELECT', 'table' => 'bar'), PMA_getUrlParameters('foo', 'bar'));
 }
Beispiel #2
0
 * file listing
*/
require_once 'libraries/file_listing.lib.php';
/**
 * Defines the url to return to in case of error in a sql statement
 * (at this point, $GLOBALS['goto'] will be set but could be empty)
 */
if (empty($GLOBALS['goto'])) {
    if (mb_strlen($table)) {
        // avoid a problem (see bug #2202709)
        $GLOBALS['goto'] = 'tbl_sql.php';
    } else {
        $GLOBALS['goto'] = 'db_sql.php';
    }
}
$_url_params = PMA_getUrlParameters($db, $table);
$err_url = $GLOBALS['goto'] . URL::getCommon($_url_params);
unset($_url_params);
$comments_map = PMA_getCommentsMap($db, $table);
/**
 * START REGULAR OUTPUT
 */
/**
 * Load JavaScript files
 */
$response = Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('sql.js');
$scripts->addFile('tbl_change.js');
$scripts->addFile('big_ints.js');