Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauricio@fauth.dev>2021-10-20 17:09:50 +0300
committerMaurício Meneghini Fauth <mauricio@fauth.dev>2022-01-10 18:19:44 +0300
commit0b575ff2e9fae33ff0d369cd95a04fc844a99168 (patch)
tree033cb87797dea78e8fe807afc1e16c9869d5ee91 /templates
parent6f0d19f394905645e09c0244f7823b3c4add3125 (diff)
Fix URL encryption for Util::linkOrButton method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'templates')
-rw-r--r--templates/table/relation/foreign_key_row.twig3
-rw-r--r--templates/table/search/input_box.twig3
-rw-r--r--templates/table/structure/display_partitions.twig2
-rw-r--r--templates/table/structure/display_structure.twig7
4 files changed, 6 insertions, 9 deletions
diff --git a/templates/table/relation/foreign_key_row.twig b/templates/table/relation/foreign_key_row.twig
index 4e73bf1188..50e39d129f 100644
--- a/templates/table/relation/foreign_key_row.twig
+++ b/templates/table/relation/foreign_key_row.twig
@@ -26,9 +26,8 @@
{% if one_key['constraint'] is defined %}
<input type="hidden" class="drop_foreign_key_msg" value="
{{- js_msg }}" />
- {% set drop_url = 'sql.php' ~ Url_getCommon(this_params) %}
{% set drop_str = Util_getIcon('b_drop', 'Drop'|trans) %}
- {{ Util_linkOrButton(drop_url, drop_str, {'class': 'drop_foreign_key_anchor ajax'}) }}
+ {{ Util_linkOrButton('sql.php', this_params, drop_str, {'class': 'drop_foreign_key_anchor ajax'}) }}
{% endif %}
</td>
<td>
diff --git a/templates/table/search/input_box.twig b/templates/table/search/input_box.twig
index 7bff02ed99..08cba65685 100644
--- a/templates/table/search/input_box.twig
+++ b/templates/table/search/input_box.twig
@@ -34,10 +34,9 @@
class="textfield"
id="field_{{ column_index }}" />
{% if in_fbs %}
- {% set edit_url = 'gis_data_editor.php' ~ Url_getCommon() %}
{% set edit_str = Util_getIcon('b_edit', 'Edit/Insert'|trans) %}
<span class="open_search_gis_editor">
- {{ Util_linkOrButton(edit_url, edit_str, [], '_blank') }}
+ {{ Util_linkOrButton('gis_data_editor.php', [], edit_str, [], '_blank') }}
</span>
{% endif %}
{% elseif column_type starts with 'enum'
diff --git a/templates/table/structure/display_partitions.twig b/templates/table/structure/display_partitions.twig
index 3bcbbe2f20..efda9338a9 100644
--- a/templates/table/structure/display_partitions.twig
+++ b/templates/table/structure/display_partitions.twig
@@ -134,7 +134,7 @@
{% if partitions is empty %}
<input type="submit" name="edit_partitioning" value="{% trans 'Partition table' %}" />
{% else %}
- {{ Util_linkOrButton(remove_url, 'Remove partitioning'|trans, {
+ {{ Util_linkOrButton('sql.php', remove_url_params, 'Remove partitioning'|trans, {
'class': 'button ajax',
'id': 'remove_partitioning'
}) }}
diff --git a/templates/table/structure/display_structure.twig b/templates/table/structure/display_structure.twig
index 82a8205cc3..7302f6b800 100644
--- a/templates/table/structure/display_structure.twig
+++ b/templates/table/structure/display_structure.twig
@@ -133,9 +133,9 @@
{# Work on the table #}
<div id="structure-action-links">
{% if tbl_is_view and not db_is_system_schema %}
- {% set edit_view_url = 'view_create.php' ~ edit_view_url %}
{{ Util_linkOrButton(
- edit_view_url,
+ 'view_create.php',
+ {'db': db, 'table': table},
Util_getIcon('b_edit', 'Edit view'|trans, true)
) }}
{% endif %}
@@ -194,7 +194,6 @@
{{ Util_getDivForSliderEffect('partitions', 'Partitions'|trans) }}
{% set remove_sql = 'ALTER TABLE ' ~ Util_backquote(table) ~ ' REMOVE PARTITIONING' %}
- {% set remove_url = 'sql.php' ~ url_query ~ '&sql_query=' ~ remove_sql|url_encode %}
{% include 'table/structure/display_partitions.twig' with {
'db': db,
@@ -209,7 +208,7 @@
'sub_partition_expression': has_sub_partitions ? first_sub_partition.getExpression(),
'action_icons': action_icons,
'range_or_list': range_or_list,
- 'remove_url': remove_url
+ 'remove_url_params': url_params|merge({'sql_query': remove_sql})
} only %}
{% else %}
{% include 'table/structure/display_partitions.twig' with {