if (isset($_REQUEST['after_insert']) && in_array($_REQUEST['after_insert'], $after_insert_actions)) { $url_params['after_insert'] = $_REQUEST['after_insert']; if (isset($_REQUEST['where_clause'])) { foreach ($_REQUEST['where_clause'] as $one_where_clause) { if ($_REQUEST['after_insert'] == 'same_insert') { $url_params['where_clause'][] = $one_where_clause; } elseif ($_REQUEST['after_insert'] == 'edit_next') { PMA_setSessionForEditNext($one_where_clause); } } } } //get $goto_include for different cases $goto_include = PMA_getGotoInclude($goto_include); // Defines the url to return in case of failure of the query $err_url = PMA_getErrorUrl($url_params); /** * Prepares the update/insert of a row */ list($loop_array, $using_key, $is_insert, $is_insertignore) = PMA_getParamsForUpdateOrInsert(); $query = array(); $value_sets = array(); $func_no_param = array('CONNECTION_ID', 'CURRENT_USER', 'CURDATE', 'CURTIME', 'CURRENT_DATE', 'CURRENT_TIME', 'DATABASE', 'LAST_INSERT_ID', 'NOW', 'PI', 'RAND', 'SYSDATE', 'UNIX_TIMESTAMP', 'USER', 'UTC_DATE', 'UTC_TIME', 'UTC_TIMESTAMP', 'UUID', 'UUID_SHORT', 'VERSION'); $func_optional_param = array('RAND', 'UNIX_TIMESTAMP'); $gis_from_text_functions = array('GeomFromText', 'GeomCollFromText', 'LineFromText', 'MLineFromText', 'PointFromText', 'MPointFromText', 'PolyFromText', 'MPolyFromText'); $gis_from_wkb_functions = array('GeomFromWKB', 'GeomCollFromWKB', 'LineFromWKB', 'MLineFromWKB', 'PointFromWKB', 'MPointFromWKB', 'PolyFromWKB', 'MPolyFromWKB'); // to create an object of PMA_File class require_once './libraries/File.class.php'; //if some posted fields need to be transformed. $mime_map = PMA_getMIME($GLOBALS['db'], $GLOBALS['table']); if ($mime_map === false) {
/** * Test for PMA_getErrorUrl * * @return void */ public function testGetErrorUrl() { $GLOBALS['cfg']['ServerDefault'] = 1; $this->assertEquals('tbl_change.php?lang=en&token=token', PMA_getErrorUrl(array())); $_REQUEST['err_url'] = 'localhost'; $this->assertEquals('localhost', PMA_getErrorUrl(array())); }