Skip to content

Commit bc553ff

Browse files
committed
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2 parents 23c1b01 + 746a34c commit bc553ff

9 files changed

Lines changed: 862 additions & 95 deletions

File tree

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ phpMyAdmin - ChangeLog
4949
- issue Fix list of users of an user group not showing up
5050
- issue Fix duplicate query params in the SQL message card
5151
- issue #18314 Fix dragged row in index form
52+
- issue #17392 Fix the actions not being hidden in the Triggers, Routines, Events pages
5253

5354
5.2.1 (2023-02-07)
5455
- issue #17522 Fix case where the routes cache file is invalid

psalm-baseline.xml

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,9 +1060,6 @@
10601060
<code><![CDATA[$GLOBALS['errorUrl']]]></code>
10611061
<code><![CDATA[$GLOBALS['errors']]]></code>
10621062
</MixedAssignment>
1063-
<PossiblyUnusedMethod>
1064-
<code>__construct</code>
1065-
</PossiblyUnusedMethod>
10661063
<UnusedParam>
10671064
<code>$request</code>
10681065
</UnusedParam>
@@ -1216,9 +1213,6 @@
12161213
<PossiblyInvalidArgument>
12171214
<code>$type</code>
12181215
</PossiblyInvalidArgument>
1219-
<PossiblyUnusedMethod>
1220-
<code>__construct</code>
1221-
</PossiblyUnusedMethod>
12221216
<PossiblyUnusedParam>
12231217
<code>$request</code>
12241218
</PossiblyUnusedParam>
@@ -7073,30 +7067,6 @@
70737067
<code><![CDATA[$_REQUEST['unlim_num_rows']]]></code>
70747068
</RiskyCast>
70757069
</file>
7076-
<file src="libraries/classes/Http/Factory/ServerRequestFactory.php">
7077-
<MixedArgument>
7078-
<code>$serverRequest</code>
7079-
</MixedArgument>
7080-
<MixedAssignment>
7081-
<code>$factory</code>
7082-
<code>$factory</code>
7083-
<code>$serverRequest</code>
7084-
</MixedAssignment>
7085-
<MixedInferredReturnType>
7086-
<code>ServerRequestFactoryInterface</code>
7087-
<code>UriFactoryInterface</code>
7088-
</MixedInferredReturnType>
7089-
<MixedReturnStatement>
7090-
<code>$factory</code>
7091-
<code>$factory</code>
7092-
<code>$factory</code>
7093-
<code>$factory</code>
7094-
</MixedReturnStatement>
7095-
<UndefinedClass>
7096-
<code>SlimServerRequestFactory</code>
7097-
<code>SlimUriFactory</code>
7098-
</UndefinedClass>
7099-
</file>
71007070
<file src="libraries/classes/Image/ImageWrapper.php">
71017071
<PossiblyUnusedReturnValue>
71027072
<code>bool</code>
@@ -14116,7 +14086,7 @@
1411614086
<UndefinedClass>
1411714087
<code>GuzzleHttpFactory</code>
1411814088
<code>LaminasServerRequestFactory</code>
14119-
<code>SlimServerRequestFactory</code>
14089+
<code>NyholmPsr17Factory</code>
1412014090
</UndefinedClass>
1412114091
</file>
1412214092
<file src="test/classes/ImportTest.php">

templates/database/events/index.twig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
</h2>
66

77
<div class="d-flex flex-wrap my-3">
8+
{%- if items is not empty %}
89
<div>
910
<div class="input-group">
1011
<div class="input-group-text">
@@ -21,8 +22,9 @@
2122
</button>
2223
</div>
2324
</div>
25+
{%- endif %}
2426

25-
<div class="ms-auto">
27+
<div{{ items is not empty ? ' class="ms-auto"' }}>
2628
<a class="ajax add_anchor btn btn-primary{{ not has_privilege ? ' disabled' }}" href="{{ url('/database/events', {'db': db, 'add_item': true}) }}" role="button"{{ not has_privilege ? ' tabindex="-1" aria-disabled="true"' }}>
2729
{{ get_icon('b_event_add', 'Create new event'|trans) }}
2830
</a>
@@ -33,7 +35,7 @@
3335
{{ get_hidden_inputs(db) }}
3436

3537
<div id="nothing2display"{{ items is not empty ? ' class="hide"' }}>
36-
{% trans 'There are no events to display.' %}
38+
{{ 'There are no events to display.'|trans|notice }}
3739
</div>
3840

