Permalink
Browse files

Fix bug reported on pull request #14305

Signed-off-by: Leonardo Strozzi <laps15@inf.ufpr.br>
  • Loading branch information...
laps15 committed May 30, 2018
1 parent 3df5e80 commit c021125052cfd5b2d1c54177bc64ec974d13fe5f
@@ -183,13 +183,14 @@ public function indexAction()
$columns = $this->dbi->getColumns($this->db, $this->table);
$column_array = array();
$column_hash_array = array();
$column_array[''] = '';
foreach ($columns as $column) {
if (strtoupper($this->tbl_storage_engine) == 'INNODB'
|| ! empty($column['Key'])
) {
$column_array[$column['Field']] = $column['Field'];
$column_array[$column['Field'] . '_hash'] = md5($column['Field']);
$column_hash_array[$column['Field']] = md5($column['Field']);
}
}
if ($GLOBALS['cfg']['NaturalOrder']) {
@@ -208,6 +209,7 @@ public function indexAction()
? $this->existrel_foreign['foreign_keys_data'] : array(),
'options_array' => $this->options_array,
'column_array' => $column_array,
'column_hash_array' => $column_hash_array,
'save_row' => array_values($columns),
'url_params' => $GLOBALS['url_params'],
'databases' => $GLOBALS['dblist']->databases,
@@ -117,7 +117,7 @@
{% set myfield = save_row[i]['Field'] %}
{# Use an md5 as array index to avoid having special characters
in the name attribute (see bug #1746964 ) #}
{% set myfield_md5 = column_array[myfield ~ '_hash'] %}
{% set myfield_md5 = column_hash_array[myfield] %}
{% set foreign_table = false %}
{% set foreign_column = false %}

0 comments on commit c021125

Please sign in to comment.