diff --git a/libraries/bookmark.lib.php b/libraries/bookmark.lib.php index 69753cd22..6e5b6485f 100644 --- a/libraries/bookmark.lib.php +++ b/libraries/bookmark.lib.php @@ -132,7 +132,7 @@ function PMA_addBookmarks($fields, $cfgBookmark, $all_users = false) global $controllink; $query = 'INSERT INTO ' . PMA_backquote($cfgBookmark['db']) . '.' . PMA_backquote($cfgBookmark['table']) - . ' (id, dbase, user, query, label) VALUES (NULL, \'' . PMA_sqlAddslashes($fields['dbase']) . '\', \'' . ($all_users ? '' : PMA_sqlAddslashes($fields['user'])) . '\', \'' . PMA_sqlAddslashes(urldecode($fields['query'])) . '\', \'' . PMA_sqlAddslashes($fields['label']) . '\')'; + . ' (id, dbase, user, query, label) VALUES (NULL, \'' . PMA_sqlAddslashes($fields['dbase']) . '\', \'' . ($all_users ? '' : PMA_sqlAddslashes($fields['user'])) . '\', \'' . PMA_sqlAddslashes($fields['query']) . '\', \'' . PMA_sqlAddslashes($fields['label']) . '\')'; $result = PMA_DBI_query($query, $controllink); return TRUE; diff --git a/libraries/mult_submits.inc.php b/libraries/mult_submits.inc.php index 93dcda891..5180fda05 100644 --- a/libraries/mult_submits.inc.php +++ b/libraries/mult_submits.inc.php @@ -146,7 +146,7 @@ if (!empty($submit_mult) && !empty($what)) { foreach ($selected AS $idx => $sval) { switch ($what) { case 'row_delete': - $full_query .= htmlspecialchars(urldecode($sval)) + $full_query .= htmlspecialchars($sval) . ';
'; break; case 'drop_db': @@ -157,7 +157,7 @@ if (!empty($submit_mult) && !empty($what)) { break; case 'drop_tbl': - $current = urldecode($sval); + $current = $sval; if (!empty($views) && in_array($current, $views)) { $full_query_views .= (empty($full_query_views) ? 'DROP VIEW ' : ', ') . PMA_backquote(htmlspecialchars($current)); @@ -169,7 +169,7 @@ if (!empty($submit_mult) && !empty($what)) { case 'empty_tbl': $full_query .= 'TRUNCATE '; - $full_query .= PMA_backquote(htmlspecialchars(urldecode($sval))) + $full_query .= PMA_backquote(htmlspecialchars($sval)) . ';
'; break; @@ -180,11 +180,11 @@ if (!empty($submit_mult) && !empty($what)) { . '
  DROP PRIMARY KEY,' . '
   ADD PRIMARY KEY(' . '
     ' - . PMA_backquote(htmlspecialchars(urldecode($sval))) + . PMA_backquote(htmlspecialchars($sval)) . ','; } else { $full_query .= '
     ' - . PMA_backquote(htmlspecialchars(urldecode($sval))) + . PMA_backquote(htmlspecialchars($sval)) . ','; } if ($i == $selected_cnt-1) { @@ -198,7 +198,7 @@ if (!empty($submit_mult) && !empty($what)) { . PMA_backquote(htmlspecialchars($table)); } $full_query .= '
  DROP ' - . PMA_backquote(htmlspecialchars(urldecode($sval))) + . PMA_backquote(htmlspecialchars($sval)) . ','; if ($i == $selected_cnt - 1) { $full_query = preg_replace('@,$@', ';
', $full_query); @@ -294,7 +294,7 @@ elseif ($mult_btn == $strYes) { for ($i = 0; $i < $selected_cnt; $i++) { switch ($query_type) { case 'row_delete': - $a_query = urldecode($selected[$i]); + $a_query = $selected[$i]; $run_parts = TRUE; break; @@ -309,7 +309,7 @@ elseif ($mult_btn == $strYes) { case 'drop_tbl': PMA_relationsCleanupTable($db, $selected[$i]); - $current = urldecode($selected[$i]); + $current = $selected[$i]; if (!empty($views) && in_array($current, $views)) { $sql_query_views .= (empty($sql_query_views) ? 'DROP VIEW ' : ', ') . PMA_backquote($current); @@ -322,62 +322,62 @@ elseif ($mult_btn == $strYes) { case 'check_tbl': $sql_query .= (empty($sql_query) ? 'CHECK TABLE ' : ', ') - . PMA_backquote(urldecode($selected[$i])); + . PMA_backquote($selected[$i]); $use_sql = TRUE; break; case 'optimize_tbl': $sql_query .= (empty($sql_query) ? 'OPTIMIZE TABLE ' : ', ') - . PMA_backquote(urldecode($selected[$i])); + . PMA_backquote($selected[$i]); $use_sql = TRUE; break; case 'analyze_tbl': $sql_query .= (empty($sql_query) ? 'ANALYZE TABLE ' : ', ') - . PMA_backquote(urldecode($selected[$i])); + . PMA_backquote($selected[$i]); $use_sql = TRUE; break; case 'repair_tbl': $sql_query .= (empty($sql_query) ? 'REPAIR TABLE ' : ', ') - . PMA_backquote(urldecode($selected[$i])); + . PMA_backquote($selected[$i]); $use_sql = TRUE; break; case 'empty_tbl': $a_query = 'TRUNCATE '; - $a_query .= PMA_backquote(htmlspecialchars(urldecode($selected[$i]))); + $a_query .= PMA_backquote(htmlspecialchars($selected[$i])); $run_parts = TRUE; break; case 'drop_fld': PMA_relationsCleanupColumn($db, $table, $selected[$i]); $sql_query .= (empty($sql_query) ? 'ALTER TABLE ' . PMA_backquote($table) : ',') - . ' DROP ' . PMA_backquote(urldecode($selected[$i])) + . ' DROP ' . PMA_backquote($selected[$i]) . (($i == $selected_cnt-1) ? ';' : ''); break; case 'primary_fld': $sql_query .= (empty($sql_query) ? 'ALTER TABLE ' . PMA_backquote($table) . (empty($primary) ? '' : ' DROP PRIMARY KEY,') . ' ADD PRIMARY KEY( ' : ', ') - . PMA_backquote(urldecode($selected[$i])) + . PMA_backquote($selected[$i]) . (($i == $selected_cnt-1) ? ');' : ''); break; case 'index_fld': $sql_query .= (empty($sql_query) ? 'ALTER TABLE ' . PMA_backquote($table) . ' ADD INDEX( ' : ', ') - . PMA_backquote(urldecode($selected[$i])) + . PMA_backquote($selected[$i]) . (($i == $selected_cnt-1) ? ');' : ''); break; case 'unique_fld': $sql_query .= (empty($sql_query) ? 'ALTER TABLE ' . PMA_backquote($table) . ' ADD UNIQUE( ' : ', ') - . PMA_backquote(urldecode($selected[$i])) + . PMA_backquote($selected[$i]) . (($i == $selected_cnt-1) ? ');' : ''); break; case 'fulltext_fld': $sql_query .= (empty($sql_query) ? 'ALTER TABLE ' . PMA_backquote($table) . ' ADD FULLTEXT( ' : ', ') - . PMA_backquote(urldecode($selected[$i])) + . PMA_backquote($selected[$i]) . (($i == $selected_cnt-1) ? ');' : ''); break; } // end switch diff --git a/libraries/relation_cleanup.lib.php b/libraries/relation_cleanup.lib.php index 47b7198b8..89a7584cd 100644 --- a/libraries/relation_cleanup.lib.php +++ b/libraries/relation_cleanup.lib.php @@ -18,7 +18,7 @@ function PMA_relationsCleanupColumn($db, $table, $column) { $remove_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['column_info']) . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'' . ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'' - . ' AND column_name = \'' . PMA_sqlAddslashes(urldecode($column)) . '\''; + . ' AND column_name = \'' . PMA_sqlAddslashes($column) . '\''; $rmv_rs = PMA_query_as_cu($remove_query); unset($remove_query); } @@ -27,7 +27,7 @@ function PMA_relationsCleanupColumn($db, $table, $column) { $remove_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_info']) . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'' . ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'' - . ' AND display_field = \'' . PMA_sqlAddslashes(urldecode($column)) . '\''; + . ' AND display_field = \'' . PMA_sqlAddslashes($column) . '\''; $rmv_rs = PMA_query_as_cu($remove_query); unset($remove_query); } @@ -36,14 +36,14 @@ function PMA_relationsCleanupColumn($db, $table, $column) { $remove_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['relation']) . ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\'' . ' AND master_table = \'' . PMA_sqlAddslashes($table) . '\'' - . ' AND master_field = \'' . PMA_sqlAddslashes(urldecode($column)) . '\''; + . ' AND master_field = \'' . PMA_sqlAddslashes($column) . '\''; $rmv_rs = PMA_query_as_cu($remove_query); unset($remove_query); $remove_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['relation']) . ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\'' . ' AND foreign_table = \'' . PMA_sqlAddslashes($table) . '\'' - . ' AND foreign_field = \'' . PMA_sqlAddslashes(urldecode($column)) . '\''; + . ' AND foreign_field = \'' . PMA_sqlAddslashes($column) . '\''; $rmv_rs = PMA_query_as_cu($remove_query); unset($remove_query); } diff --git a/tbl_printview.php b/tbl_printview.php index 4ebda1f65..02ff2b82e 100644 --- a/tbl_printview.php +++ b/tbl_printview.php @@ -69,7 +69,7 @@ if ($multi_tables) { $tbl_list = ''; foreach ($the_tables as $key => $table) { $tbl_list .= (empty($tbl_list) ? '' : ', ') - . PMA_backquote(urldecode($table)); + . PMA_backquote($table); } echo ''. $strShowTables . ': ' . $tbl_list . '' . "\n"; echo '
' . "\n"; @@ -79,7 +79,6 @@ $tables_cnt = count($the_tables); $counter = 0; foreach ($the_tables as $key => $table) { - $table = urldecode($table); if ($counter + 1 >= $tables_cnt) { $breakstyle = ''; } else { diff --git a/transformation_wrapper.php b/transformation_wrapper.php index 1871baf7c..c965f1482 100644 --- a/transformation_wrapper.php +++ b/transformation_wrapper.php @@ -46,7 +46,7 @@ $default_ct = 'application/octet-stream'; if ($cfgRelation['commwork'] && $cfgRelation['mimework']) { $mime_map = PMA_getMime($db, $table); - $mime_options = PMA_transformation_getOptions((isset($mime_map[urldecode($transform_key)]['transformation_options']) ? $mime_map[urldecode($transform_key)]['transformation_options'] : '')); + $mime_options = PMA_transformation_getOptions((isset($mime_map[$transform_key]['transformation_options']) ? $mime_map[$transform_key]['transformation_options'] : '')); foreach ($mime_options AS $key => $option) { if (substr($option, 0, 10) == '; charset=') { @@ -62,23 +62,23 @@ if ($cfgRelation['commwork'] && $cfgRelation['mimework']) { require_once './libraries/header_http.inc.php'; // [MIME] if (isset($ct) && !empty($ct)) { - $content_type = 'Content-Type: ' . urldecode($ct); + $content_type = 'Content-Type: ' . $ct; } else { - $content_type = 'Content-Type: ' . (isset($mime_map[urldecode($transform_key)]['mimetype']) ? str_replace('_', '/', $mime_map[urldecode($transform_key)]['mimetype']) : $default_ct) . (isset($mime_options['charset']) ? $mime_options['charset'] : ''); + $content_type = 'Content-Type: ' . (isset($mime_map[$transform_key]['mimetype']) ? str_replace('_', '/', $mime_map[$transform_key]['mimetype']) : $default_ct) . (isset($mime_options['charset']) ? $mime_options['charset'] : ''); } header($content_type); if (isset($cn) && !empty($cn)) { - header('Content-Disposition: attachment; filename=' . urldecode($cn)); + header('Content-Disposition: attachment; filename=' . $cn); } if (!isset($resize)) { - echo $row[urldecode($transform_key)]; + echo $row[$transform_key]; } else { // if image_*__inline.inc.php finds that we can resize, // it sets $resize to jpeg or png - $srcImage = imagecreatefromstring($row[urldecode($transform_key)]); + $srcImage = imagecreatefromstring($row[$transform_key]); $srcWidth = ImageSX($srcImage); $srcHeight = ImageSY($srcImage);