3941
<table id="eventsTable" class="table table-striped table-hover{{ items is empty ? ' hide' }} w-auto data">

templates/database/routines/index.twig

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
</h2>
66

77
<div class="d-flex flex-wrap my-3">
8+
{%- if items is not empty %}
89
<div>
910
<div class="input-group">
1011
<div class="input-group-text">
@@ -28,7 +29,9 @@
2829
<input class="form-control" name="filterText" type="text" id="filterText" value="" placeholder="{% trans 'Search' %}" aria-label="{% trans 'Search' %}">
2930
</div>
3031
</div>
31-
<div class="ms-2">
32+
{%- endif %}
33+
34+
<div{{ items is not empty ? ' class="ms-2"' }}>
3235
<a class="ajax add_anchor btn btn-primary{{ not has_privilege ? ' disabled' }}" href="{{ url('/database/routines', {'db': db, 'table': table, 'add_item': true}) }}" role="button"{{ not has_privilege ? ' tabindex="-1" aria-disabled="true"' }}>
3336
{{ get_icon('b_routine_add', 'Create new routine'|trans) }}
3437
</a>
@@ -39,7 +42,7 @@
3942
{{ get_hidden_inputs(db, table) }}
4043

4144
<div id="nothing2display"{{ items is not empty ? ' class="hide"' }}>
42-
{% trans 'There are no routines to display.' %}
45+
{{ 'There are no routines to display.'|trans|notice }}
4346
</div>
4447

4548
<table id="routinesTable" class="table table-striped table-hover{{ items is empty ? ' hide' }} data w-auto">
@@ -55,7 +58,7 @@
5558
<tbody>
5659
<tr class="hide">{% for i in 0..7 %}<td></td>{% endfor %}</tr>
5760

58-
{{ rows|raw }}
61+
{{- rows|raw }}
5962
</tbody>
6063
</table>
6164
</form>

templates/database/routines/row.twig

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@
66
<span class="drop_sql hide">{{ sql_drop }}</span>
77
<strong>{{ routine.name }}</strong>
88
</td>
9-
<td>
10-
{{ routine.type }}
11-
</td>
12-
<td dir="ltr">
13-
{{ routine.returns }}
14-
</td>
9+
<td>{{ routine.type }}</td>
10+
<td dir="ltr">{{ routine.returns }}</td>
1511
<td>
1612
{% if has_edit_privilege %}
1713
<a class="ajax edit_anchor" href="{{ url('/database/routines', {

templates/triggers/list.twig

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
</h2>
66

77
<div class="d-flex flex-wrap my-3">
8+
{%- if triggers is not empty %}
89
<div>
910
<div class="input-group">
1011
<div class="input-group-text">
@@ -21,8 +22,9 @@
2122
</button>
2223
</div>
2324
</div>
25+
{%- endif %}
2426

25-
<div class="ms-auto">
27+
<div{{ triggers is not empty ? ' class="ms-auto"' }}>
2628
<a class="ajax add_anchor btn btn-primary{{ not has_privilege ? ' disabled' }}" href="{{ url('/triggers', {'db': db, 'table': table, 'add_item': true}) }}" role="button"{{ not has_privilege ? ' tabindex="-1" aria-disabled="true"' }}>
2729
{{ get_icon('b_trigger_add', 'Create new trigger'|trans) }}
2830
</a>
@@ -33,7 +35,7 @@
3335
{{ get_hidden_inputs(db, table) }}
3436

3537
<div id="nothing2display"{{ triggers is not empty ? ' class="hide"' }}>
36-
{% trans 'There are no triggers to display.' %}
38+
{{ 'There are no triggers to display.'|trans|notice }}
3739
</div>
3840

3941
<table id="triggersTable" class="table table-striped table-hover{{ triggers is empty ? ' hide' }} w-auto data">
@@ -52,8 +54,8 @@
5254
<tbody>
5355
<tr class="hide">{% for i in 0..(table is empty ? 7 : 6) %}<td></td>{% endfor %}</tr>
5456

55-
{% for trigger in triggers %}
56-
{{ include(
57+
{%- for trigger in triggers %}
58+
{{- include(
5759
'triggers/row.twig',
5860
{
5961
'db': db,
@@ -65,7 +67,7 @@
6567
},
6668
with_context = false
6769
) }}
68-
{% endfor %}
70+
{%- endfor %}
6971
</tbody>
7072
</table>
7173
</form>

0 commit comments

Comments
 (0)