patch #2496403 [display] Multi-row change with "]"
This commit is contained in:
@@ -7,6 +7,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
|||||||
|
|
||||||
3.1.3.0 (not yet released)
|
3.1.3.0 (not yet released)
|
||||||
+ [lang] Turkish update, thanks to Burak Yavuz
|
+ [lang] Turkish update, thanks to Burak Yavuz
|
||||||
|
- patch #2496403 [display] Multi-row change with "]",
|
||||||
|
thanks to Virsacer - virsacer
|
||||||
|
|
||||||
3.1.2.0 (not yet released)
|
3.1.2.0 (not yet released)
|
||||||
- bug #1253252 [display] Can't NULL a column with relation defined
|
- bug #1253252 [display] Can't NULL a column with relation defined
|
||||||
|
@@ -1047,7 +1047,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
|||||||
* avoid to display the delete and edit links
|
* avoid to display the delete and edit links
|
||||||
*/
|
*/
|
||||||
$unique_condition = PMA_getUniqueCondition($dt_result, $fields_cnt, $fields_meta, $row);
|
$unique_condition = PMA_getUniqueCondition($dt_result, $fields_cnt, $fields_meta, $row);
|
||||||
$unique_condition_html = htmlspecialchars($unique_condition);
|
$unique_condition_html = htmlspecialchars(str_replace(']', ']', $unique_condition));
|
||||||
|
|
||||||
// 1.2 Defines the URLs for the modify/delete link(s)
|
// 1.2 Defines the URLs for the modify/delete link(s)
|
||||||
|
|
||||||
|
@@ -165,7 +165,7 @@ if (isset($primary_key)) {
|
|||||||
$result = array();
|
$result = array();
|
||||||
$found_unique_key = false;
|
$found_unique_key = false;
|
||||||
foreach ($primary_key_array as $key_id => $primary_key) {
|
foreach ($primary_key_array as $key_id => $primary_key) {
|
||||||
$local_query = 'SELECT * FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table) . ' WHERE ' . $primary_key . ';';
|
$local_query = 'SELECT * FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table) . ' WHERE ' . str_replace(']', ']', $primary_key) . ';';
|
||||||
$result[$key_id] = PMA_DBI_query($local_query, null, PMA_DBI_QUERY_STORE);
|
$result[$key_id] = PMA_DBI_query($local_query, null, PMA_DBI_QUERY_STORE);
|
||||||
$rows[$key_id] = PMA_DBI_fetch_assoc($result[$key_id]);
|
$rows[$key_id] = PMA_DBI_fetch_assoc($result[$key_id]);
|
||||||
$primary_keys[$key_id] = str_replace('\\', '\\\\', $primary_key);
|
$primary_keys[$key_id] = str_replace('\\', '\\\\', $primary_key);
|
||||||
|
@@ -284,7 +284,7 @@ foreach ($loop_array as $rowcount => $primary_key) {
|
|||||||
} else {
|
} else {
|
||||||
// build update query
|
// build update query
|
||||||
$query[] = 'UPDATE ' . PMA_backquote($GLOBALS['db']) . '.' . PMA_backquote($GLOBALS['table'])
|
$query[] = 'UPDATE ' . PMA_backquote($GLOBALS['db']) . '.' . PMA_backquote($GLOBALS['table'])
|
||||||
. ' SET ' . implode(', ', $query_values) . ' WHERE ' . $primary_key . ' LIMIT 1';
|
. ' SET ' . implode(', ', $query_values) . ' WHERE ' . str_replace(']', ']', $primary_key) . ' LIMIT 1';
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user