Refactor Url Twig extensions
Signed-off-by: Leonardo Strozzi <laps15@inf.ufpr.br>
This commit is contained in:
parent
ed8aadd71b
commit
b65ede42ee
@ -11,6 +11,7 @@ namespace PhpMyAdmin\Twig;
|
||||
|
||||
use Twig\Extension\AbstractExtension;
|
||||
use Twig\TwigFunction;
|
||||
use Twig\TwigFilter;
|
||||
|
||||
/**
|
||||
* Class UrlExtension
|
||||
@ -28,27 +29,38 @@ class UrlExtension extends AbstractExtension
|
||||
{
|
||||
return [
|
||||
new TwigFunction(
|
||||
'Url_getHiddenInputs',
|
||||
'get_hidden_inputs',
|
||||
'PhpMyAdmin\Url::getHiddenInputs',
|
||||
['is_safe' => ['html']]
|
||||
),
|
||||
new TwigFunction(
|
||||
'Url_getHiddenFields',
|
||||
'get_hidden_fields',
|
||||
'PhpMyAdmin\Url::getHiddenFields',
|
||||
['is_safe' => ['html']]
|
||||
),
|
||||
new TwigFunction(
|
||||
'Url_getCommon',
|
||||
'get_common',
|
||||
'PhpMyAdmin\Url::getCommon',
|
||||
['is_safe' => ['html']]
|
||||
),
|
||||
new TwigFunction(
|
||||
'Url_getCommonRaw',
|
||||
'get_common_raw',
|
||||
'PhpMyAdmin\Url::getCommonRaw',
|
||||
['is_safe' => ['html']]
|
||||
),
|
||||
new TwigFunction(
|
||||
'Url_link',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of filters to add to the existing list.
|
||||
*
|
||||
* @return TwigFilter[]
|
||||
*/
|
||||
public function getFilters()
|
||||
{
|
||||
return [
|
||||
new TwigFilter(
|
||||
'link',
|
||||
'PhpMyAdmin\Core::linkURL'
|
||||
),
|
||||
];
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<form method="post" action="{{ action }}" class="
|
||||
{{- action == 'tbl_create.php' ? 'create_table' : 'append_fields' -}}
|
||||
_form ajax lock-page">
|
||||
{{ Url_getHiddenInputs(form_params) }}
|
||||
{{ get_hidden_inputs(form_params) }}
|
||||
{# happens when an index has been set on a column #}
|
||||
{# and a column is added to the table creation dialog #}
|
||||
{# This contains a JSON-encoded string #}
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
</th>
|
||||
<th>
|
||||
<a href="transformation_overview.php
|
||||
{{- Url_getCommon() }}#transformation" title="
|
||||
{{- get_common() }}#transformation" title="
|
||||
{%- trans 'List of available transformations and their options' -%}
|
||||
" target="_blank">
|
||||
{% trans 'Browser display transformation' %}
|
||||
@ -83,7 +83,7 @@
|
||||
{{ Util_showHint('Please enter the values for transformation options using this format: \'a\', 100, b,\'c\'…<br />If you ever need to put a backslash ("\\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').'|trans) }}
|
||||
</th>
|
||||
<th>
|
||||
<a href="transformation_overview.php{{ Url_getCommon() }}#input_transformation"
|
||||
<a href="transformation_overview.php{{ get_common() }}#input_transformation"
|
||||
title="{% trans 'List of available transformations and their options' %}"
|
||||
target="_blank">
|
||||
{% trans 'Input transformation' %}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div id="div_create_version">
|
||||
<form method="post" action="{{ url_query|raw }}">
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
{% for selected_table in selected %}
|
||||
<input type="hidden" name="selected[]" value="{{ selected_table }}">
|
||||
{% endfor %}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
</a>
|
||||
<form id="add_new" class="new_central_col{{ (total_rows != 0) ? ' hide' : ''}}"
|
||||
method="post" action="db_central_columns.php">
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input type="hidden" name="add_new_column" value="add_new_column">
|
||||
<div class="responsivetable">
|
||||
<table>
|
||||
@ -147,7 +147,7 @@
|
||||
{% if pos - max_rows >= 0 %}
|
||||
<td>
|
||||
<form action="db_central_columns.php" method="post">
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input type="hidden" name="pos" value="{{ pos - max_rows }}" />
|
||||
<input type="hidden" name="total_rows" value="{{ total_rows }}"/>
|
||||
<input type="submit" name="navig" class="ajax" value="<" />
|
||||
@ -157,7 +157,7 @@
|
||||
{% if tn_nbTotalPage > 1 %}
|
||||
<td>
|
||||
<form action="db_central_columns.php" method="post">
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input type="hidden" name="total_rows" value="{{ total_rows }}"/>
|
||||
{{ tn_page_selector | raw }}
|
||||
</form>
|
||||
@ -166,7 +166,7 @@
|
||||
{% if pos + max_rows < total_rows %}
|
||||
<td>
|
||||
<form action="db_central_columns.php" method="post">
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input type="hidden" name="pos" value="{{ pos + max_rows }}"/>
|
||||
<input type="hidden" name="total_rows" value="{{ total_rows }}"/>
|
||||
<input type="submit" name="navig" class="ajax" value=">" />
|
||||
@ -191,7 +191,7 @@
|
||||
<td class="central_columns_navigation">
|
||||
{{ Util_getIcon('centralColumns_add', 'Add column' | trans)|raw }}
|
||||
<form id="add_column" action="db_central_columns.php" method="post">
|
||||
{{ Url_getHiddenInputs(db) | raw }}
|
||||
{{ get_hidden_inputs(db) | raw }}
|
||||
<input type="hidden" name="add_column" value="add">
|
||||
<input type="hidden" name="pos" value="{{ pos }}" />
|
||||
<input type="hidden" name="total_rows" value="{{ total_rows }}"/>
|
||||
@ -215,7 +215,7 @@
|
||||
</table>
|
||||
{% if total_rows > 0 %}
|
||||
<form method="post" id="del_form" action="db_central_columns.php">
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input id="del_col_name" type="hidden" name="col_name" value="">
|
||||
<input type="hidden" name="pos" value="{{ pos }}">
|
||||
<input type="hidden" name="delete_save" value="delete">
|
||||
@ -269,7 +269,7 @@
|
||||
{% for row in rows_list %}
|
||||
{# getHtmlForTableRow #}
|
||||
<tr data-rownum="{{ row_num }}" id="{{ 'f_' ~ row_num }}">
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<input type="hidden" name="edit_save" value="save">
|
||||
<td class="nowrap">
|
||||
<input type="checkbox" class="checkall" name="selected_fld[]"
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
{%- endif %}
|
||||
{% trans "Create table" %}
|
||||
</legend>
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<div class="formelement">
|
||||
{% trans "Name" %}:
|
||||
<input type="text" name="table" maxlength="64" size="30" required="required" />
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<form action="db_designer.php" method="post" name="edit_delete_pages" id="edit_delete_pages" class="ajax">
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<fieldset id="page_edit_delete_options">
|
||||
<input type="hidden" name="operation" value="{{ operation }}" />
|
||||
<label for="selected_page">
|
||||
|
||||
@ -1130,7 +1130,7 @@ var designer_config = {{ designer_config | raw }};
|
||||
<form method="post" action="db_qbe.php" id="vqb_form">
|
||||
<textarea cols="80" name="sql_query" id="textSqlquery" rows="15"></textarea>
|
||||
<input type="hidden" name="submit_sql" value="true">
|
||||
{{ Url_getHiddenInputs(get_db) }}
|
||||
{{ get_hidden_inputs(get_db) }}
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<form action="db_designer.php" method="post" name="save_as_pages" id="save_as_pages" class="ajax">
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<fieldset id="page_save_as_options">
|
||||
<table>
|
||||
<tbody>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<form method="post" action="schema_export.php" class="disableAjax" id="id_export_pages">
|
||||
<fieldset>
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<label>{% trans 'Select Export Relational Type' %}</label>
|
||||
{{ get_choice('Schema', 'export_type', export_list, 'format') }}
|
||||
<input type="hidden" name="page_number" value="{{ page }}" />
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<a id="db_search"></a>
|
||||
<form id="db_search_form" method="post" action="db_search.php" name="db_search" class="ajax lock-page">
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<fieldset>
|
||||
<legend>{% trans 'Search in database' %}</legend>
|
||||
<p>
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
<td>
|
||||
<a name="browse_search"
|
||||
class="ajax browse_results"
|
||||
href="sql.php{{ Url_getCommon(url_params) }}"
|
||||
href="sql.php{{ get_common(url_params) }}"
|
||||
data-browse-sql="{{ row.new_search_sqls.select_columns }}"
|
||||
data-table-name="{{ row.table }}">
|
||||
{% trans 'Browse' %}
|
||||
@ -37,7 +37,7 @@
|
||||
<td>
|
||||
<a name="delete_search"
|
||||
class="ajax delete_results"
|
||||
href="sql.php{{ Url_getCommon(url_params) }}"
|
||||
href="sql.php{{ get_common(url_params) }}"
|
||||
data-delete-sql="{{ row.new_search_sqls.delete }}"
|
||||
data-table-name="{{ row.table }}">
|
||||
{% trans 'Delete' %}
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
{% if approx_rows %}
|
||||
{% set cell_text -%}
|
||||
<a href="db_structure.php
|
||||
{{- Url_getCommon(row_sum_url) }}" class="ajax row_count_sum">~
|
||||
{{- get_common(row_sum_url) }}" class="ajax row_count_sum">~
|
||||
{{- row_count_sum -}}
|
||||
</a>
|
||||
{%- endset %}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<a id="{{ table_name_hash }}_favorite_anchor"
|
||||
class="ajax favorite_table_anchor"
|
||||
href="db_structure.php{{ Url_getCommon(fav_params) }}"
|
||||
href="db_structure.php{{ get_common(fav_params) }}"
|
||||
title="{{ already_favorite ? 'Remove from Favorites'|trans : 'Add to Favorites'|trans }}"
|
||||
data-favtargets="{{ db_table_name_hash }}" >
|
||||
{{ already_favorite ? titles['Favorite']|raw : titles['NoFavorite']|raw }}
|
||||
|
||||
@ -88,7 +88,7 @@
|
||||
<td class="value tbl_rows"
|
||||
data-table="{{ current_table['TABLE_NAME'] }}">
|
||||
{% if approx_rows %}
|
||||
<a href="db_structure.php{{ Url_getCommon({
|
||||
<a href="db_structure.php{{ get_common({
|
||||
'ajax_request': true,
|
||||
'db': db,
|
||||
'table': current_table['TABLE_NAME'],
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<form method="post" action="db_structure.php" name="tablesForm" id="tablesForm">
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<div class="responsivetable">
|
||||
<table id="structureTable" class="data">
|
||||
<thead>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<a href="tbl_tracking.php{{ Url_getCommon({'table': table, 'db': db}) }}">
|
||||
<a href="tbl_tracking.php{{ get_common({'table': table, 'db': db}) }}">
|
||||
{% if is_tracked -%}
|
||||
{{ Util_getImage('eye', 'Tracking is active.'|trans) }}
|
||||
{%- else -%}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
<form method="post" action="db_tracking.php" name="trackedForm"
|
||||
id="trackedForm" class="ajax">
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<table id="versions" class="data">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -90,7 +90,7 @@
|
||||
<h3>{% trans 'Untracked tables' %}</h3>
|
||||
<form method="post" action="db_tracking.php" name="untrackedForm"
|
||||
id="untrackedForm" class="ajax">
|
||||
{{ Url_getHiddenInputs(db) }}
|
||||
{{ get_hidden_inputs(db) }}
|
||||
<table id="noversions" class="data">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
{% if export_type == 'server' %}
|
||||
{{ Url_getHiddenInputs('', '', 1) }}
|
||||
{{ get_hidden_inputs('', '', 1) }}
|
||||
{% elseif export_type == 'database' %}
|
||||
{{ Url_getHiddenInputs(db, '', 1) }}
|
||||
{{ get_hidden_inputs(db, '', 1) }}
|
||||
{% else %}
|
||||
{{ Url_getHiddenInputs(db, table, 1) }}
|
||||
{{ get_hidden_inputs(db, table, 1) }}
|
||||
{% endif %}
|
||||
|
||||
{# Just to keep this value for possible next display of this form after saving on server #}
|
||||
|
||||
@ -25,11 +25,11 @@
|
||||
|
||||
<input type="hidden" name="{{ id_key }}" value="{{ upload_id }}" />
|
||||
{% if import_type == 'server' %}
|
||||
{{ Url_getHiddenInputs('', '', 1) }}
|
||||
{{ get_hidden_inputs('', '', 1) }}
|
||||
{% elseif import_type == 'database' %}
|
||||
{{ Url_getHiddenInputs(db, '', 1) }}
|
||||
{{ get_hidden_inputs(db, '', 1) }}
|
||||
{% else %}
|
||||
{{ Url_getHiddenInputs(db, table, 1) }}
|
||||
{{ get_hidden_inputs(db, table, 1) }}
|
||||
{% endif %}
|
||||
<input type="hidden" name="import_type" value="{{ import_type }}" />
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ $( function() {
|
||||
|
||||
{% if handler != 'PhpMyAdmin\\Plugins\\Import\\Upload\\UploadNoplugin' %}
|
||||
{# Some variable for javascript #}
|
||||
{% set ajax_url = 'import_status.php?id=' ~ upload_id ~ '&' ~ Url_getCommonRaw({
|
||||
{% set ajax_url = 'import_status.php?id=' ~ upload_id ~ '&' ~ get_common_raw({
|
||||
'import_status': 1
|
||||
}) %}
|
||||
{% set promot_str = Sanitize_jsFormat(
|
||||
@ -21,7 +21,7 @@ $( function() {
|
||||
'The file is being processed, please be patient.'|trans,
|
||||
false
|
||||
) %}
|
||||
{% set import_url = Url_getCommonRaw({'import_status': 1}) %}
|
||||
{% set import_url = get_common_raw({'import_status': 1}) %}
|
||||
|
||||
{% set upload_html %}
|
||||
{% spaceless %}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
name="resultsForm"
|
||||
id="resultsForm_{{ unique_id }}"
|
||||
class="ajax">
|
||||
{{ Url_getHiddenInputs(db, table, 1) }}
|
||||
{{ get_hidden_inputs(db, table, 1) }}
|
||||
<input type="hidden" name="goto" value="sql.php" />
|
||||
{% endif %}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<form method="post" action="sql.php" name="displayOptionsForm" class="ajax print_ignore">
|
||||
{{ Url_getHiddenInputs({
|
||||
{{ get_hidden_inputs({
|
||||
'db': db,
|
||||
'table': table,
|
||||
'sql_query': sql_query,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<td>
|
||||
<form action="sql.php" method="post">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
<input type="hidden" name="sql_query" value="{{ html_sql_query|raw }}" />
|
||||
<input type="hidden" name="pos" value="0" />
|
||||
<input type="hidden" name="is_browse_distinct" value="{{ is_browse_distinct }}" />
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<td>
|
||||
<form action="sql.php" method="post"{{ onsubmit|raw }}>
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
<input type="hidden" name="sql_query" value="{{ sql_query|raw }}" />
|
||||
<input type="hidden" name="pos" value="{{ pos }}" />
|
||||
<input type="hidden" name="is_browse_distinct" value="{{ is_browse_distinct }}" />
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div class="container">
|
||||
<a href="{{ Url_link('https://www.phpmyadmin.net/') }}" target="_blank" rel="noopener noreferrer" class="logo">
|
||||
<a href="{{ 'https://www.phpmyadmin.net/'|link }}" target="_blank" rel="noopener noreferrer" class="logo">
|
||||
<img src="{{ theme.getImgPath('logo_right.png', 'pma_logo.png') }}" id="imLogo" name="imLogo" alt="phpMyAdmin" border="0" />
|
||||
</a>
|
||||
<h1>{{ 'Welcome to %s'|trans|format('<bdo dir="ltr" lang="en">phpMyAdmin</bdo>')|raw }}</h1>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<form method="POST" class="disableAjax">
|
||||
{{ Url_getHiddenInputs() }}
|
||||
{{ get_hidden_inputs() }}
|
||||
{{ form|raw }}
|
||||
{% if show_submit %}
|
||||
<input type="submit" value="{% trans "Verify" %}" />
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{{ Url_getHiddenInputs() }}
|
||||
{{ get_hidden_inputs() }}
|
||||
{% if image is defined %}
|
||||
<p>
|
||||
{% trans "Please scan following QR code into the two-factor authentication app on your device and enter authentication code it generates." %}
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
<p>{% trans "You have enabled two factor authentication." %}</p>
|
||||
<p>{{ backend_description }}</p>
|
||||
<form method="POST" action="prefs_twofactor.php">
|
||||
{{ Url_getHiddenInputs() }}
|
||||
{{ get_hidden_inputs() }}
|
||||
<input type="submit" name="2fa_remove" value="{% trans "Disable two-factor authentication" %}" />
|
||||
</form>
|
||||
</div>
|
||||
@ -43,7 +43,7 @@
|
||||
<h2>{% trans "Configure two-factor authentication" %}</h2>
|
||||
<div class="group-cnt">
|
||||
<form method="POST" action="prefs_twofactor.php">
|
||||
{{ Url_getHiddenInputs() }}
|
||||
{{ get_hidden_inputs() }}
|
||||
{% for backend in backends %}
|
||||
<label>
|
||||
<input type="radio" name="2fa_configure" {% if backend["id"] == "" %}checked="checked"{% endif %} value="{{ backend["id"] }}"/>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<h2>{% trans "Configure two-factor authentication" %}</h2>
|
||||
<div class="group-cnt">
|
||||
<form method="POST" action="prefs_twofactor.php">
|
||||
{{ Url_getHiddenInputs() }}
|
||||
{{ get_hidden_inputs() }}
|
||||
<input type="hidden" name="2fa_configure" value="{{ configure }}" />
|
||||
{{ form|raw }}
|
||||
<input type="submit" value="{% trans "Enable two-factor authentication" %}" />
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="group-cnt">
|
||||
<form method="POST" action="prefs_twofactor.php">
|
||||
{{ "By disabling two factor authentication you will be again able to login using password only."|trans|notice }}
|
||||
{{ Url_getHiddenInputs() }}
|
||||
{{ get_hidden_inputs() }}
|
||||
{{ form|raw }}
|
||||
<input type="hidden" name="2fa_remove" value="1" />
|
||||
<input type="submit" value="{% trans "Disable two-factor authentication" %}" />
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<form method="get" action="index.php" class="disableAjax">
|
||||
{{ Url_getHiddenInputs(_form_params) }}
|
||||
{{ get_hidden_inputs(_form_params) }}
|
||||
|
||||
{% if use_fieldset %}
|
||||
<fieldset>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<form action="server_binlog.php" method="get">
|
||||
{{ Url_getHiddenInputs(url_params) }}
|
||||
{{ get_hidden_inputs(url_params) }}
|
||||
<fieldset>
|
||||
<legend>
|
||||
{% trans 'Select binary log to view' %}
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
'content': content,
|
||||
'class': 'li_switch_dbstats',
|
||||
'url': {
|
||||
'href': 'server_databases.php' ~ Url_getCommon({'dbstats': '1'}),
|
||||
'href': 'server_databases.php' ~ get_common({'dbstats': '1'}),
|
||||
'title': 'Enable statistics'|trans
|
||||
}
|
||||
}] %}
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
{{ Util_showMySQLDocu('CREATE_DATABASE') }}
|
||||
</strong></p>
|
||||
|
||||
{{ Url_getHiddenInputs('', '', 5) }}
|
||||
{{ get_hidden_inputs('', '', 5) }}
|
||||
<input type="hidden" name="reload" value="1" />
|
||||
{% if dbstats is not empty %}
|
||||
<input type="hidden" name="dbstats" value="1" />
|
||||
@ -71,7 +71,7 @@
|
||||
max_db_list
|
||||
) }}
|
||||
<form class="ajax" action="server_databases.php" method="post" name="dbStatsForm" id="dbStatsForm">
|
||||
{{ Url_getHiddenInputs(url_params) }}
|
||||
{{ get_hidden_inputs(url_params) }}
|
||||
{% set url_params = url_params|merge({
|
||||
'sort_by': 'SCHEMA_NAME',
|
||||
'sort_order': sort_by == 'SCHEMA_NAME' and sort_order == 'asc' ? 'desc' : 'asc'
|
||||
@ -84,7 +84,7 @@
|
||||
<th></th>
|
||||
{% endif %}
|
||||
<th>
|
||||
<a href="server_databases.php{{ Url_getCommon(url_params) }}">
|
||||
<a href="server_databases.php{{ get_common(url_params) }}">
|
||||
{% trans 'Database' %}
|
||||
{{ sort_by == 'SCHEMA_NAME' ? Util_getImage(
|
||||
's_' ~ sort_order,
|
||||
@ -99,7 +99,7 @@
|
||||
}) %}
|
||||
|
||||
<th{{ stat['format'] is same as('byte') ? ' colspan="2"' }}>
|
||||
<a href="server_databases.php{{ Url_getCommon(url_params) }}">
|
||||
<a href="server_databases.php{{ get_common(url_params) }}">
|
||||
{{ stat['disp_name'] }}
|
||||
{{ sort_by == stat_name ? Util_getImage(
|
||||
's_' ~ sort_order,
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
{% endif %}
|
||||
<td class="name">
|
||||
<a href="{{ Util_getScriptNameForOption(default_tab_database, 'database') }}
|
||||
{{- Url_getCommon({'db': current['SCHEMA_NAME']}) }}" title="
|
||||
{{- get_common({'db': current['SCHEMA_NAME']}) }}" title="
|
||||
{{- "Jump to database '%s'"|trans|format(current['SCHEMA_NAME']|e) }}">
|
||||
{{ current['SCHEMA_NAME'] }}
|
||||
</a>
|
||||
@ -44,7 +44,7 @@
|
||||
<td class="tool">
|
||||
<a class="server_databases" data="
|
||||
{{- Sanitize_jsFormat(current['SCHEMA_NAME']) }}" href="server_privileges.php
|
||||
{{- Url_getCommon({
|
||||
{{- get_common({
|
||||
'db': current['SCHEMA_NAME'],
|
||||
'checkprivsdb': current['SCHEMA_NAME']
|
||||
}) }}" title="
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
{{- details['Support'] == 'NO' or details['Support'] == 'DISABLED' ? ' disabled' }}
|
||||
{{ details['Support'] == 'DEFAULT' ? ' marked' }}">
|
||||
<td>
|
||||
<a rel="newpage" href="server_engines.php{{ Url_getCommon({'engine': engine}) }}">
|
||||
<a rel="newpage" href="server_engines.php{{ get_common({'engine': engine}) }}">
|
||||
{{ details['Engine'] }}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<strong>{% trans 'Variables' %}</strong>
|
||||
{% else %}
|
||||
<a href="server_engines.php
|
||||
{{- Url_getCommon({'engine': engine}) }}">
|
||||
{{- get_common({'engine': engine}) }}">
|
||||
{% trans 'Variables' %}
|
||||
</a>
|
||||
{% endif %}
|
||||
@ -22,7 +22,7 @@
|
||||
<strong>{{ label }}</strong>
|
||||
{% else %}
|
||||
<a href="server_engines.php
|
||||
{{- Url_getCommon({'engine': engine, 'page': current}) }}">
|
||||
{{- get_common({'engine': engine, 'page': current}) }}">
|
||||
{{ label }}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<fieldset id="fieldset_add_user">
|
||||
<legend>{% trans %}New{% context %}Create new user{% endtrans %}</legend>
|
||||
<a id="add_user_anchor" href="server_privileges.php{{ Url_getCommon(url_params) }}"
|
||||
<a id="add_user_anchor" href="server_privileges.php{{ get_common(url_params) }}"
|
||||
{% if rel_params is not empty %}
|
||||
rel="{{ Url_getCommon(rel_params) }}"
|
||||
rel="{{ get_common(rel_params) }}"
|
||||
{% endif %}>
|
||||
{{ Util_getIcon('b_usradd') }}{% trans 'Add user account' %}</a>
|
||||
</fieldset>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<form class="ajax" id="changeUserGroupForm" action="server_privileges.php" method="post">
|
||||
{{ Url_getHiddenInputs(params) }}
|
||||
{{ get_hidden_inputs(params) }}
|
||||
<fieldset id="fieldset_user_group_selection">
|
||||
<legend>{% trans 'User group' %}</legend>
|
||||
{% trans 'User group' %}:
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<div id="edit_user_dialog">
|
||||
{{ header }}
|
||||
<form class="submenu-item" name="usersForm" id="addUsersForm" action="server_privileges.php" method="post">
|
||||
{{ Url_getHiddenInputs() }}
|
||||
{{ get_hidden_inputs() }}
|
||||
<input type="hidden" name="username" value="{{ username }}">
|
||||
<input type="hidden" name="hostname" value="{{ hostname }}">
|
||||
<input type="hidden" name="dbname" value="{{ database }}">
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<a class="ajax
|
||||
{{- initial is defined and initial is same as(tmp_initial) ? ' active' -}}
|
||||
" href="server_privileges.php
|
||||
{{- Url_getCommon({'initial': tmp_initial}) }}">
|
||||
{{- get_common({'initial': tmp_initial}) }}">
|
||||
{{- tmp_initial|raw -}}
|
||||
</a>
|
||||
</td>
|
||||
@ -16,7 +16,7 @@
|
||||
{% endfor %}
|
||||
<td>
|
||||
<a href="server_privileges.php
|
||||
{{- Url_getCommon({'showall': 1}) }}" class="nowrap">
|
||||
{{- get_common({'showall': 1}) }}" class="nowrap">
|
||||
{% trans 'Show all' %}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
{# Display Chart options #}
|
||||
<div id="div_view_options">
|
||||
<form method="post" id="tblchartform" action="tbl_chart.php" class="ajax">
|
||||
{{ Url_getHiddenInputs(url_params) }}
|
||||
{{ get_hidden_inputs(url_params) }}
|
||||
<fieldset>
|
||||
<legend>
|
||||
{% trans 'Display chart' %}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<legend>{% trans 'Display GIS Visualization' %}</legend>
|
||||
<div id="gis_div" style="position:relative;">
|
||||
<form method="post" action="tbl_gis_visualization.php">
|
||||
{{ Url_getHiddenInputs(url_params) }}
|
||||
{{ get_hidden_inputs(url_params) }}
|
||||
<label for="labelColumn">
|
||||
{% trans "Label column" %}
|
||||
</label>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
id="index_frm"
|
||||
class="ajax">
|
||||
|
||||
{{ Url_getHiddenInputs(form_params) }}
|
||||
{{ get_hidden_inputs(form_params) }}
|
||||
|
||||
<fieldset id="index_edit_fields">
|
||||
<div class="index_info">
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<form id="continueForm" method="post" action="tbl_replace.php" name="continueForm">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
<input type="hidden" name="goto" value="{{ goto }}">
|
||||
<input type="hidden" name="err_url" value="{{ err_url }}">
|
||||
<input type="hidden" name="sql_query" value="{{ sql_query }}">
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
{% block content %}
|
||||
<form method="post" action="tbl_relation.php">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
{# InnoDB #}
|
||||
{% if Util_isForeignKeySupported(tbl_storage_engine) %}
|
||||
<fieldset>
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
{% 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_url = 'sql.php' ~ get_common(this_params) %}
|
||||
{% set drop_str = Util_getIcon('b_drop', 'Drop'|trans) %}
|
||||
{{ Util_linkOrButton(drop_url, drop_str, {'class': 'drop_foreign_key_anchor ajax'}) }}
|
||||
{% endif %}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<form method="post" action="{{ script_name }}" name="insertForm" id="{{ form_id }}" class="ajax lock-page">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
<input type="hidden" name="goto" value="{{ goto }}" />
|
||||
<input type="hidden" name="back" value="{{ script_name }}" />
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
{% endif %} />
|
||||
<a class="ajax browse_foreign"
|
||||
href="browse_foreigners.php
|
||||
{{- Url_getCommon({'db': db, 'table': table}) -}}
|
||||
{{- get_common({'db': db, 'table': table}) -}}
|
||||
&field={{ column_name|url_encode }}&fieldkey=
|
||||
{{- column_index }}&fromsearch=1">
|
||||
{{ titles['Browse']|replace({"'": "\\'"})|raw }}
|
||||
@ -35,7 +35,7 @@
|
||||
class="textfield"
|
||||
id="field_{{ column_index }}" />
|
||||
{% if in_fbs %}
|
||||
{% set edit_url = 'gis_data_editor.php' ~ Url_getCommon() %}
|
||||
{% set edit_url = 'gis_data_editor.php' ~ get_common() %}
|
||||
{% set edit_str = Util_getIcon('b_edit', 'Edit/Insert'|trans) %}
|
||||
<span class="open_search_gis_editor">
|
||||
{{ Util_linkOrButton(edit_url, edit_str, [], '_blank') }}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
action="tbl_find_replace.php"
|
||||
name="previewForm"
|
||||
id="previewForm">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
<input type="hidden" name="replace" value="true" />
|
||||
<input type="hidden" name="columnIndex" value="{{ column_index }}" />
|
||||
<input type="hidden" name="findString" value="{{ find }}" />
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<form method="post" action="tbl_zoom_select.php" name="displayResultForm" id="zoom_display_form" class="ajax">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
<input type="hidden" name="goto" value="{{ goto }}" />
|
||||
<input type="hidden" name="back" value="tbl_zoom_select.php" />
|
||||
|
||||
|
||||
@ -129,7 +129,7 @@
|
||||
</fieldset>
|
||||
<fieldset class="tblFooters print_ignore">
|
||||
<form action="tbl_structure.php" method="post">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
<input type="hidden" name="edit_partitioning" value="true" />
|
||||
{% if partitions is empty %}
|
||||
<input type="submit" name="edit_partitioning" value="{% trans 'Partition table' %}" />
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
{% block content %}
|
||||
<form method="post" action="tbl_structure.php" name="fieldsForm" id="fieldsForm"
|
||||
class="ajax{{ hide_structure_actions ? ' HideStructureActions' }}">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
<input type="hidden" name="table_type" value=
|
||||
{%- if db_is_system_schema -%}
|
||||
"information_schema"
|
||||
@ -362,7 +362,7 @@
|
||||
<p>{% trans 'Move the columns by dragging them up and down.' %}</p>
|
||||
<form action="tbl_structure.php" name="move_column_form" id="move_column_form">
|
||||
<div>
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
<ul></ul>
|
||||
</div>
|
||||
</form>
|
||||
@ -409,7 +409,7 @@
|
||||
</div>
|
||||
{% if not tbl_is_view and not db_is_system_schema %}
|
||||
<form method="post" action="tbl_addfield.php" id="addColumns" name="addColumns">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
{% if Util_showIcons('ActionLinksMode') %}
|
||||
{{ Util_getImage('b_insrow', 'Add column'|trans) }}
|
||||
{% endif %}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<form action="tbl_structure.php" method="post">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
<input type="hidden" name="edit_partitioning" value="true" />
|
||||
|
||||
<fieldset>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{% if selectable_tables_num_rows > 0 %}
|
||||
<form method="post" action="tbl_tracking.php{{ url_query|raw }}">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
<select name="table" class="autosubmit">
|
||||
{% for entry in selectable_tables_entries %}
|
||||
<option value="{{ entry.table_name }}"
|
||||
@ -20,7 +20,7 @@
|
||||
<br/>
|
||||
{% if last_version > 0 %}
|
||||
<form method="post" action="tbl_tracking.php" name="versionsForm" id="versionsForm" class="ajax">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
<table id="versions" class="data">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -63,14 +63,14 @@
|
||||
</td>
|
||||
<td>
|
||||
<a href="tbl_tracking.php
|
||||
{{- Url_getCommon(
|
||||
{{- get_common(
|
||||
url_params|merge({'report': 'true', 'version': version['version']})
|
||||
) -}}">
|
||||
{{ Util_getIcon('b_report', 'Tracking report'|trans) }}
|
||||
</a>
|
||||
|
||||
<a href="tbl_tracking.php
|
||||
{{- Url_getCommon(
|
||||
{{- get_common(
|
||||
url_params|merge({'snapshot': 'true', 'version': version['version']})
|
||||
) -}}">
|
||||
{{ Util_getIcon('b_props', 'Structure snapshot'|trans) }}
|
||||
@ -96,7 +96,7 @@
|
||||
{% set last_version_element = versions|first %}
|
||||
<div>
|
||||
<form method="post" action="tbl_tracking.php{{ url_query|raw }}">
|
||||
{{ Url_getHiddenInputs(db, table) }}
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
<fieldset>
|
||||
<legend>
|
||||
{% if last_version_element['tracking_active'] == 0 %}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
{{ name }} ({{ version }})
|
||||
</h2>
|
||||
<p>
|
||||
<a class="take_theme" name="{{ id }}" href="index.php{{ Url_getCommon(url_params) }}">
|
||||
<a class="take_theme" name="{{ id }}" href="index.php{{ get_common(url_params) }}">
|
||||
{% if screen is not empty %}
|
||||
<img src="{{ screen }}" alt="{{ name }}" title="{{ name }}">
|
||||
<br>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!-- CREATE VIEW options -->
|
||||
<div id="div_view_options">
|
||||
<form method="post" action="view_create.php">
|
||||
{{ Url_getHiddenInputs(url_params) }}
|
||||
{{ get_hidden_inputs(url_params) }}
|
||||
<fieldset>
|
||||
<legend>
|
||||
{% if ajax_dialog %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user