File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121use PhpMyAdmin \Utils \ForeignKey ;
2222
2323use function __ ;
24+ use function array_column ;
2425use function array_key_exists ;
2526use function array_keys ;
26- use function array_values ;
2727use function mb_strtoupper ;
2828use function md5 ;
2929use function strtoupper ;
@@ -247,7 +247,7 @@ public function __invoke(ServerRequest $request): void
247247 'options_array ' => $ options ,
248248 'column_array ' => $ columnArray ,
249249 'column_hash_array ' => $ columnHashArray ,
250- 'save_row ' => array_values ($ columns ),
250+ 'save_row ' => array_column ($ columns, ' field ' ),
251251 'url_params ' => $ GLOBALS ['urlParams ' ],
252252 'databases ' => $ this ->dbi ->getDatabaseList (),
253253 'dbi ' => $ this ->dbi ,
Original file line number Diff line number Diff line change 8585 <tbody >
8686 {% set saved_row_cnt = save_row | length - 1 %}
8787 {% for i in 0 .. saved_row_cnt %}
88- {% set myfield = save_row [i ][ 'Field' ] %}
88+ {% set myfield = save_row [i ] %}
8989 {# Use an md5 as array index to avoid having special characters in the name attribute (see bug #1746964 ) #}
9090 {% set myfield_md5 = column_hash_array [myfield ] %}
9191
163163 <label class =" form-label" for =" displayFieldSelect" >{% trans ' Choose column to display:' %}</label >
164164 <select class =" form-select" name =" display_field" id =" displayFieldSelect" >
165165 <option value =" " >---</option >
166- {% for row in save_row %}
167- <option value =" {{ row [ 'Field' ] }}"
168- {%- if display_field is defined and row [ 'Field' ] == display_field %}
166+ {% for field in save_row %}
167+ <option value =" {{ field }}"
168+ {%- if display_field is defined and field == display_field %}
169169 selected =" selected"
170170 {%- endif %}>
171- {{ row [ 'Field' ] }}
171+ {{ field }}
172172 </option >
173173 {% endfor %}
174174 </select >
You can’t perform that action at this time.
0 commit comments