Merge #16579 - Fix #16464 - Made the relation view default to the current database when creating relations

Pull-request: #16579
Fixes: #16464
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2021-01-21 19:59:12 +01:00
commit e868254447
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
3 changed files with 5 additions and 2 deletions

View File

@ -74,6 +74,7 @@ phpMyAdmin - ChangeLog
- issue #16485 Fix visual query builder missing "Build Query" button
- issue #16565 Added 'IF EXISTS' to 'DROP EVENT' when updating events to avoid replication issues
- issue Removed metro fonts that where Apache-2.0 files that are incompatible with GPL-2.0
- issue #16464 Made the relation view default to the current database when creating relations
5.0.5 (not yet released)
- issue #14494 Fix uncaught TypeError when editing partitioning

View File

@ -96,7 +96,8 @@
'name': 'destination_foreign_db[' ~ i ~ ']',
'title': 'Database'|trans,
'values': databases,
'foreign': foreign_db
'foreign': foreign_db,
'db': db
} only %}
</span>
</td>

View File

@ -3,7 +3,8 @@
{% set seen_key = false %}
{% for value in values %}
<option value="{{ value }}"
{%- if foreign is not same as(false) and value == foreign %}
{%- if (foreign is not same as(false) and value == foreign) or
(not foreign and db is defined and db is same as (value)) %}
selected="selected"
{%- set seen_key = true -%}
{%- endif %}>