Skip to content
Permalink
Browse files Browse the repository at this point in the history
Avoid not neeedded urlencode/urldecode steps in multi submits
Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed May 23, 2016
1 parent 6d4bd77 commit b061096
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libraries/DisplayResults.php
Expand Up @@ -2788,7 +2788,7 @@ private function _getTableBody(
$whereClauseMap[$row_no][$this->__get('table')] = $where_clause;
$this->__set('whereClauseMap', $whereClauseMap);

$where_clause_html = urlencode($where_clause);
$where_clause_html = htmlspecialchars($where_clause);

// 1.2.1 Modify link(s) - update row case
if ($displayParts['edit_lnk'] == self::UPDATE_ROW) {
Expand Down
4 changes: 2 additions & 2 deletions libraries/mult_submits.lib.php
Expand Up @@ -44,7 +44,7 @@ function PMA_getUrlParams(
if ($what == 'row_delete') {
$_url_params['selected'][] = 'DELETE FROM '
. PMA\libraries\Util::backquote($table)
. ' WHERE ' . urldecode($sval) . ' LIMIT 1;';
. ' WHERE ' . $sval . ' LIMIT 1;';
} else {
$_url_params['selected'][] = $sval;
}
Expand Down Expand Up @@ -495,7 +495,7 @@ function PMA_getQueryFromSelected($what, $table, $selected, $views)
// (it's not binlog friendly).
// We don't need the clause because the calling panel permits
// this feature only when there is a unique index.
. ' WHERE ' . urldecode(htmlspecialchars($sval))
. ' WHERE ' . htmlspecialchars($sval)
. ';<br />';
break;
case 'drop_db':
Expand Down
4 changes: 2 additions & 2 deletions tbl_row_action.php
Expand Up @@ -86,7 +86,7 @@
&& is_array($_REQUEST['rows_to_delete'])
) {
foreach ($_REQUEST['rows_to_delete'] as $i => $i_where_clause) {
$where_clause[] = urldecode($i_where_clause);
$where_clause[] = $i_where_clause;
}
}
$active_page = 'tbl_change.php';
Expand All @@ -106,7 +106,7 @@
&& is_array($_REQUEST['rows_to_delete'])
) {
foreach ($_REQUEST['rows_to_delete'] as $i => $i_where_clause) {
$where_clause[] = urldecode($i_where_clause);
$where_clause[] = $i_where_clause;
}
}
$active_page = 'tbl_export.php';
Expand Down

0 comments on commit b061096

Please sign in to comment.