Refactored url parmeters generating, Issue #11990
Signed-off-by: Durgesh <007durgesh219@gmail.com>
This commit is contained in:
parent
b8c39d413d
commit
0b64827930
@ -6,6 +6,8 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Gets some core libraries
|
||||
*/
|
||||
@ -114,7 +116,7 @@ $response->addHTML($table_navigation_html);
|
||||
$columnAdd = PMA_getHTMLforAddCentralColumn($total_rows, $pos, $db);
|
||||
$response->addHTML($columnAdd);
|
||||
$deleteRowForm = '<form method="post" id="del_form" action="db_central_columns.php">'
|
||||
. PMA_URL_getHiddenInputs(
|
||||
. URL::getHiddenInputs(
|
||||
$db
|
||||
)
|
||||
. '<input id="del_col_name" type="hidden" name="col_name" value="">'
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Gets the variables sent or posted to this script, then displays headers
|
||||
@ -45,7 +46,7 @@ PMA\libraries\Util::checkParameters(array('db'));
|
||||
/**
|
||||
* Defines the url to return to in case of error in a sql statement
|
||||
*/
|
||||
$err_url = 'db_sql.php' . PMA_URL_getCommon(array('db' => $db));
|
||||
$err_url = 'db_sql.php' . URL::getCommon(array('db' => $db));
|
||||
|
||||
if ($cfgRelation['commwork']) {
|
||||
$comment = PMA_getDbComment($db);
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\SavedSearches;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* requirements
|
||||
@ -131,7 +132,7 @@ unset($message_to_display);
|
||||
// create new qbe search instance
|
||||
$db_qbe = new PMA\libraries\DbQbe($GLOBALS['db'], $savedSearchList, $savedSearch);
|
||||
|
||||
$url = 'db_designer.php' . PMA_URL_getCommon(
|
||||
$url = 'db_designer.php' . URL::getCommon(
|
||||
array_merge(
|
||||
$url_params,
|
||||
array('query' => 1)
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\plugins\ExportPlugin;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Get the variables sent or posted to this script and a core script
|
||||
@ -254,11 +255,11 @@ if (!defined('TESTSUITE')) {
|
||||
|
||||
// Generate error url and check for needed variables
|
||||
if ($export_type == 'server') {
|
||||
$err_url = 'server_export.php' . PMA_URL_getCommon();
|
||||
$err_url = 'server_export.php' . URL::getCommon();
|
||||
} elseif ($export_type == 'database'
|
||||
&& mb_strlen($db)
|
||||
) {
|
||||
$err_url = 'db_export.php' . PMA_URL_getCommon(array('db' => $db));
|
||||
$err_url = 'db_export.php' . URL::getCommon(array('db' => $db));
|
||||
// Check if we have something to export
|
||||
if (isset($table_select)) {
|
||||
$tables = $table_select;
|
||||
@ -268,7 +269,7 @@ if (!defined('TESTSUITE')) {
|
||||
} elseif ($export_type == 'table' && mb_strlen($db)
|
||||
&& mb_strlen($table)
|
||||
) {
|
||||
$err_url = 'tbl_export.php' . PMA_URL_getCommon(
|
||||
$err_url = 'tbl_export.php' . URL::getCommon(
|
||||
array(
|
||||
'db' => $db, 'table' => $table
|
||||
)
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
*/
|
||||
use PMA\libraries\gis\GISFactory;
|
||||
use PMA\libraries\gis\GISVisualization;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Escapes special characters if the variable is set.
|
||||
@ -127,7 +128,7 @@ if (isset($_REQUEST['input_name'])) {
|
||||
echo '<input type="hidden" name="input_name" value="'
|
||||
, htmlspecialchars($_REQUEST['input_name']) , '" />';
|
||||
}
|
||||
echo PMA_URL_getHiddenInputs();
|
||||
echo URL::getHiddenInputs();
|
||||
|
||||
echo '<!-- Visualization section -->';
|
||||
echo '<div id="placeholder" style="width:450px;height:300px;'
|
||||
|
||||
13
import.php
13
import.php
@ -6,6 +6,7 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\plugins\ImportPlugin;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Get the variables sent or posted to this script and a core script
|
||||
@ -241,7 +242,7 @@ $format = PMA_securePath($format);
|
||||
|
||||
// Create error and goto url
|
||||
if ($import_type == 'table') {
|
||||
$err_url = 'tbl_import.php' . PMA_URL_getCommon(
|
||||
$err_url = 'tbl_import.php' . URL::getCommon(
|
||||
array(
|
||||
'db' => $db, 'table' => $table
|
||||
)
|
||||
@ -249,11 +250,11 @@ if ($import_type == 'table') {
|
||||
$_SESSION['Import_message']['go_back_url'] = $err_url;
|
||||
$goto = 'tbl_import.php';
|
||||
} elseif ($import_type == 'database') {
|
||||
$err_url = 'db_import.php' . PMA_URL_getCommon(array('db' => $db));
|
||||
$err_url = 'db_import.php' . URL::getCommon(array('db' => $db));
|
||||
$_SESSION['Import_message']['go_back_url'] = $err_url;
|
||||
$goto = 'db_import.php';
|
||||
} elseif ($import_type == 'server') {
|
||||
$err_url = 'server_import.php' . PMA_URL_getCommon();
|
||||
$err_url = 'server_import.php' . URL::getCommon();
|
||||
$_SESSION['Import_message']['go_back_url'] = $err_url;
|
||||
$goto = 'server_import.php';
|
||||
} else {
|
||||
@ -267,11 +268,11 @@ if ($import_type == 'table') {
|
||||
}
|
||||
}
|
||||
if (mb_strlen($table) && mb_strlen($db)) {
|
||||
$common = PMA_URL_getCommon(array('db' => $db, 'table' => $table));
|
||||
$common = URL::getCommon(array('db' => $db, 'table' => $table));
|
||||
} elseif (mb_strlen($db)) {
|
||||
$common = PMA_URL_getCommon(array('db' => $db));
|
||||
$common = URL::getCommon(array('db' => $db));
|
||||
} else {
|
||||
$common = PMA_URL_getCommon();
|
||||
$common = URL::getCommon();
|
||||
}
|
||||
$err_url = $goto . $common
|
||||
. (preg_match('@^tbl_[a-z]*\.php$@', $goto)
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\RecentFavoriteTable;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Gets some core libraries and displays a top message if required
|
||||
@ -105,7 +106,7 @@ if (! empty($message)) {
|
||||
unset($message);
|
||||
}
|
||||
|
||||
$common_url_query = PMA_URL_getCommon();
|
||||
$common_url_query = URL::getCommon();
|
||||
$mysql_cur_user_and_host = '';
|
||||
|
||||
// when $server > 0, a server has been chosen so we can display
|
||||
@ -202,7 +203,7 @@ if ($server > 0 || count($cfg['Servers']) > 1
|
||||
} // end if
|
||||
echo ' <li id="li_select_mysql_collation" class="no_bullets" >';
|
||||
echo ' <form method="post" action="index.php">' , "\n"
|
||||
. PMA_URL_getHiddenInputs(null, null, 4, 'collation_connection')
|
||||
. URL::getHiddenInputs(null, null, 4, 'collation_connection')
|
||||
. ' <label for="select_collation_connection">' . "\n"
|
||||
. ' ' . PMA\libraries\Util::getImage('s_asci.png')
|
||||
. " " . __('Server connection collation') . "\n"
|
||||
@ -426,14 +427,14 @@ PMA_printListItem(
|
||||
PMA_printListItem(
|
||||
__('List of changes'),
|
||||
'li_pma_changes',
|
||||
'changelog.php' . PMA_URL_getCommon(),
|
||||
'changelog.php' . URL::getCommon(),
|
||||
null,
|
||||
'_blank'
|
||||
);
|
||||
PMA_printListItem(
|
||||
__('License'),
|
||||
'li_pma_license',
|
||||
'license.php' . PMA_URL_getCommon(),
|
||||
'license.php' . URL::getCommon(),
|
||||
null,
|
||||
'_blank'
|
||||
);
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
namespace PMA\libraries;
|
||||
|
||||
use \Exception;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
require_once 'libraries/advisor.lib.php';
|
||||
|
||||
@ -326,7 +327,7 @@ class Advisor
|
||||
// linking to server_variables.php
|
||||
$rule['recommendation'] = preg_replace(
|
||||
'/\{([a-z_0-9]+)\}/Ui',
|
||||
'<a href="server_variables.php' . PMA_URL_getCommon()
|
||||
'<a href="server_variables.php' . URL::getCommon()
|
||||
. '&filter=\1">\1</a>',
|
||||
$this->translate($rule['recommendation'])
|
||||
);
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
namespace PMA\libraries;
|
||||
|
||||
use DirectoryIterator;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Indication for error handler (see end of this file).
|
||||
@ -1549,7 +1550,7 @@ class Config
|
||||
{
|
||||
return '<form name="form_fontsize_selection" id="form_fontsize_selection"'
|
||||
. ' method="get" action="index.php" class="disableAjax">' . "\n"
|
||||
. PMA_URL_getHiddenInputs() . "\n"
|
||||
. URL::getHiddenInputs() . "\n"
|
||||
. Config::getFontsizeSelection() . "\n"
|
||||
. '</form>';
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ namespace PMA\libraries;
|
||||
|
||||
use PMA\libraries\dbi\DBIExtension;
|
||||
use PMA\libraries\LanguageManager;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
require_once './libraries/logging.lib.php';
|
||||
require_once './libraries/util.lib.php';
|
||||
@ -2069,7 +2070,7 @@ class DatabaseInterface
|
||||
*/
|
||||
$error .= ' - ' . $error_message .
|
||||
' (<a href="server_engines.php' .
|
||||
PMA_URL_getCommon(
|
||||
URL::getCommon(
|
||||
array('engine' => 'InnoDB', 'page' => 'Status')
|
||||
) . '">' . __('Details…') . '</a>)';
|
||||
}
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Class to handle database QBE search
|
||||
*
|
||||
@ -1828,7 +1830,7 @@ class DbQbe
|
||||
$url_params['db'] = $this->_db;
|
||||
$url_params['criteriaColumnCount'] = $this->_new_column_count;
|
||||
$url_params['rows'] = $this->_new_row_count;
|
||||
$html_output .= PMA_URL_getHiddenInputs($url_params);
|
||||
$html_output .= URL::getHiddenInputs($url_params);
|
||||
$html_output .= '</fieldset>';
|
||||
// get footers
|
||||
$html_output .= $this->_getTableFooters();
|
||||
@ -1836,7 +1838,7 @@ class DbQbe
|
||||
$html_output .= $this->_getTablesList();
|
||||
$html_output .= '</form>';
|
||||
$html_output .= '<form action="db_qbe.php" method="post" class="lock-page">';
|
||||
$html_output .= PMA_URL_getHiddenInputs(array('db' => $this->_db));
|
||||
$html_output .= URL::getHiddenInputs(array('db' => $this->_db));
|
||||
// get SQL query
|
||||
$html_output .= '<div class="floatleft" style="width:50%">';
|
||||
$html_output .= '<fieldset>';
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Class to handle database search
|
||||
*
|
||||
@ -336,12 +338,12 @@ class DbSearch
|
||||
// Displays browse/delete link if result count > 0
|
||||
if ($res_cnt > 0) {
|
||||
$this_url_params['sql_query'] = $newsearchsqls['select_columns'];
|
||||
$browse_result_path = 'sql.php' . PMA_URL_getCommon($this_url_params);
|
||||
$browse_result_path = 'sql.php' . URL::getCommon($this_url_params);
|
||||
$html_output .= '<td><a name="browse_search" class="ajax" href="'
|
||||
. $browse_result_path . '" onclick="loadResult(\''
|
||||
. $browse_result_path . '\',\''
|
||||
. PMA_escapeJsString(htmlspecialchars($each_table)) . '\',\''
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'db' => $GLOBALS['db'], 'table' => $each_table
|
||||
)
|
||||
@ -349,7 +351,7 @@ class DbSearch
|
||||
. ');return false;" >'
|
||||
. __('Browse') . '</a></td>';
|
||||
$this_url_params['sql_query'] = $newsearchsqls['delete'];
|
||||
$delete_result_path = 'sql.php' . PMA_URL_getCommon($this_url_params);
|
||||
$delete_result_path = 'sql.php' . URL::getCommon($this_url_params);
|
||||
$html_output .= '<td><a name="delete_search" class="ajax" href="'
|
||||
. $delete_result_path . '" onclick="deleteResult(\''
|
||||
. $delete_result_path . '\' , \''
|
||||
@ -378,7 +380,7 @@ class DbSearch
|
||||
$html_output .= '<form id="db_search_form"'
|
||||
. ' class="ajax lock-page"'
|
||||
. ' method="post" action="db_search.php" name="db_search">';
|
||||
$html_output .= PMA_URL_getHiddenInputs($GLOBALS['db']);
|
||||
$html_output .= URL::getHiddenInputs($GLOBALS['db']);
|
||||
$html_output .= '<fieldset>';
|
||||
// set legend caption
|
||||
$html_output .= '<legend>' . __('Search in database') . '</legend>';
|
||||
|
||||
@ -9,6 +9,7 @@ namespace PMA\libraries;
|
||||
|
||||
use SqlParser\Utils\Query;
|
||||
use PMA\libraries\plugins\transformations\Text_Plain_Link;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
require_once './libraries/transformations.lib.php';
|
||||
|
||||
@ -730,7 +731,7 @@ class DisplayResults
|
||||
|
||||
return '<td>'
|
||||
. '<form action="sql.php" method="post" ' . $onsubmit . '>'
|
||||
. PMA_URL_getHiddenInputs(
|
||||
. URL::getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
)
|
||||
. '<input type="hidden" name="sql_query" value="'
|
||||
@ -785,7 +786,7 @@ class DisplayResults
|
||||
//<form> to keep the form alignment of button < and <<
|
||||
// and also to know what to execute when the selector changes
|
||||
$table_navigation_html .= '<form action="sql.php'
|
||||
. PMA_URL_getCommon($_url_params)
|
||||
. URL::getCommon($_url_params)
|
||||
. '" method="post">';
|
||||
|
||||
$table_navigation_html .= Util::pageselector(
|
||||
@ -935,7 +936,7 @@ class DisplayResults
|
||||
. ')'
|
||||
. '">';
|
||||
|
||||
$table_navigation_html .= PMA_URL_getHiddenInputs(
|
||||
$table_navigation_html .= URL::getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
);
|
||||
|
||||
@ -1007,7 +1008,7 @@ class DisplayResults
|
||||
return "\n"
|
||||
. '<td>'
|
||||
. '<form action="sql.php" method="post">'
|
||||
. PMA_URL_getHiddenInputs(
|
||||
. URL::getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
)
|
||||
. '<input type="hidden" name="sql_query" value="'
|
||||
@ -1286,7 +1287,7 @@ class DisplayResults
|
||||
$table_headers_html .= '<input class="save_cells_at_once" type="hidden"'
|
||||
. ' value="' . $GLOBALS['cfg']['SaveCellsAtOnce'] . '" />'
|
||||
. '<div class="common_hidden_inputs">'
|
||||
. PMA_URL_getHiddenInputs(
|
||||
. URL::getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
)
|
||||
. '</div>';
|
||||
@ -1420,11 +1421,11 @@ class DisplayResults
|
||||
|
||||
$drop_down_html .= '<form action="sql.php" method="post" ' .
|
||||
'class="print_ignore">' . "\n"
|
||||
. PMA_URL_getHiddenInputs(
|
||||
. URL::getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
)
|
||||
// to avoid calling PMA_handleSortOrder() later
|
||||
. PMA_getHiddenFields(array('sort_by_key' => '1'))
|
||||
. URL::getHiddenFields(array('sort_by_key' => '1'))
|
||||
. __('Sort by key')
|
||||
. ': <select name="sql_query" class="autosubmit">' . "\n";
|
||||
|
||||
@ -1705,7 +1706,7 @@ class DisplayResults
|
||||
'display_options_form' => 1
|
||||
);
|
||||
|
||||
$options_html .= PMA_URL_getHiddenInputs($url_params)
|
||||
$options_html .= URL::getHiddenInputs($url_params)
|
||||
. '<br />'
|
||||
. Util::getDivForSliderEffect(
|
||||
'', __('Options')
|
||||
@ -1830,7 +1831,7 @@ class DisplayResults
|
||||
|
||||
$tmp_image = '<img class="fulltext" src="' . $tmp_image_file . '" alt="'
|
||||
. $tmp_txt . '" title="' . $tmp_txt . '" />';
|
||||
$tmp_url = 'sql.php' . PMA_URL_getCommon($url_params_full_text);
|
||||
$tmp_url = 'sql.php' . URL::getCommon($url_params_full_text);
|
||||
|
||||
return Util::linkOrButton(
|
||||
$tmp_url, $tmp_image, array(), false
|
||||
@ -1864,7 +1865,7 @@ class DisplayResults
|
||||
$form_html .= ' class="ajax" ';
|
||||
|
||||
$form_html .= '>'
|
||||
. PMA_URL_getHiddenInputs(
|
||||
. URL::getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table'), 1
|
||||
)
|
||||
. '<input type="hidden" name="goto" value="sql.php" />';
|
||||
@ -1996,8 +1997,8 @@ class DisplayResults
|
||||
'session_max_rows' => $session_max_rows,
|
||||
'is_browse_distinct' => $this->__get('is_browse_distinct'),
|
||||
);
|
||||
$single_order_url = 'sql.php' . PMA_URL_getCommon($_single_url_params);
|
||||
$multi_order_url = 'sql.php' . PMA_URL_getCommon($_multi_url_params);
|
||||
$single_order_url = 'sql.php' . URL::getCommon($_single_url_params);
|
||||
$multi_order_url = 'sql.php' . URL::getCommon($_multi_url_params);
|
||||
|
||||
// Displays the sorting URL
|
||||
// enable sort order swapping for image
|
||||
@ -3153,7 +3154,7 @@ class DisplayResults
|
||||
}
|
||||
|
||||
$transform_options['wrapper_link']
|
||||
= PMA_URL_getCommon($_url_params);
|
||||
= URL::getCommon($_url_params);
|
||||
|
||||
$display_params = $this->__get('display_params');
|
||||
|
||||
@ -3270,7 +3271,7 @@ class DisplayResults
|
||||
$divider = strpos($link_relations['default_page'], '?') ? '&' : '?';
|
||||
if (empty($link_relations['link_dependancy_params'])) {
|
||||
return $link_relations['default_page']
|
||||
. PMA_URL_getCommon($linking_url_params, 'html', $divider);
|
||||
. URL::getCommon($linking_url_params, 'html', $divider);
|
||||
}
|
||||
|
||||
foreach ($link_relations['link_dependancy_params'] as $new_param) {
|
||||
@ -3294,7 +3295,7 @@ class DisplayResults
|
||||
}
|
||||
|
||||
return $link_relations['default_page']
|
||||
. PMA_URL_getCommon($linking_url_params, 'html', $divider);
|
||||
. URL::getCommon($linking_url_params, 'html', $divider);
|
||||
}
|
||||
|
||||
|
||||
@ -3459,12 +3460,12 @@ class DisplayResults
|
||||
);
|
||||
|
||||
$edit_url = 'tbl_change.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
$_url_params + array('default_action' => 'update')
|
||||
);
|
||||
|
||||
$copy_url = 'tbl_change.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
$_url_params + array('default_action' => 'insert')
|
||||
);
|
||||
|
||||
@ -3518,7 +3519,7 @@ class DisplayResults
|
||||
'goto' => (empty($goto) ? 'tbl_sql.php' : $goto),
|
||||
);
|
||||
|
||||
$lnk_goto = 'sql.php' . PMA_URL_getCommon($_url_params, 'text');
|
||||
$lnk_goto = 'sql.php' . URL::getCommon($_url_params, 'text');
|
||||
|
||||
$del_query = 'DELETE FROM '
|
||||
. Util::backquote($this->__get('table'))
|
||||
@ -3532,7 +3533,7 @@ class DisplayResults
|
||||
'message_to_show' => __('The row has been deleted.'),
|
||||
'goto' => $lnk_goto,
|
||||
);
|
||||
$del_url = 'sql.php' . PMA_URL_getCommon($_url_params);
|
||||
$del_url = 'sql.php' . URL::getCommon($_url_params);
|
||||
|
||||
$js_conf = 'DELETE FROM ' . PMA_jsFormat($this->__get('table'))
|
||||
. ' WHERE ' . PMA_jsFormat($where_clause, false)
|
||||
@ -3550,7 +3551,7 @@ class DisplayResults
|
||||
);
|
||||
|
||||
$lnk_goto = 'sql.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
$_url_params, 'text'
|
||||
);
|
||||
|
||||
@ -3562,7 +3563,7 @@ class DisplayResults
|
||||
'goto' => $lnk_goto,
|
||||
);
|
||||
|
||||
$del_url = 'sql.php' . PMA_URL_getCommon($_url_params);
|
||||
$del_url = 'sql.php' . URL::getCommon($_url_params);
|
||||
$js_conf = $kill;
|
||||
$del_str = Util::getIcon(
|
||||
'b_drop.png', __('Kill')
|
||||
@ -5067,7 +5068,7 @@ class DisplayResults
|
||||
'printview' => '1',
|
||||
'sql_query' => $this->__get('sql_query'),
|
||||
);
|
||||
$url_query = PMA_URL_getCommon($_url_params);
|
||||
$url_query = URL::getCommon($_url_params);
|
||||
|
||||
if (!$header_shown) {
|
||||
$results_operations_html .= $header;
|
||||
@ -5132,7 +5133,7 @@ class DisplayResults
|
||||
}
|
||||
|
||||
$results_operations_html .= Util::linkOrButton(
|
||||
'tbl_export.php' . PMA_URL_getCommon($_url_params),
|
||||
'tbl_export.php' . URL::getCommon($_url_params),
|
||||
Util::getIcon(
|
||||
'b_tblexport.png', __('Export'), true
|
||||
),
|
||||
@ -5145,7 +5146,7 @@ class DisplayResults
|
||||
|
||||
// prepare chart
|
||||
$results_operations_html .= Util::linkOrButton(
|
||||
'tbl_chart.php' . PMA_URL_getCommon($_url_params),
|
||||
'tbl_chart.php' . URL::getCommon($_url_params),
|
||||
Util::getIcon(
|
||||
'b_chart.png', __('Display chart'), true
|
||||
),
|
||||
@ -5170,7 +5171,7 @@ class DisplayResults
|
||||
$results_operations_html
|
||||
.= Util::linkOrButton(
|
||||
'tbl_gis_visualization.php'
|
||||
. PMA_URL_getCommon($_url_params),
|
||||
. URL::getCommon($_url_params),
|
||||
Util::getIcon(
|
||||
'b_globe.gif', __('Visualize GIS data'), true
|
||||
),
|
||||
@ -5315,7 +5316,7 @@ class DisplayResults
|
||||
&& (!empty($tmpdb) && !empty($meta->orgtable))
|
||||
) {
|
||||
$result = '<a href="tbl_get_field.php'
|
||||
. PMA_URL_getCommon($url_params)
|
||||
. URL::getCommon($url_params)
|
||||
. '" class="disableAjax">'
|
||||
. $result . '</a>';
|
||||
}
|
||||
@ -5483,7 +5484,7 @@ class DisplayResults
|
||||
);
|
||||
|
||||
$result .= '<a class="ajax" href="sql.php'
|
||||
. PMA_URL_getCommon($_url_params)
|
||||
. URL::getCommon($_url_params)
|
||||
. '"' . $title . '>';
|
||||
|
||||
if ($transformation_plugin != $default_function) {
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
namespace PMA\libraries;
|
||||
|
||||
use Traversable;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Class used to output the footer
|
||||
@ -134,7 +135,7 @@ class Footer
|
||||
/**
|
||||
* Returns the url of the current page
|
||||
*
|
||||
* @param string|null $encode See PMA_URL_getCommon()
|
||||
* @param string|null $encode See URL::getCommon()
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@ -178,7 +179,7 @@ class Footer
|
||||
) {
|
||||
$params['single_table'] = $_REQUEST['single_table'];
|
||||
}
|
||||
return basename(PMA_getenv('SCRIPT_NAME')) . PMA_URL_getCommon(
|
||||
return basename(PMA_getenv('SCRIPT_NAME')) . URL::getCommon(
|
||||
$params,
|
||||
$encode
|
||||
);
|
||||
|
||||
@ -8,9 +8,9 @@
|
||||
namespace PMA\libraries;
|
||||
|
||||
use PMA\libraries\navigation\Navigation;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
require_once 'libraries/js_escape.lib.php';
|
||||
require_once 'libraries/url_generating.lib.php';
|
||||
|
||||
/**
|
||||
* Class used to output the HTTP and HTML headers
|
||||
@ -155,7 +155,7 @@ class Header
|
||||
}
|
||||
$this->_scripts->addFile('jquery/jquery-2.1.4.min.js');
|
||||
$this->_scripts->addFile(
|
||||
'whitelist.php' . PMA_URL_getCommon($params), false, true
|
||||
'whitelist.php' . URL::getCommon($params), false, true
|
||||
);
|
||||
$this->_scripts->addFile('sprintf.js');
|
||||
$this->_scripts->addFile('ajax.js');
|
||||
@ -183,7 +183,7 @@ class Header
|
||||
// Here would not be a good place to add CodeMirror because
|
||||
// the user preferences have not been merged at this point
|
||||
|
||||
$this->_scripts->addFile('messages.php' . PMA_URL_getCommon($params));
|
||||
$this->_scripts->addFile('messages.php' . URL::getCommon($params));
|
||||
// Append the theme id to this url to invalidate
|
||||
// the cache on a theme change. Though this might be
|
||||
// unavailable for fatal errors.
|
||||
@ -224,7 +224,7 @@ class Header
|
||||
}
|
||||
|
||||
$params = array(
|
||||
'common_query' => PMA_URL_getCommon(array(), 'text'),
|
||||
'common_query' => URL::getCommon(array(), 'text'),
|
||||
'opendb_url' => Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
),
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Index manipulation class
|
||||
*
|
||||
@ -717,7 +719,7 @@ class Index
|
||||
$r .= '" ' . $row_span . '>'
|
||||
. ' <a class="';
|
||||
$r .= 'ajax';
|
||||
$r .= '" href="tbl_indexes.php' . PMA_URL_getCommon($this_params)
|
||||
$r .= '" href="tbl_indexes.php' . URL::getCommon($this_params)
|
||||
. '">' . Util::getIcon('b_edit.png', __('Edit')) . '</a>'
|
||||
. '</td>' . "\n";
|
||||
$this_params = $GLOBALS['url_params'];
|
||||
@ -750,7 +752,7 @@ class Index
|
||||
. ' value="' . $js_msg . '" />';
|
||||
$r .= ' <a class="drop_primary_key_index_anchor';
|
||||
$r .= ' ajax';
|
||||
$r .= '" href="sql.php' . PMA_URL_getCommon($this_params)
|
||||
$r .= '" href="sql.php' . URL::getCommon($this_params)
|
||||
. '" >'
|
||||
. Util::getIcon('b_drop.png', __('Drop')) . '</a>'
|
||||
. '</td>' . "\n";
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Class for generating the top menu
|
||||
*
|
||||
@ -196,7 +198,7 @@ class Menu
|
||||
Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabServer'], 'server'
|
||||
),
|
||||
PMA_URL_getCommon(),
|
||||
URL::getCommon(),
|
||||
htmlspecialchars($server_info),
|
||||
__('Server')
|
||||
);
|
||||
@ -215,7 +217,7 @@ class Menu
|
||||
Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
),
|
||||
PMA_URL_getCommon(array('db' => $this->_db)),
|
||||
URL::getCommon(array('db' => $this->_db)),
|
||||
htmlspecialchars($this->_db),
|
||||
__('Database')
|
||||
);
|
||||
@ -240,7 +242,7 @@ class Menu
|
||||
Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
),
|
||||
PMA_URL_getCommon(
|
||||
URL::getCommon(
|
||||
array(
|
||||
'db' => $this->_db, 'table' => $this->_table
|
||||
)
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Handles the recently used and favorite tables.
|
||||
*
|
||||
@ -184,7 +186,7 @@ class RecentFavoriteTable
|
||||
'table' => $table['table']
|
||||
);
|
||||
$recent_url = 'tbl_recent_favorite.php'
|
||||
. PMA_URL_getCommon($recent_params);
|
||||
. URL::getCommon($recent_params);
|
||||
$html .= '<a href="' . $recent_url . '">`'
|
||||
. htmlspecialchars($table['db']) . '`.`'
|
||||
. htmlspecialchars($table['table']) . '`</a>';
|
||||
@ -202,7 +204,7 @@ class RecentFavoriteTable
|
||||
'remove_favorite' => true
|
||||
);
|
||||
$fav_rm_url = 'db_structure.php'
|
||||
. PMA_URL_getCommon($fav_params);
|
||||
. URL::getCommon($fav_params);
|
||||
$html .= 'href="' . $fav_rm_url
|
||||
. '" title="' . __("Remove from Favorites")
|
||||
. '" data-favtargetn="'
|
||||
@ -216,7 +218,7 @@ class RecentFavoriteTable
|
||||
'table' => $table['table']
|
||||
);
|
||||
$table_url = 'tbl_recent_favorite.php'
|
||||
. PMA_URL_getCommon($fav_params);
|
||||
. URL::getCommon($fav_params);
|
||||
$html .= '<a href="' . $table_url . '">`'
|
||||
. htmlspecialchars($table['db']) . '`.`'
|
||||
. htmlspecialchars($table['table']) . '`</a>';
|
||||
@ -347,7 +349,7 @@ class RecentFavoriteTable
|
||||
if (!$is_synced) {
|
||||
$params = array('ajax_request' => true, 'favorite_table' => true,
|
||||
'sync_favorite_tables' => true);
|
||||
$url = 'db_structure.php' . PMA_URL_getCommon($params);
|
||||
$url = 'db_structure.php' . URL::getCommon($params);
|
||||
$retval = '<a class="hide" id="sync_favorite_tables"';
|
||||
$retval .= ' href="' . $url . '"></a>';
|
||||
}
|
||||
@ -362,7 +364,7 @@ class RecentFavoriteTable
|
||||
public static function getHtmlUpdateRecentTables()
|
||||
{
|
||||
$params = array('ajax_request' => true, 'recent_table' => true);
|
||||
$url = 'index.php' . PMA_URL_getCommon($params);
|
||||
$url = 'index.php' . URL::getCommon($params);
|
||||
$retval = '<a class="hide" id="update_recent_tables"';
|
||||
$retval .= ' href="' . $url . '"></a>';
|
||||
return $retval;
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Collects information about which JavaScript
|
||||
* files and objects are necessary to render
|
||||
@ -51,7 +53,7 @@ class Scripts
|
||||
$first_dynamic_scripts = "";
|
||||
$dynamic_scripts = "";
|
||||
$scripts = array();
|
||||
$separator = PMA_URL_getArgSeparator();
|
||||
$separator = URL::getArgSeparator();
|
||||
foreach ($files as $value) {
|
||||
if (mb_strpos($value['filename'], "?") !== false) {
|
||||
$file_name = $value['filename'] . $separator
|
||||
@ -72,7 +74,7 @@ class Scripts
|
||||
$scripts[] = "scripts%5B%5D=" . $value['filename'];
|
||||
}
|
||||
}
|
||||
$separator = PMA_URL_getArgSeparator();
|
||||
$separator = URL::getArgSeparator();
|
||||
$static_scripts = '';
|
||||
// Using chunks of 20 files to avoid too long URLs
|
||||
$script_chunks = array_chunk($scripts, 20);
|
||||
|
||||
@ -8,6 +8,8 @@
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* This class provides data about the server status
|
||||
*
|
||||
@ -142,13 +144,13 @@ class ServerStatusData
|
||||
// variable or section name => (name => url)
|
||||
|
||||
$links['table'][__('Flush (close) all tables')] = $this->selfUrl
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'flush' => 'TABLES'
|
||||
)
|
||||
);
|
||||
$links['table'][__('Show open tables')]
|
||||
= 'sql.php' . PMA_URL_getCommon(
|
||||
= 'sql.php' . URL::getCommon(
|
||||
array(
|
||||
'sql_query' => 'SHOW OPEN TABLES',
|
||||
'goto' => $this->selfUrl,
|
||||
@ -157,7 +159,7 @@ class ServerStatusData
|
||||
|
||||
if ($GLOBALS['replication_info']['master']['status']) {
|
||||
$links['repl'][__('Show slave hosts')]
|
||||
= 'sql.php' . PMA_URL_getCommon(
|
||||
= 'sql.php' . URL::getCommon(
|
||||
array(
|
||||
'sql_query' => 'SHOW SLAVE HOSTS',
|
||||
'goto' => $this->selfUrl,
|
||||
@ -173,7 +175,7 @@ class ServerStatusData
|
||||
|
||||
$links['qcache'][__('Flush query cache')]
|
||||
= $this->selfUrl
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'flush' => 'QUERY CACHE'
|
||||
)
|
||||
@ -190,10 +192,10 @@ class ServerStatusData
|
||||
|
||||
$links['innodb'][__('Variables')]
|
||||
= 'server_engines.php?engine=InnoDB&'
|
||||
. PMA_URL_getCommon(array(), 'html', '');
|
||||
. URL::getCommon(array(), 'html', '');
|
||||
$links['innodb'][__('InnoDB Status')]
|
||||
= 'server_engines.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'engine' => 'InnoDB',
|
||||
'page' => 'Status'
|
||||
@ -416,7 +418,7 @@ class ServerStatusData
|
||||
*/
|
||||
public function getMenuHtml()
|
||||
{
|
||||
$url_params = PMA_URL_getCommon();
|
||||
$url_params = URL::getCommon();
|
||||
$items = array(
|
||||
array(
|
||||
'name' => __('Server'),
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* handles theme
|
||||
*
|
||||
@ -402,7 +404,7 @@ class Theme
|
||||
public function getPrintPreview()
|
||||
{
|
||||
$url_params = array('set_theme' => $this->getId());
|
||||
$url = 'index.php' . PMA_URL_getCommon($url_params);
|
||||
$url = 'index.php' . URL::getCommon($url_params);
|
||||
|
||||
$retval = '<div class="theme_preview">';
|
||||
$retval .= '<h2>';
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* phpMyAdmin theme manager
|
||||
*
|
||||
@ -357,7 +359,7 @@ class ThemeManager
|
||||
if ($form) {
|
||||
$select_box .= '<form name="setTheme" method="get"';
|
||||
$select_box .= ' action="index.php" class="disableAjax">';
|
||||
$select_box .= PMA_URL_getHiddenInputs();
|
||||
$select_box .= URL::getHiddenInputs();
|
||||
}
|
||||
|
||||
$theme_preview_path= './themes.php';
|
||||
|
||||
251
libraries/URL.php
Normal file
251
libraries/URL.php
Normal file
@ -0,0 +1,251 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* URL/hidden inputs generating.
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
|
||||
class URL {
|
||||
|
||||
/**
|
||||
* Generates text with hidden inputs.
|
||||
*
|
||||
* @param string|array $db optional database name
|
||||
* (can also be an array of parameters)
|
||||
* @param string $table optional table name
|
||||
* @param int $indent indenting level
|
||||
* @param string|array $skip do not generate a hidden field for this parameter
|
||||
* (can be an array of strings)
|
||||
*
|
||||
* @see URL::getCommon()
|
||||
*
|
||||
* @return string string with input fields
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public static function getHiddenInputs($db = '', $table = '',
|
||||
$indent = 0, $skip = array()
|
||||
) {
|
||||
if (is_array($db)) {
|
||||
$params =& $db;
|
||||
$_indent = empty($table) ? $indent : $table;
|
||||
$_skip = empty($indent) ? $skip : $indent;
|
||||
$indent =& $_indent;
|
||||
$skip =& $_skip;
|
||||
} else {
|
||||
$params = array();
|
||||
if (mb_strlen($db)) {
|
||||
$params['db'] = $db;
|
||||
}
|
||||
if (mb_strlen($table)) {
|
||||
$params['table'] = $table;
|
||||
}
|
||||
}
|
||||
|
||||
if (! empty($GLOBALS['server'])
|
||||
&& $GLOBALS['server'] != $GLOBALS['cfg']['ServerDefault']
|
||||
) {
|
||||
$params['server'] = $GLOBALS['server'];
|
||||
}
|
||||
if (empty($_COOKIE['pma_lang']) && ! empty($GLOBALS['lang'])) {
|
||||
$params['lang'] = $GLOBALS['lang'];
|
||||
}
|
||||
if (empty($_COOKIE['pma_collation_connection'])
|
||||
&& ! empty($GLOBALS['collation_connection'])
|
||||
) {
|
||||
$params['collation_connection'] = $GLOBALS['collation_connection'];
|
||||
}
|
||||
|
||||
$params['token'] = $_SESSION[' PMA_token '];
|
||||
|
||||
if (! is_array($skip)) {
|
||||
if (isset($params[$skip])) {
|
||||
unset($params[$skip]);
|
||||
}
|
||||
} else {
|
||||
foreach ($skip as $skipping) {
|
||||
if (isset($params[$skipping])) {
|
||||
unset($params[$skipping]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return URL::getHiddenFields($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* create hidden form fields from array with name => value
|
||||
*
|
||||
* <code>
|
||||
* $values = array(
|
||||
* 'aaa' => aaa,
|
||||
* 'bbb' => array(
|
||||
* 'bbb_0',
|
||||
* 'bbb_1',
|
||||
* ),
|
||||
* 'ccc' => array(
|
||||
* 'a' => 'ccc_a',
|
||||
* 'b' => 'ccc_b',
|
||||
* ),
|
||||
* );
|
||||
* echo URL::getHiddenFields($values);
|
||||
*
|
||||
* // produces:
|
||||
* <input type="hidden" name="aaa" Value="aaa" />
|
||||
* <input type="hidden" name="bbb[0]" Value="bbb_0" />
|
||||
* <input type="hidden" name="bbb[1]" Value="bbb_1" />
|
||||
* <input type="hidden" name="ccc[a]" Value="ccc_a" />
|
||||
* <input type="hidden" name="ccc[b]" Value="ccc_b" />
|
||||
* </code>
|
||||
*
|
||||
* @param array $values hidden values
|
||||
* @param string $pre prefix
|
||||
*
|
||||
* @return string form fields of type hidden
|
||||
*/
|
||||
public static function getHiddenFields($values, $pre = '')
|
||||
{
|
||||
$fields = '';
|
||||
|
||||
foreach ($values as $name => $value) {
|
||||
if (! empty($pre)) {
|
||||
$name = $pre . '[' . $name . ']';
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
$fields .= URL::getHiddenFields($value, $name);
|
||||
} else {
|
||||
// do not generate an ending "\n" because
|
||||
// URL::getHiddenInputs() is sometimes called
|
||||
// from a JS document.write()
|
||||
$fields .= '<input type="hidden" name="' . htmlspecialchars($name)
|
||||
. '" value="' . htmlspecialchars($value) . '" />';
|
||||
}
|
||||
}
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates text with URL parameters.
|
||||
*
|
||||
* <code>
|
||||
* $params['myparam'] = 'myvalue';
|
||||
* $params['db'] = 'mysql';
|
||||
* $params['table'] = 'rights';
|
||||
* // note the missing ?
|
||||
* echo 'script.php' . URL::getCommon($params);
|
||||
* // produces with cookies enabled:
|
||||
* // script.php?myparam=myvalue&db=mysql&table=rights
|
||||
* // with cookies disabled:
|
||||
* // script.php?server=1&lang=en&myparam=myvalue&db=mysql
|
||||
* // &table=rights
|
||||
*
|
||||
* // note the missing ?
|
||||
* echo 'script.php' . URL::getCommon();
|
||||
* // produces with cookies enabled:
|
||||
* // script.php
|
||||
* // with cookies disabled:
|
||||
* // script.php?server=1&lang=en
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $params optional, Contains an associative array with url params
|
||||
*
|
||||
* @param string $encode 'html' to use htmlspecialchars() on the resulting
|
||||
* URL (for a normal URL displayed in HTML) or
|
||||
* something else to avoid using htmlspecialchars()
|
||||
* (for a URL sent via a header);
|
||||
* if not set,'html' is assumed
|
||||
*
|
||||
* @param string $divider optional character to use instead of '?'
|
||||
*
|
||||
* @return string string with URL parameters
|
||||
* @access public
|
||||
*/
|
||||
public static function getCommon($params = array(), $encode = 'html', $divider = '?')
|
||||
{
|
||||
$separator = URL::getArgSeparator();
|
||||
|
||||
// avoid overwriting when creating navi panel links to servers
|
||||
if (isset($GLOBALS['server'])
|
||||
&& $GLOBALS['server'] != $GLOBALS['cfg']['ServerDefault']
|
||||
&& ! isset($params['server'])
|
||||
&& ! defined('PMA_SETUP')
|
||||
) {
|
||||
$params['server'] = $GLOBALS['server'];
|
||||
}
|
||||
|
||||
if (empty($_COOKIE['pma_lang']) && ! empty($GLOBALS['lang'])) {
|
||||
$params['lang'] = $GLOBALS['lang'];
|
||||
}
|
||||
if (empty($_COOKIE['pma_collation_connection'])
|
||||
&& ! empty($GLOBALS['collation_connection'])
|
||||
) {
|
||||
$params['collation_connection'] = $GLOBALS['collation_connection'];
|
||||
}
|
||||
|
||||
if (isset($_SESSION[' PMA_token '])) {
|
||||
$params['token'] = $_SESSION[' PMA_token '];
|
||||
}
|
||||
|
||||
if (empty($params)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$query = $divider . http_build_query($params, null, $separator);
|
||||
|
||||
if ($encode === 'html') {
|
||||
$query = htmlspecialchars($query);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns url separator
|
||||
*
|
||||
* extracted from arg_separator.input as set in php.ini
|
||||
* we do not use arg_separator.output to avoid problems with & and &
|
||||
*
|
||||
* @param string $encode whether to encode separator or not,
|
||||
* currently 'none' or 'html'
|
||||
*
|
||||
* @return string character used for separating url parts usually ; or &
|
||||
* @access public
|
||||
*/
|
||||
public static function getArgSeparator($encode = 'none')
|
||||
{
|
||||
static $separator = null;
|
||||
static $html_separator = null;
|
||||
|
||||
if (null === $separator) {
|
||||
// use separators defined by php, but prefer ';'
|
||||
// as recommended by W3C
|
||||
// (see http://www.w3.org/TR/1999/REC-html401-19991224/appendix
|
||||
// /notes.html#h-B.2.2)
|
||||
$arg_separator = ini_get('arg_separator.input');
|
||||
if (mb_strpos($arg_separator, ';') !== false) {
|
||||
$separator = ';';
|
||||
} elseif (mb_strlen($arg_separator) > 0) {
|
||||
$separator = $arg_separator{0};
|
||||
} else {
|
||||
$separator = '&';
|
||||
}
|
||||
$html_separator = htmlentities($separator);
|
||||
}
|
||||
|
||||
switch ($encode) {
|
||||
case 'html':
|
||||
return $html_separator;
|
||||
case 'text' :
|
||||
case 'none' :
|
||||
default :
|
||||
return $separator;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ use SqlParser\Parser;
|
||||
use SqlParser\Token;
|
||||
use stdClass;
|
||||
use SqlParser\Utils\Error as ParserError;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -711,14 +712,14 @@ class Util
|
||||
$_url_params['db'] = $db;
|
||||
$_url_params['table'] = $table;
|
||||
$doedit_goto = '<a href="tbl_sql.php'
|
||||
. PMA_URL_getCommon($_url_params) . '">';
|
||||
. URL::getCommon($_url_params) . '">';
|
||||
} elseif (mb_strlen($db)) {
|
||||
$_url_params['db'] = $db;
|
||||
$doedit_goto = '<a href="db_sql.php'
|
||||
. PMA_URL_getCommon($_url_params) . '">';
|
||||
. URL::getCommon($_url_params) . '">';
|
||||
} else {
|
||||
$doedit_goto = '<a href="server_sql.php'
|
||||
. PMA_URL_getCommon($_url_params) . '">';
|
||||
. URL::getCommon($_url_params) . '">';
|
||||
}
|
||||
|
||||
$error_msg .= $doedit_goto
|
||||
@ -1195,7 +1196,7 @@ class Util
|
||||
$explain_params['sql_query'] = 'EXPLAIN ' . $sql_query;
|
||||
$explain_link = ' ['
|
||||
. self::linkOrButton(
|
||||
'import.php' . PMA_URL_getCommon($explain_params),
|
||||
'import.php' . URL::getCommon($explain_params),
|
||||
__('Explain SQL')
|
||||
) . ']';
|
||||
} elseif (preg_match(
|
||||
@ -1206,7 +1207,7 @@ class Util
|
||||
= mb_substr($sql_query, 8);
|
||||
$explain_link = ' ['
|
||||
. self::linkOrButton(
|
||||
'import.php' . PMA_URL_getCommon($explain_params),
|
||||
'import.php' . URL::getCommon($explain_params),
|
||||
__('Skip Explain SQL')
|
||||
) . ']';
|
||||
$url = 'https://mariadb.org/explain_analyzer/analyze/'
|
||||
@ -1230,7 +1231,7 @@ class Util
|
||||
// even if the query is big and was truncated, offer the chance
|
||||
// to edit it (unless it's enormous, see linkOrButton() )
|
||||
if (! empty($cfg['SQLQuery']['Edit'])) {
|
||||
$edit_link .= PMA_URL_getCommon($url_params) . '#querybox';
|
||||
$edit_link .= URL::getCommon($url_params) . '#querybox';
|
||||
$edit_link = ' ['
|
||||
. self::linkOrButton($edit_link, __('Edit'))
|
||||
. ']';
|
||||
@ -1245,7 +1246,7 @@ class Util
|
||||
if (! empty($GLOBALS['show_as_php'])) {
|
||||
$php_link = ' ['
|
||||
. self::linkOrButton(
|
||||
'import.php' . PMA_URL_getCommon($url_params),
|
||||
'import.php' . URL::getCommon($url_params),
|
||||
__('Without PHP code'),
|
||||
array(),
|
||||
true,
|
||||
@ -1257,7 +1258,7 @@ class Util
|
||||
|
||||
$php_link .= ' ['
|
||||
. self::linkOrButton(
|
||||
'import.php' . PMA_URL_getCommon($url_params),
|
||||
'import.php' . URL::getCommon($url_params),
|
||||
__('Submit query'),
|
||||
array(),
|
||||
true,
|
||||
@ -1272,7 +1273,7 @@ class Util
|
||||
$_message = __('Create PHP code');
|
||||
$php_link = ' ['
|
||||
. self::linkOrButton(
|
||||
'import.php' . PMA_URL_getCommon($php_params),
|
||||
'import.php' . URL::getCommon($php_params),
|
||||
$_message
|
||||
)
|
||||
. ']';
|
||||
@ -1286,7 +1287,7 @@ class Util
|
||||
&& ! isset($GLOBALS['show_as_php']) // 'Submit query' does the same
|
||||
&& preg_match('@^(SELECT|SHOW)[[:space:]]+@i', $sql_query)
|
||||
) {
|
||||
$refresh_link = 'import.php' . PMA_URL_getCommon($url_params);
|
||||
$refresh_link = 'import.php' . URL::getCommon($url_params);
|
||||
$refresh_link = ' ['
|
||||
. self::linkOrButton($refresh_link, __('Refresh')) . ']';
|
||||
} else {
|
||||
@ -1308,7 +1309,7 @@ class Util
|
||||
|
||||
$retval .= '<div class="tools print_ignore">';
|
||||
$retval .= '<form action="sql.php" method="post">';
|
||||
$retval .= PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
|
||||
$retval .= URL::getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
|
||||
$retval .= '<input type="hidden" name="sql_query" value="'
|
||||
. htmlspecialchars($sql_query) . '" />';
|
||||
|
||||
@ -1773,10 +1774,10 @@ class Util
|
||||
// build the link
|
||||
if (! empty($tab['link'])) {
|
||||
$tab['link'] = htmlentities($tab['link']);
|
||||
$tab['link'] = $tab['link'] . PMA_URL_getCommon($url_params);
|
||||
$tab['link'] = $tab['link'] . URL::getCommon($url_params);
|
||||
if (! empty($tab['args'])) {
|
||||
foreach ($tab['args'] as $param => $value) {
|
||||
$tab['link'] .= PMA_URL_getArgSeparator('html')
|
||||
$tab['link'] .= URL::getArgSeparator('html')
|
||||
. urlencode($param) . '=' . urlencode($value);
|
||||
}
|
||||
}
|
||||
@ -2036,7 +2037,7 @@ class Util
|
||||
public static function splitURLQuery($url)
|
||||
{
|
||||
// decode encoded url separators
|
||||
$separator = PMA_URL_getArgSeparator();
|
||||
$separator = URL::getArgSeparator();
|
||||
// on most places separator is still hard coded ...
|
||||
if ($separator !== '&') {
|
||||
// ... so always replace & with $separator
|
||||
@ -2589,19 +2590,19 @@ class Util
|
||||
|
||||
$_url_params[$name] = 0;
|
||||
$list_navigator_html .= '<a' . $class . $title1 . ' href="' . $script
|
||||
. PMA_URL_getCommon($_url_params) . '">' . $caption1
|
||||
. URL::getCommon($_url_params) . '">' . $caption1
|
||||
. '</a>';
|
||||
|
||||
$_url_params[$name] = $pos - $max_count;
|
||||
$list_navigator_html .= ' <a' . $class . $title2
|
||||
. ' href="' . $script . PMA_URL_getCommon($_url_params) . '">'
|
||||
. ' href="' . $script . URL::getCommon($_url_params) . '">'
|
||||
. $caption2 . '</a>';
|
||||
}
|
||||
|
||||
$list_navigator_html .= '<form action="' . basename($script)
|
||||
. '" method="post">';
|
||||
|
||||
$list_navigator_html .= PMA_URL_getHiddenInputs($_url_params);
|
||||
$list_navigator_html .= URL::getHiddenInputs($_url_params);
|
||||
$list_navigator_html .= self::pageselector(
|
||||
$name,
|
||||
$max_count,
|
||||
@ -2628,7 +2629,7 @@ class Util
|
||||
|
||||
$_url_params[$name] = $pos + $max_count;
|
||||
$list_navigator_html .= '<a' . $class . $title3 . ' href="' . $script
|
||||
. PMA_URL_getCommon($_url_params) . '" >' . $caption3
|
||||
. URL::getCommon($_url_params) . '" >' . $caption3
|
||||
. '</a>';
|
||||
|
||||
$_url_params[$name] = floor($count / $max_count) * $max_count;
|
||||
@ -2637,7 +2638,7 @@ class Util
|
||||
}
|
||||
|
||||
$list_navigator_html .= ' <a' . $class . $title4
|
||||
. ' href="' . $script . PMA_URL_getCommon($_url_params) . '" >'
|
||||
. ' href="' . $script . URL::getCommon($_url_params) . '" >'
|
||||
. $caption4 . '</a>';
|
||||
}
|
||||
$list_navigator_html .= '</div>' . "\n";
|
||||
@ -2691,7 +2692,7 @@ class Util
|
||||
. Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. PMA_URL_getCommon(array('db' => $database)) . '" title="'
|
||||
. URL::getCommon(array('db' => $database)) . '" title="'
|
||||
. htmlspecialchars(
|
||||
sprintf(
|
||||
__('Jump to database "%s".'),
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Function to get html for one relational key
|
||||
@ -116,7 +117,7 @@ function PMA_getHtmlForRelationalFieldSelection($db, $table, $field, $foreignDat
|
||||
. 'id="browse_foreign_form" name="browse_foreign_from" '
|
||||
. 'action="browse_foreigners.php" method="post">'
|
||||
. '<fieldset>'
|
||||
. PMA_URL_getHiddenInputs($db, $table)
|
||||
. URL::getHiddenInputs($db, $table)
|
||||
. '<input type="hidden" name="field" value="' . htmlspecialchars($field)
|
||||
. '" />'
|
||||
. '<input type="hidden" name="fieldkey" value="'
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
*/
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Defines the central_columns parameters for the current user
|
||||
@ -613,7 +614,7 @@ function PMA_getHTMLforTableNavigation($total_rows, $pos, $db)
|
||||
if ($pos - $max_rows >= 0) {
|
||||
$table_navigation_html .= '<td>'
|
||||
. '<form action="db_central_columns.php" method="post">'
|
||||
. PMA_URL_getHiddenInputs(
|
||||
. URL::getHiddenInputs(
|
||||
$db
|
||||
)
|
||||
. '<input type="hidden" name="pos" value="' . ($pos - $max_rows) . '" />'
|
||||
@ -628,7 +629,7 @@ function PMA_getHTMLforTableNavigation($total_rows, $pos, $db)
|
||||
$table_navigation_html .= '<td>';
|
||||
$table_navigation_html .= '<form action="db_central_columns.php'
|
||||
. '" method="post">'
|
||||
. PMA_URL_getHiddenInputs(
|
||||
. URL::getHiddenInputs(
|
||||
$db
|
||||
)
|
||||
. '<input type="hidden" name="total_rows" value="' . $total_rows . '"/>';
|
||||
@ -641,7 +642,7 @@ function PMA_getHTMLforTableNavigation($total_rows, $pos, $db)
|
||||
if ($pos + $max_rows < $total_rows) {
|
||||
$table_navigation_html .= '<td>'
|
||||
. '<form action="db_central_columns.php" method="post">'
|
||||
. PMA_URL_getHiddenInputs(
|
||||
. URL::getHiddenInputs(
|
||||
$db
|
||||
)
|
||||
. '<input type="hidden" name="pos" value="' . ($pos + $max_rows) . '" />'
|
||||
@ -801,7 +802,7 @@ function PMA_getHTMLforAddCentralColumn($total_rows, $pos, $db)
|
||||
__('Add column')
|
||||
)
|
||||
. '<form id="add_column" action="db_central_columns.php" method="post">'
|
||||
. PMA_URL_getHiddenInputs(
|
||||
. URL::getHiddenInputs(
|
||||
$db
|
||||
)
|
||||
. '<input type="hidden" name="add_column" value="add">'
|
||||
@ -835,7 +836,7 @@ function PMA_getHTMLforCentralColumnsTableRow($row, $odd_row, $row_num, $db)
|
||||
{
|
||||
$tableHtml = '<tr data-rownum="' . $row_num . '" id="f_' . $row_num . '" '
|
||||
. 'class="' . ($odd_row ? 'odd' : 'even') . '">'
|
||||
. PMA_URL_getHiddenInputs(
|
||||
. URL::getHiddenInputs(
|
||||
$db
|
||||
)
|
||||
. '<input type="hidden" name="edit_save" value="save">'
|
||||
@ -1259,7 +1260,7 @@ function PMA_getHTMLforAddNewColumn($db)
|
||||
. '<span>+</span> ' . __('Add new column') . '</a>'
|
||||
. '<form id="add_new" style="min-width:100%;display:none" '
|
||||
. 'method="post" action="db_central_columns.php">'
|
||||
. PMA_URL_getHiddenInputs(
|
||||
. URL::getHiddenInputs(
|
||||
$db
|
||||
)
|
||||
. '<input type="hidden" name="add_new_column" value="add_new_column">'
|
||||
|
||||
@ -117,11 +117,6 @@ if (! defined('PMA_MINIMUM_COMMON') || defined('PMA_SETUP')) {
|
||||
* JavaScript escaping.
|
||||
*/
|
||||
include_once './libraries/js_escape.lib.php';
|
||||
|
||||
/**
|
||||
* Include URL/hidden inputs generating.
|
||||
*/
|
||||
include_once './libraries/url_generating.lib.php';
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
*/
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Displays top part of the form
|
||||
@ -37,8 +38,8 @@ function PMA_displayFormTop($action = null, $method = 'post', $hidden_fields = n
|
||||
$htmlOutput .= '<input type="hidden" name="check_page_refresh" '
|
||||
. ' id="check_page_refresh" value="" />' . "\n";
|
||||
}
|
||||
$htmlOutput .= PMA_URL_getHiddenInputs('', '', 0, 'server') . "\n";
|
||||
$htmlOutput .= PMA_getHiddenFields((array)$hidden_fields);
|
||||
$htmlOutput .= URL::getHiddenInputs('', '', 0, 'server') . "\n";
|
||||
$htmlOutput .= URL::getHiddenFields((array)$hidden_fields);
|
||||
return $htmlOutput;
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
*/
|
||||
namespace PMA\libraries\config;
|
||||
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Performs various compatibility, security and consistency checks on current config
|
||||
*
|
||||
@ -376,13 +378,13 @@ class ServerConfigChecks
|
||||
);
|
||||
$sAllowArbitraryServerWarn = sprintf(
|
||||
$sAllowArbitraryServerWarn,
|
||||
'[a@?page=form' . PMA_URL_getCommon(array(), 'html', '&')
|
||||
'[a@?page=form' . URL::getCommon(array(), 'html', '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]',
|
||||
'[a@?page=form' . PMA_URL_getCommon(array(), 'html', '&')
|
||||
'[a@?page=form' . URL::getCommon(array(), 'html', '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]',
|
||||
'[a@?page=form' . PMA_URL_getCommon(array(), 'html', '&')
|
||||
'[a@?page=form' . URL::getCommon(array(), 'html', '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]'
|
||||
);
|
||||
@ -398,7 +400,7 @@ class ServerConfigChecks
|
||||
);
|
||||
$sBZipDumpWarning = sprintf(
|
||||
$sBZipDumpWarning,
|
||||
'[a@?page=form' . PMA_URL_getCommon(array(), 'html', '&')
|
||||
'[a@?page=form' . URL::getCommon(array(), 'html', '&')
|
||||
. '&formset=Features#tab_Import_export]',
|
||||
'[/a]', '%s'
|
||||
);
|
||||
@ -413,7 +415,7 @@ class ServerConfigChecks
|
||||
);
|
||||
$sGZipDumpWarning = sprintf(
|
||||
$sGZipDumpWarning,
|
||||
'[a@?page=form' . PMA_URL_getCommon(array(), 'html', '&')
|
||||
'[a@?page=form' . URL::getCommon(array(), 'html', '&')
|
||||
. '&formset=Features#tab_Import_export]',
|
||||
'[/a]',
|
||||
'%s'
|
||||
@ -425,7 +427,7 @@ class ServerConfigChecks
|
||||
);
|
||||
$sLoginCookieValidityWarn = sprintf(
|
||||
$sLoginCookieValidityWarn,
|
||||
'[a@?page=form' . PMA_URL_getCommon(array(), 'html', '&')
|
||||
'[a@?page=form' . URL::getCommon(array(), 'html', '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]',
|
||||
'[a@' . PMA_getPHPDocLink(
|
||||
@ -441,7 +443,7 @@ class ServerConfigChecks
|
||||
);
|
||||
$sLoginCookieValidityWarn2 = sprintf(
|
||||
$sLoginCookieValidityWarn2,
|
||||
'[a@?page=form' . PMA_URL_getCommon(array(), 'html', '&')
|
||||
'[a@?page=form' . URL::getCommon(array(), 'html', '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]'
|
||||
);
|
||||
@ -452,10 +454,10 @@ class ServerConfigChecks
|
||||
);
|
||||
$sLoginCookieValidityWarn3 = sprintf(
|
||||
$sLoginCookieValidityWarn3,
|
||||
'[a@?page=form' . PMA_URL_getCommon(array(), 'html', '&')
|
||||
'[a@?page=form' . URL::getCommon(array(), 'html', '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]',
|
||||
'[a@?page=form' . PMA_URL_getCommon(array(), 'html', '&')
|
||||
'[a@?page=form' . URL::getCommon(array(), 'html', '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]'
|
||||
);
|
||||
@ -467,10 +469,10 @@ class ServerConfigChecks
|
||||
);
|
||||
$sSecurityInfoMsg = sprintf(
|
||||
$sSecurityInfoMsg,
|
||||
'[a@?page=servers' . PMA_URL_getCommon(array(), 'html', '&')
|
||||
'[a@?page=servers' . URL::getCommon(array(), 'html', '&')
|
||||
. '&mode=edit&id=%1$d#tab_Server_config]',
|
||||
'[/a]',
|
||||
'[a@?page=form' . PMA_URL_getCommon(array(), 'html', '&')
|
||||
'[a@?page=form' . URL::getCommon(array(), 'html', '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]'
|
||||
);
|
||||
@ -483,7 +485,7 @@ class ServerConfigChecks
|
||||
);
|
||||
$sServerAuthConfigMsg = sprintf(
|
||||
$sServerAuthConfigMsg,
|
||||
'[a@?page=servers' . PMA_URL_getCommon(array(), 'html', '&')
|
||||
'[a@?page=servers' . URL::getCommon(array(), 'html', '&')
|
||||
. '&mode=edit&id=%1$d#tab_Server]',
|
||||
'[/a]'
|
||||
);
|
||||
@ -493,7 +495,7 @@ class ServerConfigChecks
|
||||
);
|
||||
$sZipDumpExportWarn = sprintf(
|
||||
$sZipDumpExportWarn,
|
||||
'[a@?page=form' . PMA_URL_getCommon(array(), 'html', '&')
|
||||
'[a@?page=form' . URL::getCommon(array(), 'html', '&')
|
||||
. '&formset=Features#tab_Import_export]',
|
||||
'[/a]',
|
||||
'%s'
|
||||
@ -504,7 +506,7 @@ class ServerConfigChecks
|
||||
);
|
||||
$sZipDumpImportWarn = sprintf(
|
||||
$sZipDumpImportWarn,
|
||||
'[a@?page=form' . PMA_URL_getCommon(array(), 'html', '&')
|
||||
'[a@?page=form' . URL::getCommon(array(), 'html', '&')
|
||||
. '&formset=Features#tab_Import_export]',
|
||||
'[/a]',
|
||||
'%s'
|
||||
|
||||
@ -16,6 +16,7 @@ use PMA\libraries\RecentFavoriteTable;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Tracker;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
require_once 'libraries/mysql_charsets.inc.php';
|
||||
require_once 'libraries/display_create_table.lib.php';
|
||||
@ -343,7 +344,7 @@ class DatabaseStructureController extends DatabaseController
|
||||
public function multiSubmitAction()
|
||||
{
|
||||
$action = 'db_structure.php';
|
||||
$err_url = 'db_structure.php' . PMA_URL_getCommon(
|
||||
$err_url = 'db_structure.php' . URL::getCommon(
|
||||
array('db' => $this->db)
|
||||
);
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ use PMA\libraries\DatabaseInterface;
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Handles viewing binary logs
|
||||
@ -188,7 +189,7 @@ class ServerBinlogController extends Controller
|
||||
}
|
||||
|
||||
$html .= '<a href="server_binlog.php'
|
||||
. PMA_URL_getCommon($this_url_params) . '"';
|
||||
. URL::getCommon($this_url_params) . '"';
|
||||
if (Util::showIcons('TableNavigationLinksMode')) {
|
||||
$html .= ' title="' . _pgettext('Previous page', 'Previous') . '">';
|
||||
} else {
|
||||
@ -210,7 +211,7 @@ class ServerBinlogController extends Controller
|
||||
$tempTitle = __('Show Full Queries');
|
||||
$tempImgMode = 'full';
|
||||
}
|
||||
$html .= '<a href="server_binlog.php' . PMA_URL_getCommon($this_url_params)
|
||||
$html .= '<a href="server_binlog.php' . URL::getCommon($this_url_params)
|
||||
. '" title="' . $tempTitle . '">'
|
||||
. '<img src="' . $GLOBALS['pmaThemeImage'] . 's_' . $tempImgMode
|
||||
. 'text.png" alt="' . $tempTitle . '" /></a>';
|
||||
@ -221,7 +222,7 @@ class ServerBinlogController extends Controller
|
||||
$this_url_params = $url_params;
|
||||
$this_url_params['pos'] = $pos + $GLOBALS['cfg']['MaxRows'];
|
||||
$html .= ' - <a href="server_binlog.php'
|
||||
. PMA_URL_getCommon($this_url_params)
|
||||
. URL::getCommon($this_url_params)
|
||||
. '"';
|
||||
if (Util::showIcons('TableNavigationLinksMode')) {
|
||||
$html .= ' title="' . _pgettext('Next page', 'Next') . '">';
|
||||
@ -259,4 +260,4 @@ class ServerBinlogController extends Controller
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ use PMA\libraries\controllers\Controller;
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Handles viewing and creating and deleting databases
|
||||
@ -163,7 +164,7 @@ class ServerDatabasesController extends Controller
|
||||
'sql_query', Util::getMessage(null, $sql_query, 'success')
|
||||
);
|
||||
|
||||
$url_query = PMA_URL_getCommon(array('db' => $_POST['new_db']));
|
||||
$url_query = URL::getCommon(array('db' => $_POST['new_db']));
|
||||
$this->response->addJSON(
|
||||
'url_query',
|
||||
Util::getScriptNameForOption(
|
||||
@ -186,7 +187,7 @@ class ServerDatabasesController extends Controller
|
||||
$message = Message::error(__('No databases selected.'));
|
||||
} else {
|
||||
$action = 'server_databases.php';
|
||||
$err_url = $action . PMA_URL_getCommon();
|
||||
$err_url = $action . URL::getCommon();
|
||||
|
||||
$GLOBALS['submit_mult'] = 'drop_db';
|
||||
$GLOBALS['mult_btn'] = __('Yes');
|
||||
@ -279,7 +280,7 @@ class ServerDatabasesController extends Controller
|
||||
|
||||
$html .= '<form class="ajax" action="server_databases.php" ';
|
||||
$html .= 'method="post" name="dbStatsForm" id="dbStatsForm">' . "\n";
|
||||
$html .= PMA_URL_getHiddenInputs($_url_params);
|
||||
$html .= URL::getHiddenInputs($_url_params);
|
||||
|
||||
$_url_params['sort_by'] = 'SCHEMA_NAME';
|
||||
$_url_params['sort_order']
|
||||
|
||||
@ -13,6 +13,7 @@ use PMA\libraries\controllers\Controller;
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Handles viewing and editing server variables
|
||||
@ -254,7 +255,7 @@ class ServerVariablesController extends Controller
|
||||
*/
|
||||
private function _getHtmlForLinkTemplates()
|
||||
{
|
||||
$url = 'server_variables.php' . PMA_URL_getCommon();
|
||||
$url = 'server_variables.php' . URL::getCommon();
|
||||
return Template::get('server/variables/link_template')
|
||||
->render(array('url' => $url));
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ use PMA\libraries\controllers\TableController;
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\gis\GISVisualization;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/db_common.inc.php';
|
||||
@ -185,7 +186,7 @@ class TableGisVisualizationController extends TableController
|
||||
* Displays the page
|
||||
*/
|
||||
$this->url_params['sql_query'] = $this->sql_query;
|
||||
$downloadUrl = 'tbl_gis_visualization.php' . PMA_URL_getCommon(
|
||||
$downloadUrl = 'tbl_gis_visualization.php' . URL::getCommon(
|
||||
array_merge(
|
||||
$this->url_params,
|
||||
array(
|
||||
|
||||
@ -20,6 +20,7 @@ use SqlParser\Statements\CreateStatement;
|
||||
use SqlParser\Utils\Table as SqlTable;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\controllers\TableController;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
require_once 'libraries/mysql_charsets.inc.php';
|
||||
require_once 'libraries/transformations.lib.php';
|
||||
@ -826,7 +827,7 @@ class TableStructureController extends TableController
|
||||
*/
|
||||
protected function updateColumns()
|
||||
{
|
||||
$err_url = 'tbl_structure.php' . PMA_URL_getCommon(
|
||||
$err_url = 'tbl_structure.php' . URL::getCommon(
|
||||
array(
|
||||
'db' => $this->db, 'table' => $this->table
|
||||
)
|
||||
@ -1228,7 +1229,7 @@ class TableStructureController extends TableController
|
||||
);
|
||||
|
||||
$edit_view_url = 'view_create.php'
|
||||
. PMA_URL_getCommon($url_params) . '&'
|
||||
. URL::getCommon($url_params) . '&'
|
||||
. implode(
|
||||
'&',
|
||||
array_map(
|
||||
|
||||
@ -8,6 +8,8 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -493,7 +495,7 @@ function PMA_sendHeaderLocation($uri, $use_refresh = false)
|
||||
if (mb_strpos($uri, '?') === false) {
|
||||
$response->header('Location: ' . $uri . '?' . SID);
|
||||
} else {
|
||||
$separator = PMA_URL_getArgSeparator();
|
||||
$separator = URL::getArgSeparator();
|
||||
$response->header('Location: ' . $uri . $separator . SID);
|
||||
}
|
||||
return;
|
||||
@ -705,13 +707,10 @@ function PMA_linkURL($url)
|
||||
return $url;
|
||||
}
|
||||
|
||||
if (!function_exists('PMA_URL_getCommon')) {
|
||||
include_once './libraries/url_generating.lib.php';
|
||||
}
|
||||
$params = array();
|
||||
$params['url'] = $url;
|
||||
|
||||
$url = PMA_URL_getCommon($params);
|
||||
$url = URL::getCommon($params);
|
||||
//strip off token and such sensitive information. Just keep url.
|
||||
$arr = parse_url($url);
|
||||
parse_str($arr["query"], $vars);
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
*/
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -32,12 +33,12 @@ if ($db_is_system_schema) {
|
||||
/**
|
||||
* Defines the urls to return to in case of error in a sql statement
|
||||
*/
|
||||
$err_url_0 = 'index.php' . PMA_URL_getCommon();
|
||||
$err_url_0 = 'index.php' . URL::getCommon();
|
||||
|
||||
$err_url = PMA\libraries\Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. PMA_URL_getCommon(array('db' => $db));
|
||||
. URL::getCommon(array('db' => $db));
|
||||
|
||||
/**
|
||||
* Ensures the database exists (else move to the "parent" script) and displays
|
||||
@ -58,7 +59,7 @@ if (! isset($is_db) || ! $is_db) {
|
||||
}
|
||||
// Not a valid db name -> back to the welcome page
|
||||
$uri = './index.php'
|
||||
. PMA_URL_getCommon(array(), 'text')
|
||||
. URL::getCommon(array(), 'text')
|
||||
. (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1';
|
||||
if (!mb_strlen($db) || ! $is_db) {
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
@ -106,5 +107,5 @@ if (isset($_REQUEST['submitcollation'])
|
||||
/**
|
||||
* Set parameters for links
|
||||
*/
|
||||
$url_query = PMA_URL_getCommon(array('db' => $db));
|
||||
$url_query = URL::getCommon(array('db' => $db));
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -42,7 +43,7 @@ if (empty($is_db)) {
|
||||
}
|
||||
PMA_sendHeaderLocation(
|
||||
'./index.php'
|
||||
. PMA_URL_getCommon($url_params, 'text')
|
||||
. URL::getCommon($url_params, 'text')
|
||||
);
|
||||
}
|
||||
exit;
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Get HTML for the Change password dialog
|
||||
@ -32,7 +33,7 @@ function PMA_getHtmlForChangePassword($mode, $username, $hostname)
|
||||
. 'name="chgPassword" '
|
||||
. 'class="' . ($is_privileges ? 'submenu-item' : '') . '">';
|
||||
|
||||
$html .= PMA_URL_getHiddenInputs();
|
||||
$html .= URL::getHiddenInputs();
|
||||
|
||||
if (strpos($GLOBALS['PMA_PHP_SELF'], 'server_privileges') !== false) {
|
||||
$html .= '<input type="hidden" name="username" '
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\plugins\ExportPlugin;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Outputs appropriate checked statement for checkbox.
|
||||
@ -107,11 +108,11 @@ function PMA_getHtmlForHiddenInput(
|
||||
global $cfg;
|
||||
$html = "";
|
||||
if ($export_type == 'server') {
|
||||
$html .= PMA_URL_getHiddenInputs('', '', 1);
|
||||
$html .= URL::getHiddenInputs('', '', 1);
|
||||
} elseif ($export_type == 'database') {
|
||||
$html .= PMA_URL_getHiddenInputs($db, '', 1);
|
||||
$html .= URL::getHiddenInputs($db, '', 1);
|
||||
} else {
|
||||
$html .= PMA_URL_getHiddenInputs($db, $table, 1);
|
||||
$html .= URL::getHiddenInputs($db, $table, 1);
|
||||
}
|
||||
|
||||
// just to keep this value for possible next display of this form after saving
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
*/
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\plugins\ImportPlugin;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Prints Html For Display Import Hidden Input
|
||||
@ -24,11 +25,11 @@ function PMA_getHtmlForHiddenInputs($import_type, $db, $table)
|
||||
{
|
||||
$html = '';
|
||||
if ($import_type == 'server') {
|
||||
$html .= PMA_URL_getHiddenInputs('', '', 1);
|
||||
$html .= URL::getHiddenInputs('', '', 1);
|
||||
} elseif ($import_type == 'database') {
|
||||
$html .= PMA_URL_getHiddenInputs($db, '', 1);
|
||||
$html .= URL::getHiddenInputs($db, '', 1);
|
||||
} else {
|
||||
$html .= PMA_URL_getHiddenInputs($db, $table, 1);
|
||||
$html .= URL::getHiddenInputs($db, $table, 1);
|
||||
}
|
||||
$html .= ' <input type="hidden" name="import_type" value="'
|
||||
. $import_type . '" />' . "\n";
|
||||
@ -474,7 +475,7 @@ function PMA_getHtmlForImportWithPlugin($upload_id)
|
||||
{
|
||||
//some variable for javascript
|
||||
$ajax_url = "import_status.php?id=" . $upload_id . "&"
|
||||
. PMA_URL_getCommon(array('import_status'=>1), 'text');
|
||||
. URL::getCommon(array('import_status'=>1), 'text');
|
||||
$promot_str = PMA_jsFormat(
|
||||
__(
|
||||
'The file being uploaded is probably larger than '
|
||||
@ -492,7 +493,7 @@ function PMA_getHtmlForImportWithPlugin($upload_id)
|
||||
__('The file is being processed, please be patient.'),
|
||||
false
|
||||
);
|
||||
$import_url = PMA_URL_getCommon(array('import_status'=>1), 'text');
|
||||
$import_url = URL::getCommon(array('import_status'=>1), 'text');
|
||||
|
||||
//start output
|
||||
$html = 'var finished = false; ';
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\LanguageManager;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Returns HTML code for the language selector
|
||||
@ -31,7 +32,7 @@ function PMA_getLanguageSelectorHtml($use_fieldset = false, $show_doc = true)
|
||||
'db' => $GLOBALS['db'],
|
||||
'table' => $GLOBALS['table'],
|
||||
);
|
||||
$retval .= PMA_URL_getHiddenInputs($_form_params);
|
||||
$retval .= URL::getHiddenInputs($_form_params);
|
||||
|
||||
// For non-English, display "Language" with emphasis because it's
|
||||
// not a proper word in the current language; we show it to help
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -337,13 +338,13 @@ function PMA_getErrorReportForm()
|
||||
{
|
||||
$datas = array(
|
||||
'report_data' => PMA_getPrettyReportData(),
|
||||
'hidden_inputs' => PMA_URL_getHiddenInputs(),
|
||||
'hidden_inputs' => URL::getHiddenInputs(),
|
||||
'hidden_fields' => null,
|
||||
);
|
||||
|
||||
$reportData = PMA_getReportData();
|
||||
if (!empty($reportData)) {
|
||||
$datas['hidden_fields'] = PMA_getHiddenFields($reportData);
|
||||
$datas['hidden_fields'] = URL::getHiddenFields($reportData);
|
||||
}
|
||||
|
||||
return PMA\libraries\Template::get('error/report_form')
|
||||
|
||||
@ -10,6 +10,8 @@ use PMA\libraries\Message;
|
||||
use PMA\libraries\plugins\ExportPlugin;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\ZipFile;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
|
||||
/**
|
||||
* Sets a session variable upon a possible fatal error during export
|
||||
@ -475,11 +477,11 @@ function PMA_getHtmlForDisplayedExportHeader($export_type, $db, $table)
|
||||
*/
|
||||
$back_button = '<p>[ <a href="';
|
||||
if ($export_type == 'server') {
|
||||
$back_button .= 'server_export.php' . PMA_URL_getCommon();
|
||||
$back_button .= 'server_export.php' . URL::getCommon();
|
||||
} elseif ($export_type == 'database') {
|
||||
$back_button .= 'db_export.php' . PMA_URL_getCommon(array('db' => $db));
|
||||
$back_button .= 'db_export.php' . URL::getCommon(array('db' => $db));
|
||||
} else {
|
||||
$back_button .= 'tbl_export.php' . PMA_URL_getCommon(
|
||||
$back_button .= 'tbl_export.php' . URL::getCommon(
|
||||
array(
|
||||
'db' => $db, 'table' => $table
|
||||
)
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -1246,8 +1247,8 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
}
|
||||
|
||||
$params = array('db' => (string)$db_name);
|
||||
$db_url = 'db_structure.php' . PMA_URL_getCommon($params);
|
||||
$db_ops_url = 'db_operations.php' . PMA_URL_getCommon($params);
|
||||
$db_url = 'db_structure.php' . URL::getCommon($params);
|
||||
$db_ops_url = 'db_operations.php' . URL::getCommon($params);
|
||||
|
||||
$message = '<br /><br />';
|
||||
$message .= '<strong>' . __(
|
||||
@ -1287,9 +1288,9 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
'db' => (string) $db_name,
|
||||
'table' => (string) $tables[$i][TBL_NAME]
|
||||
);
|
||||
$tbl_url = 'sql.php' . PMA_URL_getCommon($params);
|
||||
$tbl_struct_url = 'tbl_structure.php' . PMA_URL_getCommon($params);
|
||||
$tbl_ops_url = 'tbl_operations.php' . PMA_URL_getCommon($params);
|
||||
$tbl_url = 'sql.php' . URL::getCommon($params);
|
||||
$tbl_struct_url = 'tbl_structure.php' . URL::getCommon($params);
|
||||
$tbl_ops_url = 'tbl_operations.php' . URL::getCommon($params);
|
||||
|
||||
unset($params);
|
||||
|
||||
@ -1469,7 +1470,7 @@ function PMA_getMatchedRows($analyzed_sql_results = array())
|
||||
'db' => $GLOBALS['db'],
|
||||
'sql_query' => $matched_row_query
|
||||
);
|
||||
$matched_rows_url = 'sql.php' . PMA_URL_getCommon($_url_params);
|
||||
$matched_rows_url = 'sql.php' . URL::getCommon($_url_params);
|
||||
|
||||
return array(
|
||||
'sql_query' => PMA\libraries\Util::formatSql($analyzed_sql_results['query']),
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Get HTML for display indexes
|
||||
@ -28,7 +29,7 @@ function PMA_getHtmlForDisplayIndexes()
|
||||
);
|
||||
$html_output .= '<fieldset class="tblFooters print_ignore" style="text-align: '
|
||||
. 'left;"><form action="tbl_indexes.php" method="post">';
|
||||
$html_output .= PMA_URL_getHiddenInputs(
|
||||
$html_output .= URL::getHiddenInputs(
|
||||
$GLOBALS['db'], $GLOBALS['table']
|
||||
);
|
||||
$html_output .= sprintf(
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
*/
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\plugins\TransformationsPlugin;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Retrieve form parameters for insert/edit form
|
||||
@ -222,12 +223,12 @@ function PMA_showTypeOrFunction($which, $url_params, $is_show)
|
||||
|
||||
if (! $is_show) {
|
||||
return ' : <a href="tbl_change.php'
|
||||
. PMA_URL_getCommon($this_url_params) . '">'
|
||||
. URL::getCommon($this_url_params) . '">'
|
||||
. PMA_showTypeOrFunctionLabel($which)
|
||||
. '</a>';
|
||||
}
|
||||
return '<th><a href="tbl_change.php'
|
||||
. PMA_URL_getCommon($this_url_params)
|
||||
. URL::getCommon($this_url_params)
|
||||
. '" title="' . __('Hide') . '">'
|
||||
. PMA_showTypeOrFunctionLabel($which)
|
||||
. '</a></th>';
|
||||
@ -675,7 +676,7 @@ function PMA_getForeignLink($column, $backup_field, $column_name_appendix,
|
||||
. 'value="' . htmlspecialchars($data) . '" />';
|
||||
|
||||
$html_output .= '<a class="ajax browse_foreign" href="browse_foreigners.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
@ -1377,7 +1378,7 @@ function PMA_getContinueInsertionForm($table, $db, $where_clause_array, $err_url
|
||||
{
|
||||
$html_output = '<form id="continueForm" method="post"'
|
||||
. ' action="tbl_replace.php" name="continueForm">'
|
||||
. PMA_URL_getHiddenInputs($db, $table)
|
||||
. URL::getHiddenInputs($db, $table)
|
||||
. '<input type="hidden" name="goto"'
|
||||
. ' value="' . htmlspecialchars($GLOBALS['goto']) . '" />'
|
||||
. '<input type="hidden" name="err_url"'
|
||||
@ -1890,7 +1891,7 @@ function PMA_getErrorUrl($url_params)
|
||||
if (isset($_REQUEST['err_url'])) {
|
||||
return $_REQUEST['err_url'];
|
||||
} else {
|
||||
return 'tbl_change.php' . PMA_URL_getCommon($url_params);
|
||||
return 'tbl_change.php' . URL::getCommon($url_params);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2084,7 +2085,7 @@ function PMA_getLinkForRelationalDisplayField($map, $relation_field,
|
||||
. $where_comparison
|
||||
);
|
||||
$output = '<a href="sql.php'
|
||||
. PMA_URL_getCommon($_url_params) . '"' . $title . '>';
|
||||
. URL::getCommon($_url_params) . '"' . $title . '>';
|
||||
|
||||
if ('D' == $_SESSION['tmpval']['relational_display']) {
|
||||
// user chose "relational display field" in the
|
||||
@ -2131,7 +2132,7 @@ function PMA_transformEditedValues($db, $table,
|
||||
: ''
|
||||
);
|
||||
$transform_options['wrapper_link']
|
||||
= PMA_URL_getCommon($_url_params);
|
||||
= URL::getCommon($_url_params);
|
||||
$class_name = PMA_getTransformationClassName($include_file);
|
||||
/** @var TransformationsPlugin $transformation_plugin */
|
||||
$transformation_plugin = new $class_name();
|
||||
@ -2846,7 +2847,7 @@ function PMA_getHtmlForInsertEditFormColumn($table_columns, $column_number,
|
||||
'where_clause' => $where_clause
|
||||
);
|
||||
$transformation_options['wrapper_link']
|
||||
= PMA_URL_getCommon($_url_params);
|
||||
= URL::getCommon($_url_params);
|
||||
$current_value = '';
|
||||
if (isset($current_row[$column['Field']])) {
|
||||
$current_value = $current_row[$column['Field']];
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Gets url params
|
||||
@ -323,7 +324,7 @@ function PMA_buildOrExecuteQueryForMulti(
|
||||
function PMA_getHtmlForCopyMultipleTables($action, $_url_params)
|
||||
{
|
||||
$html = '<form id="ajax_form" action="' . $action . '" method="post">';
|
||||
$html .= PMA_URL_getHiddenInputs($_url_params);
|
||||
$html .= URL::getHiddenInputs($_url_params);
|
||||
$html .= '<fieldset class = "input">';
|
||||
$databases_list = $GLOBALS['dblist']->databases;
|
||||
foreach ($databases_list as $key => $db_name)
|
||||
@ -368,7 +369,7 @@ function PMA_getHtmlForCopyMultipleTables($action, $_url_params)
|
||||
function PMA_getHtmlForReplacePrefixTable($action, $_url_params)
|
||||
{
|
||||
$html = '<form id="ajax_form" action="' . $action . '" method="post">';
|
||||
$html .= PMA_URL_getHiddenInputs($_url_params);
|
||||
$html .= URL::getHiddenInputs($_url_params);
|
||||
$html .= '<fieldset class = "input">';
|
||||
$html .= '<table>';
|
||||
$html .= '<tr>';
|
||||
@ -402,7 +403,7 @@ function PMA_getHtmlForReplacePrefixTable($action, $_url_params)
|
||||
function PMA_getHtmlForAddPrefixTable($action, $_url_params)
|
||||
{
|
||||
$html = '<form id="ajax_form" action="' . $action . '" method="post">';
|
||||
$html .= PMA_URL_getHiddenInputs($_url_params);
|
||||
$html .= URL::getHiddenInputs($_url_params);
|
||||
$html .= '<fieldset class = "input">';
|
||||
$html .= '<table>';
|
||||
$html .= '<tr>';
|
||||
@ -433,7 +434,7 @@ function PMA_getHtmlForAddPrefixTable($action, $_url_params)
|
||||
function PMA_getHtmlForOtherActions($what, $action, $_url_params, $full_query)
|
||||
{
|
||||
$html = '<form action="' . $action . '" method="post">';
|
||||
$html .= PMA_URL_getHiddenInputs($_url_params);
|
||||
$html .= URL::getHiddenInputs($_url_params);
|
||||
$html .= '<fieldset class="confirmation">';
|
||||
$html .= '<legend>';
|
||||
if ($what == 'drop_db') {
|
||||
|
||||
@ -12,6 +12,7 @@ use PMA\libraries\config\PageSettings;
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* The navigation panel - displays server, db and table selection tree
|
||||
@ -163,7 +164,7 @@ class Navigation
|
||||
{
|
||||
$html = '<form method="post" action="navigation.php" class="ajax">';
|
||||
$html .= '<fieldset>';
|
||||
$html .= PMA_URL_getHiddenInputs($dbName, $tableName);
|
||||
$html .= URL::getHiddenInputs($dbName, $tableName);
|
||||
|
||||
$navTable = Util::backquote($GLOBALS['cfgRelation']['db'])
|
||||
. "." . Util::backquote($GLOBALS['cfgRelation']['navigationhiding']);
|
||||
@ -209,7 +210,7 @@ class Navigation
|
||||
$html .= '<tr class="' . ($odd ? 'odd' : 'even') . '">';
|
||||
$html .= '<td>' . htmlspecialchars($hiddenItem) . '</td>';
|
||||
$html .= '<td style="width:80px"><a href="navigation.php'
|
||||
. PMA_URL_getCommon()
|
||||
. URL::getCommon()
|
||||
. '&unhideNavItem=true'
|
||||
. '&itemType=' . urlencode($t)
|
||||
. '&itemName=' . urlencode($hiddenItem)
|
||||
|
||||
@ -9,6 +9,7 @@ namespace PMA\libraries\navigation;
|
||||
|
||||
use PMA;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* This class renders the logo, links, server selection,
|
||||
@ -26,9 +27,9 @@ class NavigationHeader
|
||||
public function getDisplay()
|
||||
{
|
||||
if (empty($GLOBALS['url_query'])) {
|
||||
$GLOBALS['url_query'] = PMA_URL_getCommon();
|
||||
$GLOBALS['url_query'] = URL::getCommon();
|
||||
}
|
||||
$link_url = PMA_URL_getCommon(
|
||||
$link_url = URL::getCommon(
|
||||
array(
|
||||
'ajax_request' => true,
|
||||
)
|
||||
@ -124,7 +125,7 @@ class NavigationHeader
|
||||
PHP_URL_HOST
|
||||
);
|
||||
if (empty($host)) {
|
||||
$logoLink .= PMA_URL_getCommon();
|
||||
$logoLink .= URL::getCommon();
|
||||
} else {
|
||||
$linkAttriks = 'target="_blank"';
|
||||
}
|
||||
@ -157,7 +158,7 @@ class NavigationHeader
|
||||
$retval = '<!-- LINKS START -->';
|
||||
$retval .= '<div id="navipanellinks">';
|
||||
$retval .= PMA\libraries\Util::getNavigationLink(
|
||||
'index.php' . PMA_URL_getCommon(),
|
||||
'index.php' . URL::getCommon(),
|
||||
$showText,
|
||||
__('Home'),
|
||||
$showIcon,
|
||||
|
||||
@ -15,6 +15,7 @@ use PMA\libraries\navigation\nodes\NodeViewContainer;
|
||||
use PMA\libraries\RecentFavoriteTable;
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Displays a collapsible of database objects in the navigation frame
|
||||
@ -1262,7 +1263,7 @@ class NavigationTree
|
||||
);
|
||||
$retval .= '<div id="pma_navigation_db_select">';
|
||||
$retval .= '<form action="index.php">';
|
||||
$retval .= PMA_getHiddenFields($url_params);
|
||||
$retval .= URL::getHiddenFields($url_params);
|
||||
$retval .= '<select name="db" class="hide" id="navi_db_select">'
|
||||
. '<option value="" dir="' . $GLOBALS['text_dir'] . '">'
|
||||
. '(' . __('Databases') . ') ...</option>' . "\n";
|
||||
@ -1350,7 +1351,7 @@ class NavigationTree
|
||||
);
|
||||
$retval .= '<li class="fast_filter db_fast_filter">';
|
||||
$retval .= '<form class="ajax fast_filter">';
|
||||
$retval .= PMA_getHiddenFields($url_params);
|
||||
$retval .= URL::getHiddenFields($url_params);
|
||||
$retval .= '<input class="searchClause" type="text"';
|
||||
$retval .= ' name="searchClause" accesskey="q"';
|
||||
// allow html5 placeholder attribute
|
||||
@ -1389,7 +1390,7 @@ class NavigationTree
|
||||
);
|
||||
$retval .= "<li class='fast_filter'>";
|
||||
$retval .= "<form class='ajax fast_filter'>";
|
||||
$retval .= PMA_getHiddenFields($url_params);
|
||||
$retval .= URL::getHiddenFields($url_params);
|
||||
$retval .= "<input class='searchClause' type='text'";
|
||||
$retval .= " name='searchClause2'";
|
||||
// allow html5 placeholder attribute
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
namespace PMA\libraries\navigation\nodes;
|
||||
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Represents a database node in the navigation tree
|
||||
@ -688,7 +689,7 @@ class NodeDatabase extends Node
|
||||
if ($this->hiddenCount > 0) {
|
||||
$ret = '<span class="dbItemControls">'
|
||||
. '<a href="navigation.php'
|
||||
. PMA_URL_getCommon()
|
||||
. URL::getCommon()
|
||||
. '&showUnhideDialog=true'
|
||||
. '&dbName=' . urldecode($this->real_name) . '"'
|
||||
. ' class="showUnhide ajax">'
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
namespace PMA\libraries\navigation\nodes;
|
||||
|
||||
use PMA;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Represents a node that is a child of a database node
|
||||
@ -39,7 +40,7 @@ abstract class NodeDatabaseChild extends Node
|
||||
$item = $this->real_name;
|
||||
$ret = '<span class="navItemControls">'
|
||||
. '<a href="navigation.php'
|
||||
. PMA_URL_getCommon()
|
||||
. URL::getCommon()
|
||||
. '&hideNavItem=true'
|
||||
. '&itemType=' . urlencode($this->getItemType())
|
||||
. '&itemName=' . urlencode($item)
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
*/
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* build the html for columns of $colTypeCategory category
|
||||
@ -796,7 +797,7 @@ function PMA_getHtmlForNormalizetable()
|
||||
. 'name="normalize" '
|
||||
. 'id="normalizeTable" '
|
||||
. '>'
|
||||
. PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table'])
|
||||
. URL::getHiddenInputs($GLOBALS['db'], $GLOBALS['table'])
|
||||
. '<input type="hidden" name="step1" value="1">';
|
||||
$html_output .= '<fieldset>';
|
||||
$html_output .= '<legend>'
|
||||
|
||||
@ -13,6 +13,7 @@ use PMA\libraries\Response;
|
||||
use PMA\libraries\StorageEngine;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Get HTML output for database comment
|
||||
@ -25,7 +26,7 @@ function PMA_getHtmlForDatabaseComment($db)
|
||||
{
|
||||
$html_output = '<div class="operations_half_width">'
|
||||
. '<form method="post" action="db_operations.php" id="formDatabaseComment">'
|
||||
. PMA_URL_getHiddenInputs($db)
|
||||
. URL::getHiddenInputs($db)
|
||||
. '<fieldset>'
|
||||
. '<legend>';
|
||||
if (PMA\libraries\Util::showIcons('ActionLinksMode')) {
|
||||
@ -67,7 +68,7 @@ function PMA_getHtmlForRenameDatabase($db)
|
||||
}
|
||||
$html_output .= '<input type="hidden" name="what" value="data" />'
|
||||
. '<input type="hidden" name="db_rename" value="true" />'
|
||||
. PMA_URL_getHiddenInputs($db)
|
||||
. URL::getHiddenInputs($db)
|
||||
. '<fieldset>'
|
||||
. '<legend>';
|
||||
|
||||
@ -189,7 +190,7 @@ function PMA_getHtmlForCopyDatabase($db)
|
||||
. 'value="' . $_REQUEST['db_collation'] . '" />' . "\n";
|
||||
}
|
||||
$html_output .= '<input type="hidden" name="db_copy" value="true" />' . "\n"
|
||||
. PMA_URL_getHiddenInputs($db);
|
||||
. URL::getHiddenInputs($db);
|
||||
$html_output .= '<fieldset>'
|
||||
. '<legend>';
|
||||
|
||||
@ -276,7 +277,7 @@ function PMA_getHtmlForChangeDatabaseCharset($db, $table)
|
||||
$html_output .= 'class="ajax" ';
|
||||
$html_output .= 'method="post" action="db_operations.php">';
|
||||
|
||||
$html_output .= PMA_URL_getHiddenInputs($db, $table);
|
||||
$html_output .= URL::getHiddenInputs($db, $table);
|
||||
|
||||
$html_output .= '<fieldset>' . "\n"
|
||||
. ' <legend>';
|
||||
@ -770,7 +771,7 @@ function PMA_getHtmlForOrderTheTable($columns)
|
||||
$html_output = '<div class="operations_half_width">';
|
||||
$html_output .= '<form method="post" id="alterTableOrderby" '
|
||||
. 'action="tbl_operations.php">';
|
||||
$html_output .= PMA_URL_getHiddenInputs(
|
||||
$html_output .= URL::getHiddenInputs(
|
||||
$GLOBALS['db'], $GLOBALS['table']
|
||||
);
|
||||
$html_output .= '<fieldset id="fieldset_table_order">'
|
||||
@ -812,7 +813,7 @@ function PMA_getHtmlForMoveTable()
|
||||
$html_output .= '<form method="post" action="tbl_operations.php"'
|
||||
. ' id="moveTableForm" class="ajax"'
|
||||
. ' onsubmit="return emptyCheckTheField(this, \'new_name\')">'
|
||||
. PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
|
||||
. URL::getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
|
||||
|
||||
$html_output .= '<input type="hidden" name="reload" value="1" />'
|
||||
. '<input type="hidden" name="what" value="data" />'
|
||||
@ -898,7 +899,7 @@ function PMA_getTableOptionDiv($comment, $tbl_collation, $tbl_storage_engine,
|
||||
$html_output = '<div class="operations_half_width clearfloat">';
|
||||
$html_output .= '<form method="post" action="tbl_operations.php"';
|
||||
$html_output .= ' id="tableOptionsForm" class="ajax">';
|
||||
$html_output .= PMA_URL_getHiddenInputs(
|
||||
$html_output .= URL::getHiddenInputs(
|
||||
$GLOBALS['db'], $GLOBALS['table']
|
||||
);
|
||||
$html_output .= '<input type="hidden" name="reload" value="1" />';
|
||||
@ -1238,7 +1239,7 @@ function PMA_getHtmlForCopytable()
|
||||
. 'id="copyTable" '
|
||||
. ' class="ajax" '
|
||||
. 'onsubmit="return emptyCheckTheField(this, \'new_name\')">'
|
||||
. PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table'])
|
||||
. URL::getHiddenInputs($GLOBALS['db'], $GLOBALS['table'])
|
||||
. '<input type="hidden" name="reload" value="1" />';
|
||||
|
||||
$html_output .= '<fieldset>';
|
||||
@ -1499,7 +1500,7 @@ function PMA_getMaintainActionlink($action_message, $params, $url_params, $link)
|
||||
return '<li>'
|
||||
. '<a class="maintain_action ajax" '
|
||||
. 'href="sql.php'
|
||||
. PMA_URL_getCommon(array_merge($url_params, $params)) . '">'
|
||||
. URL::getCommon(array_merge($url_params, $params)) . '">'
|
||||
. $action_message
|
||||
. '</a>'
|
||||
. PMA\libraries\Util::showMySQLDocu($link)
|
||||
@ -1558,7 +1559,7 @@ function PMA_getHtmlForDeleteDataOrTable(
|
||||
function PMA_getDeleteDataOrTablelink($url_params, $syntax, $link, $htmlId)
|
||||
{
|
||||
return '<li><a '
|
||||
. 'href="sql.php' . PMA_URL_getCommon($url_params) . '"'
|
||||
. 'href="sql.php' . URL::getCommon($url_params) . '"'
|
||||
. ' id="' . $htmlId . '" class="ajax">'
|
||||
. $link . '</a>'
|
||||
. PMA\libraries\Util::showMySQLDocu($syntax)
|
||||
@ -1597,7 +1598,7 @@ function PMA_getHtmlForPartitionMaintenance($partition_names, $url_params)
|
||||
$html_output = '<div class="operations_half_width">'
|
||||
. '<form id="partitionsForm" class="ajax" '
|
||||
. 'method="post" action="tbl_operations.php" >'
|
||||
. PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table'])
|
||||
. URL::getHiddenInputs($GLOBALS['db'], $GLOBALS['table'])
|
||||
. '<fieldset>'
|
||||
. '<legend>'
|
||||
. __('Partition maintenance')
|
||||
@ -1634,7 +1635,7 @@ function PMA_getHtmlForPartitionMaintenance($partition_names, $url_params)
|
||||
$html_output .= '<div class="clearfloat" /><br />';
|
||||
|
||||
$html_output .= '<a href="sql.php'
|
||||
. PMA_URL_getCommon($this_url_params) . '">'
|
||||
. URL::getCommon($this_url_params) . '">'
|
||||
. __('Remove partitioning') . '</a>';
|
||||
|
||||
$html_output .= '</fieldset>'
|
||||
@ -1703,7 +1704,7 @@ function PMA_getHtmlForReferentialIntegrityCheck($foreign, $url_params)
|
||||
|
||||
$html_output .= '<li>'
|
||||
. '<a href="sql.php'
|
||||
. PMA_URL_getCommon($this_url_params)
|
||||
. URL::getCommon($this_url_params)
|
||||
. '">'
|
||||
. $master . ' -> ' . $arr['foreign_db'] . '.'
|
||||
. $arr['foreign_table'] . '.' . $arr['foreign_field']
|
||||
|
||||
@ -10,6 +10,7 @@ namespace PMA\libraries\plugins\auth;
|
||||
|
||||
use PMA\libraries\plugins\AuthenticationPlugin;
|
||||
use PMA;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Handles the config authentication method
|
||||
@ -158,7 +159,7 @@ class AuthenticationConfig extends AuthenticationPlugin
|
||||
$GLOBALS['cfg']['DefaultTabServer'],
|
||||
'server'
|
||||
)
|
||||
, PMA_URL_getCommon(array()) , '" class="button disableAjax">'
|
||||
, URL::getCommon(array()) , '" class="button disableAjax">'
|
||||
, __('Retry to connect')
|
||||
, '</a>' , "\n";
|
||||
echo '</td>
|
||||
|
||||
@ -14,6 +14,7 @@ use PMA\libraries\plugins\AuthenticationPlugin;
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\Util;
|
||||
use ReCaptcha\ReCaptcha;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Remember where to redirect the user
|
||||
@ -230,7 +231,7 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
}
|
||||
// do not generate a "server" hidden field as we want the "server"
|
||||
// drop-down to have priority
|
||||
echo PMA_URL_getHiddenInputs($_form_params, '', 0, 'server');
|
||||
echo URL::getHiddenInputs($_form_params, '', 0, 'server');
|
||||
echo '</fieldset>
|
||||
</form>';
|
||||
|
||||
@ -569,7 +570,7 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
->disable();
|
||||
|
||||
PMA_sendHeaderLocation(
|
||||
$redirect_url . PMA_URL_getCommon($url_params, 'text'),
|
||||
$redirect_url . URL::getCommon($url_params, 'text'),
|
||||
true
|
||||
);
|
||||
if (! defined('TESTSUITE')) {
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
namespace PMA\libraries\plugins\schema;
|
||||
|
||||
use PMA;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* This class is inherited by all schema classes
|
||||
@ -293,7 +294,7 @@ class ExportRelationSchema
|
||||
echo ' ' , $error_message , "\n";
|
||||
echo '</p>' , "\n";
|
||||
echo '<a href="db_designer.php'
|
||||
, PMA_URL_getCommon(array('db' => $GLOBALS['db']))
|
||||
, URL::getCommon(array('db' => $GLOBALS['db']))
|
||||
, '&page=' . htmlspecialchars($pageNumber) , '">' , __('Back') , '</a>';
|
||||
echo "\n";
|
||||
exit;
|
||||
|
||||
@ -9,6 +9,7 @@ use PMA\libraries\Message;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\RecentFavoriteTable;
|
||||
use SqlParser\Statements\CreateStatement;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Executes a query as controluser if possible, otherwise as normal user
|
||||
@ -1971,7 +1972,7 @@ function PMA_getHtmlFixPMATables($allTables, $createDb = false)
|
||||
{
|
||||
$retval = '';
|
||||
|
||||
$url_query = PMA_URL_getCommon(array('db' => $GLOBALS['db']));
|
||||
$url_query = URL::getCommon(array('db' => $GLOBALS['db']));
|
||||
if ($allTables) {
|
||||
if ($createDb) {
|
||||
$url_query .= '&goto=db_operations.php&create_pmadb=1';
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* returns HTML for error message
|
||||
@ -59,7 +60,7 @@ function PMA_getHtmlForMasterReplication()
|
||||
$_url_params['repl_clear_scr'] = true;
|
||||
|
||||
$html .= ' <li><a href="server_replication.php';
|
||||
$html .= PMA_URL_getCommon($_url_params)
|
||||
$html .= URL::getCommon($_url_params)
|
||||
. '" id="master_addslaveuser_href">';
|
||||
$html .= __('Add slave replication user') . '</a></li>';
|
||||
}
|
||||
@ -116,7 +117,7 @@ function PMA_getHtmlForMasterConfiguration()
|
||||
$html .= '</fieldset>';
|
||||
$html .= '<fieldset class="tblFooters">';
|
||||
$html .= ' <form method="post" action="server_replication.php" >';
|
||||
$html .= PMA_URL_getHiddenInputs('', '');
|
||||
$html .= URL::getHiddenInputs('', '');
|
||||
$html .= ' <input type="submit" value="' . __('Go') . '" id="goButton" />';
|
||||
$html .= ' </form>';
|
||||
$html .= '</fieldset>';
|
||||
@ -146,7 +147,7 @@ function PMA_getHtmlForSlaveConfiguration(
|
||||
if ($server_slave_multi_replication) {
|
||||
$html .= __('Master connection:');
|
||||
$html .= '<form method="get" action="server_replication.php">';
|
||||
$html .= PMA_URL_getHiddenInputs($GLOBALS['url_params']);
|
||||
$html .= URL::getHiddenInputs($GLOBALS['url_params']);
|
||||
$html .= ' <select name="master_connection">';
|
||||
$html .= '<option value="">' . __('Default') . '</option>';
|
||||
foreach ($server_slave_multi_replication as $server) {
|
||||
@ -175,7 +176,7 @@ function PMA_getHtmlForSlaveConfiguration(
|
||||
|
||||
$_url_params['sr_slave_control_parm'] = 'IO_THREAD';
|
||||
$slave_control_io_link = 'server_replication.php'
|
||||
. PMA_URL_getCommon($_url_params);
|
||||
. URL::getCommon($_url_params);
|
||||
|
||||
if ($server_slave_replication[0]['Slave_SQL_Running'] == 'No') {
|
||||
$_url_params['sr_slave_action'] = 'start';
|
||||
@ -185,7 +186,7 @@ function PMA_getHtmlForSlaveConfiguration(
|
||||
|
||||
$_url_params['sr_slave_control_parm'] = 'SQL_THREAD';
|
||||
$slave_control_sql_link = 'server_replication.php'
|
||||
. PMA_URL_getCommon($_url_params);
|
||||
. URL::getCommon($_url_params);
|
||||
|
||||
if ($server_slave_replication[0]['Slave_IO_Running'] == 'No'
|
||||
|| $server_slave_replication[0]['Slave_SQL_Running'] == 'No'
|
||||
@ -197,17 +198,17 @@ function PMA_getHtmlForSlaveConfiguration(
|
||||
|
||||
$_url_params['sr_slave_control_parm'] = null;
|
||||
$slave_control_full_link = 'server_replication.php'
|
||||
. PMA_URL_getCommon($_url_params);
|
||||
. URL::getCommon($_url_params);
|
||||
|
||||
$_url_params['sr_slave_action'] = 'reset';
|
||||
$slave_control_reset_link = 'server_replication.php'
|
||||
. PMA_URL_getCommon($_url_params);
|
||||
. URL::getCommon($_url_params);
|
||||
|
||||
$_url_params = $GLOBALS['url_params'];
|
||||
$_url_params['sr_take_action'] = true;
|
||||
$_url_params['sr_slave_skip_error'] = true;
|
||||
$slave_skip_error_link = 'server_replication.php'
|
||||
. PMA_URL_getCommon($_url_params);
|
||||
. URL::getCommon($_url_params);
|
||||
|
||||
if ($server_slave_replication[0]['Slave_SQL_Running'] == 'No') {
|
||||
$html .= Message::error(
|
||||
@ -225,7 +226,7 @@ function PMA_getHtmlForSlaveConfiguration(
|
||||
$_url_params['repl_clear_scr'] = true;
|
||||
|
||||
$reconfiguremaster_link = 'server_replication.php'
|
||||
. PMA_URL_getCommon($_url_params);
|
||||
. URL::getCommon($_url_params);
|
||||
|
||||
$html .= __(
|
||||
'Server is configured as slave in a replication process. Would you ' .
|
||||
@ -285,7 +286,7 @@ function PMA_getHtmlForSlaveConfiguration(
|
||||
'This server is not configured as slave in a replication process. '
|
||||
. 'Would you like to <a href="%s">configure</a> it?'
|
||||
),
|
||||
'server_replication.php' . PMA_URL_getCommon($_url_params)
|
||||
'server_replication.php' . URL::getCommon($_url_params)
|
||||
);
|
||||
}
|
||||
$html .= '</fieldset>';
|
||||
@ -314,7 +315,7 @@ function PMA_getHtmlForSlaveErrorManagement($slave_skip_error_link)
|
||||
$html .= __('Skip current error') . '</a></li>';
|
||||
$html .= ' <li>';
|
||||
$html .= ' <form method="post" action="server_replication.php">';
|
||||
$html .= PMA_URL_getHiddenInputs('', '');
|
||||
$html .= URL::getHiddenInputs('', '');
|
||||
$html .= sprintf(
|
||||
__('Skip next %s errors.'),
|
||||
'<input type="text" name="sr_skip_errors_count" value="1" '
|
||||
@ -346,7 +347,7 @@ function PMA_getHtmlForNotServerReplication()
|
||||
'This server is not configured as master in a replication process. '
|
||||
. 'Would you like to <a href="%s">configure</a> it?'
|
||||
),
|
||||
'server_replication.php' . PMA_URL_getCommon($_url_params)
|
||||
'server_replication.php' . URL::getCommon($_url_params)
|
||||
);
|
||||
$html .= '</fieldset>';
|
||||
return $html;
|
||||
@ -395,7 +396,7 @@ function PMA_getHtmlForReplicationChangeMaster($submitname)
|
||||
= PMA_replicationGetUsernameHostnameLength();
|
||||
|
||||
$html .= '<form method="post" action="server_replication.php">';
|
||||
$html .= PMA_URL_getHiddenInputs('', '');
|
||||
$html .= URL::getHiddenInputs('', '');
|
||||
$html .= ' <fieldset id="fieldset_add_user_login">';
|
||||
$html .= ' <legend>' . __('Slave configuration');
|
||||
$html .= ' - ' . __('Change or reconfigure master server') . '</legend>';
|
||||
@ -694,7 +695,7 @@ function PMA_getHtmlForReplicationMasterAddSlaveuser()
|
||||
$html .= '<form autocomplete="off" method="post" ';
|
||||
$html .= 'action="server_privileges.php"';
|
||||
$html .= ' onsubmit="return checkAddUser(this);">';
|
||||
$html .= PMA_URL_getHiddenInputs('', '');
|
||||
$html .= URL::getHiddenInputs('', '');
|
||||
$html .= '<fieldset id="fieldset_add_user_login">'
|
||||
. '<legend>' . __('Add slave replication user') . '</legend>'
|
||||
. PMA_getHtmlForAddUserLoginForm($username_length)
|
||||
@ -962,7 +963,7 @@ function PMA_handleControlRequest()
|
||||
} else {
|
||||
PMA_sendHeaderLocation(
|
||||
'./server_replication.php'
|
||||
. PMA_URL_getCommon($GLOBALS['url_params'], 'text')
|
||||
. URL::getCommon($GLOBALS['url_params'], 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -382,7 +383,7 @@ function PMA_EVN_getEditorForm($mode, $operation, $item)
|
||||
$retval .= "<form class='rte_form' action='db_events.php' method='post'>\n";
|
||||
$retval .= "<input name='{$mode}_item' type='hidden' value='1' />\n";
|
||||
$retval .= $original_data;
|
||||
$retval .= PMA_URL_getHiddenInputs($db, $table) . "\n";
|
||||
$retval .= URL::getHiddenInputs($db, $table) . "\n";
|
||||
$retval .= "<fieldset>\n";
|
||||
$retval .= "<legend>" . __('Details') . "</legend>\n";
|
||||
$retval .= "<table class='rte_table' style='width: 100%'>\n";
|
||||
|
||||
@ -6,6 +6,8 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use SqlParser\Statements\CreateStatement;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -56,7 +58,7 @@ function PMA_RTE_getList($type, $items)
|
||||
break;
|
||||
}
|
||||
$retval .= '">';
|
||||
$retval .= PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
|
||||
$retval .= URL::getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
|
||||
$retval .= "<fieldset>\n";
|
||||
$retval .= " <legend>\n";
|
||||
$retval .= " " . PMA_RTE_getWord('title') . "\n";
|
||||
|
||||
@ -5,6 +5,8 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
@ -50,7 +52,7 @@ if ($GLOBALS['is_ajax_request'] != true) {
|
||||
if (mb_strlen($db)) {
|
||||
$GLOBALS['dbi']->selectDb($db);
|
||||
if (! isset($url_query)) {
|
||||
$url_query = PMA_URL_getCommon(
|
||||
$url_query = URL::getCommon(
|
||||
array(
|
||||
'db' => $db, 'table' => $table
|
||||
)
|
||||
|
||||
@ -9,6 +9,7 @@ use PMA\libraries\Message;
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\Util;
|
||||
use SqlParser\Statements\CreateStatement;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -877,7 +878,7 @@ function PMA_RTN_getEditorForm($mode, $operation, $routine)
|
||||
$retval .= "<form class='rte_form' action='db_routines.php' method='post'>\n";
|
||||
$retval .= "<input name='{$mode}_item' type='hidden' value='1' />\n";
|
||||
$retval .= $original_routine;
|
||||
$retval .= PMA_URL_getHiddenInputs($db) . "\n";
|
||||
$retval .= URL::getHiddenInputs($db) . "\n";
|
||||
$retval .= "<fieldset>\n";
|
||||
$retval .= "<legend>" . __('Details') . "</legend>\n";
|
||||
$retval .= "<table class='rte_table' style='width: 100%'>\n";
|
||||
@ -1567,7 +1568,7 @@ function PMA_RTN_getExecuteForm($routine)
|
||||
$retval .= " value='{$routine['item_name']}' />\n";
|
||||
$retval .= "<input type='hidden' name='item_type'\n";
|
||||
$retval .= " value='{$routine['item_type']}' />\n";
|
||||
$retval .= PMA_URL_getHiddenInputs($db) . "\n";
|
||||
$retval .= URL::getHiddenInputs($db) . "\n";
|
||||
$retval .= "<fieldset>\n";
|
||||
if ($GLOBALS['is_ajax_request'] != true) {
|
||||
$retval .= "<legend>{$routine['item_name']}</legend>\n";
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -320,7 +321,7 @@ function PMA_TRI_getEditorForm($mode, $item)
|
||||
$retval .= "<form class='rte_form' action='db_triggers.php' method='post'>\n";
|
||||
$retval .= "<input name='{$mode}_item' type='hidden' value='1' />\n";
|
||||
$retval .= $original_data;
|
||||
$retval .= PMA_URL_getHiddenInputs($db, $table) . "\n";
|
||||
$retval .= URL::getHiddenInputs($db, $table) . "\n";
|
||||
$retval .= "<fieldset>\n";
|
||||
$retval .= "<legend>" . __('Details') . "</legend>\n";
|
||||
$retval .= "<table class='rte_table' style='width: 100%'>\n";
|
||||
|
||||
@ -14,6 +14,8 @@
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
function PMA_selectServer($not_only_options, $omit_fieldset)
|
||||
{
|
||||
$retval = '';
|
||||
@ -86,7 +88,7 @@ function PMA_selectServer($not_only_options, $omit_fieldset)
|
||||
. PMA\libraries\Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabServer'], 'server'
|
||||
)
|
||||
. PMA_URL_getCommon(array('server' => $key))
|
||||
. URL::getCommon(array('server' => $key))
|
||||
. '" >' . htmlspecialchars($label) . '</a>';
|
||||
}
|
||||
$retval .= '</li>';
|
||||
|
||||
@ -5,6 +5,8 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
@ -22,7 +24,7 @@ if (empty($viewing_mode)) {
|
||||
/**
|
||||
* Set parameters for links
|
||||
*/
|
||||
$GLOBALS['url_query'] = PMA_URL_getCommon(array('db' => $db));
|
||||
$GLOBALS['url_query'] = URL::getCommon(array('db' => $db));
|
||||
|
||||
/**
|
||||
* Defines the urls to return to in case of error in a sql statement
|
||||
|
||||
@ -9,6 +9,7 @@ use PMA\libraries\DatabaseInterface;
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Get Html for User Group Dialog
|
||||
@ -522,7 +523,7 @@ function PMA_getHtmlToChooseUserGroup($username)
|
||||
$html_output = '<form class="ajax" id="changeUserGroupForm"'
|
||||
. ' action="server_privileges.php" method="post">';
|
||||
$params = array('username' => $username);
|
||||
$html_output .= PMA_URL_getHiddenInputs($params);
|
||||
$html_output .= URL::getHiddenInputs($params);
|
||||
$html_output .= '<fieldset id="fieldset_user_group_selection">';
|
||||
$html_output .= '<legend>' . __('User group') . '</legend>';
|
||||
|
||||
@ -2299,7 +2300,7 @@ function PMA_getHtmlForAddUser($dbname)
|
||||
. '<form name="usersForm" id="addUsersForm"'
|
||||
. ' onsubmit="return checkAddUser(this);"'
|
||||
. ' action="server_privileges.php" method="post" autocomplete="off" >' . "\n"
|
||||
. PMA_URL_getHiddenInputs('', '')
|
||||
. URL::getHiddenInputs('', '')
|
||||
. PMA_getHtmlForLoginInformationFields('new');
|
||||
|
||||
$html_output .= '<fieldset id="fieldset_add_user_database">' . "\n"
|
||||
@ -2481,7 +2482,7 @@ function PMA_getHtmlForSpecificDbPrivileges($db)
|
||||
if ($GLOBALS['is_superuser']) {
|
||||
// check the privileges for a particular database.
|
||||
$html_output = '<form id="usersForm" action="server_privileges.php">';
|
||||
$html_output .= PMA_URL_getHiddenInputs($db);
|
||||
$html_output .= URL::getHiddenInputs($db);
|
||||
$html_output .= '<fieldset>';
|
||||
$html_output .= '<legend>' . "\n"
|
||||
. Util::getIcon('b_usrcheck.png')
|
||||
@ -2491,7 +2492,7 @@ function PMA_getHtmlForSpecificDbPrivileges($db)
|
||||
'<a href="' . Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. PMA_URL_getCommon(array('db' => $db)) . '">'
|
||||
. URL::getCommon(array('db' => $db)) . '">'
|
||||
. htmlspecialchars($db)
|
||||
. '</a>'
|
||||
)
|
||||
@ -2548,7 +2549,7 @@ function PMA_getHtmlForSpecificTablePrivileges($db, $table)
|
||||
if ($GLOBALS['is_superuser']) {
|
||||
// check the privileges for a particular table.
|
||||
$html_output = '<form id="usersForm" action="server_privileges.php">';
|
||||
$html_output .= PMA_URL_getHiddenInputs($db, $table);
|
||||
$html_output .= URL::getHiddenInputs($db, $table);
|
||||
$html_output .= '<fieldset>';
|
||||
$html_output .= '<legend>'
|
||||
. Util::getIcon('b_usrcheck.png')
|
||||
@ -2557,7 +2558,7 @@ function PMA_getHtmlForSpecificTablePrivileges($db, $table)
|
||||
'<a href="' . Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
@ -2927,7 +2928,7 @@ function PMA_getUserLink(
|
||||
}
|
||||
|
||||
$html .= ' href="server_privileges.php'
|
||||
. PMA_URL_getCommon($params)
|
||||
. URL::getCommon($params)
|
||||
. '">';
|
||||
|
||||
switch($linktype) {
|
||||
@ -2957,7 +2958,7 @@ function PMA_getUserGroupEditLink($username)
|
||||
{
|
||||
return '<a class="edit_user_group_anchor ajax"'
|
||||
. ' href="server_privileges.php'
|
||||
. PMA_URL_getCommon(array('username' => $username))
|
||||
. URL::getCommon(array('username' => $username))
|
||||
. '">'
|
||||
. Util::getIcon('b_usrlist.png', __('Edit user group'))
|
||||
. '</a>';
|
||||
@ -3096,7 +3097,7 @@ function PMA_getExtraDataForAjaxBehavior(
|
||||
mb_substr($username, 0, 1)
|
||||
);
|
||||
$newUserInitialString = '<a href="server_privileges.php'
|
||||
. PMA_URL_getCommon(array('initial' => $new_user_initial)) . '">'
|
||||
. URL::getCommon(array('initial' => $new_user_initial)) . '">'
|
||||
. $new_user_initial . '</a>';
|
||||
$extra_data['new_user_initial'] = $new_user_initial;
|
||||
$extra_data['new_user_initial_string'] = $newUserInitialString;
|
||||
@ -3155,7 +3156,7 @@ function PMA_getChangeLoginInformationHtmlForm($username, $hostname)
|
||||
$html_output = '<form action="server_privileges.php" '
|
||||
. 'onsubmit="return checkAddUser(this);" '
|
||||
. 'method="post" class="copyUserForm submenu-item">' . "\n"
|
||||
. PMA_URL_getHiddenInputs('', '')
|
||||
. URL::getHiddenInputs('', '')
|
||||
. '<input type="hidden" name="old_username" '
|
||||
. 'value="' . htmlspecialchars($username) . '" />' . "\n"
|
||||
. '<input type="hidden" name="old_hostname" '
|
||||
@ -3201,7 +3202,7 @@ function PMA_getLinkToDbAndTable($url_dbname, $dbname, $tablename)
|
||||
. ' <a href="' . Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'db' => $url_dbname,
|
||||
'reload' => 1
|
||||
@ -3219,7 +3220,7 @@ function PMA_getLinkToDbAndTable($url_dbname, $dbname, $tablename)
|
||||
. Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'db' => $url_dbname,
|
||||
'table' => $tablename,
|
||||
@ -3574,7 +3575,7 @@ function PMA_getUsersOverview($result, $db_rights, $pmaThemeImage, $text_dir)
|
||||
$html_output
|
||||
= '<form name="usersForm" id="usersForm" action="server_privileges.php" '
|
||||
. 'method="post">' . "\n"
|
||||
. PMA_URL_getHiddenInputs('', '')
|
||||
. URL::getHiddenInputs('', '')
|
||||
. '<table id="tableuserrights" class="data">' . "\n"
|
||||
. '<thead>' . "\n"
|
||||
. '<tr><th></th>' . "\n"
|
||||
@ -3856,14 +3857,14 @@ function PMA_getHtmlForInitials($array_initials)
|
||||
&& $_REQUEST['initial'] === $tmp_initial
|
||||
) ? ' active' : '')
|
||||
. '" href="server_privileges.php'
|
||||
. PMA_URL_getCommon(array('initial' => $tmp_initial))
|
||||
. URL::getCommon(array('initial' => $tmp_initial))
|
||||
. '">' . $tmp_initial
|
||||
. '</a>'
|
||||
. '</td>' . "\n";
|
||||
}
|
||||
$html_output .= '<td>'
|
||||
. '<a href="server_privileges.php'
|
||||
. PMA_URL_getCommon(array('showall' => 1))
|
||||
. URL::getCommon(array('showall' => 1))
|
||||
. '" class="nowrap">' . __('Show all') . '</a></td>' . "\n";
|
||||
$html_output .= '</tr></table>';
|
||||
|
||||
@ -4586,9 +4587,9 @@ function PMA_getAddUserHtmlFieldset($db = '', $table = '')
|
||||
return '<fieldset id="fieldset_add_user">' . "\n"
|
||||
. '<legend>' . _pgettext('Create new user', 'New') . '</legend>'
|
||||
. '<a id="add_user_anchor" href="server_privileges.php'
|
||||
. PMA_URL_getCommon($url_params) . '" '
|
||||
. URL::getCommon($url_params) . '" '
|
||||
. (!empty($rel_params)
|
||||
? ('rel="' . PMA_URL_getCommon($rel_params) . '" ')
|
||||
? ('rel="' . URL::getCommon($rel_params) . '" ')
|
||||
: '')
|
||||
. '>' . "\n"
|
||||
. Util::getIcon('b_usradd.png')
|
||||
@ -4619,7 +4620,7 @@ function PMA_getHtmlHeaderForUserProperties(
|
||||
if (! empty($dbname)) {
|
||||
$html_output .= ' <i><a class="edit_user_anchor"'
|
||||
. ' href="server_privileges.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'username' => $username,
|
||||
'hostname' => $hostname,
|
||||
@ -4637,7 +4638,7 @@ function PMA_getHtmlHeaderForUserProperties(
|
||||
? __('Databases') : __('Database');
|
||||
if (! empty($_REQUEST['tablename'])) {
|
||||
$html_output .= ' <i><a href="server_privileges.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'username' => $username,
|
||||
'hostname' => $hostname,
|
||||
@ -4652,7 +4653,7 @@ function PMA_getHtmlHeaderForUserProperties(
|
||||
. ' <i>' . htmlspecialchars($tablename) . '</i>';
|
||||
} elseif (! empty($_REQUEST['routinename'])) {
|
||||
$html_output .= ' <i><a href="server_privileges.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'username' => $username,
|
||||
'hostname' => $hostname,
|
||||
@ -4826,7 +4827,7 @@ function PMA_getHtmlForUserOverview($pmaThemeImage, $text_dir)
|
||||
Message::NOTICE
|
||||
);
|
||||
$flushLink = '<a href="server_privileges.php'
|
||||
. PMA_URL_getCommon(array('flush_privileges' => 1))
|
||||
. URL::getCommon(array('flush_privileges' => 1))
|
||||
. '" id="reload_privileges_anchor">';
|
||||
$flushnote->addParam(
|
||||
$flushLink,
|
||||
@ -4906,7 +4907,7 @@ function PMA_getHtmlForUserProperties($dbname_is_wildcard,$url_dbname,
|
||||
|
||||
$html_output .= '<form class="submenu-item" name="usersForm" '
|
||||
. 'id="addUsersForm" action="server_privileges.php" method="post">' . "\n";
|
||||
$html_output .= PMA_URL_getHiddenInputs($_params);
|
||||
$html_output .= URL::getHiddenInputs($_params);
|
||||
$html_output .= PMA_getHtmlToDisplayPrivilegesTable(
|
||||
// If $dbname is an array, pass any one db as all have same privs.
|
||||
PMA_ifSetOr($dbname, (is_array($dbname)) ? $dbname[0] : '*', 'length'),
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\ServerStatusData;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Prints html for auto refreshing processes list
|
||||
@ -51,11 +52,11 @@ function PMA_getHtmlForServerProcesslist()
|
||||
$show_full_sql = ! empty($_REQUEST['full']);
|
||||
if ($show_full_sql) {
|
||||
$url_params['full'] = 1;
|
||||
$full_text_link = 'server_status_processes.php' . PMA_URL_getCommon(
|
||||
$full_text_link = 'server_status_processes.php' . URL::getCommon(
|
||||
array(), 'html', '?'
|
||||
);
|
||||
} else {
|
||||
$full_text_link = 'server_status_processes.php' . PMA_URL_getCommon(
|
||||
$full_text_link = 'server_status_processes.php' . URL::getCommon(
|
||||
array('full' => 1)
|
||||
);
|
||||
}
|
||||
@ -142,7 +143,7 @@ function PMA_getHtmlForServerProcesslist()
|
||||
}
|
||||
|
||||
$retval .= '<th>';
|
||||
$columnUrl = PMA_URL_getCommon($column);
|
||||
$columnUrl = URL::getCommon($column);
|
||||
$retval .= '<a href="server_status_processes.php' . $columnUrl . '" ';
|
||||
if ($is_sorted) {
|
||||
$retval .= 'onmouseout="$(\'.soimg\').toggle()" '
|
||||
@ -231,7 +232,7 @@ function PMA_getHtmlForProcessListFilter()
|
||||
$retval .= '<fieldset id="tableFilter">';
|
||||
$retval .= '<legend>' . __('Filters') . '</legend>';
|
||||
$retval .= '<form action="server_status_processes.php'
|
||||
. PMA_URL_getCommon($url_params) . '">';
|
||||
. URL::getCommon($url_params) . '">';
|
||||
$retval .= '<input type="submit" value="' . __('Refresh') . '" />';
|
||||
$retval .= '<div class="formelement">';
|
||||
$retval .= '<input' . $showExecuting . ' type="checkbox" name="showExecuting"'
|
||||
@ -275,7 +276,7 @@ function PMA_getHtmlForServerProcessItem($process, $odd_row, $show_full_sql)
|
||||
'kill' => $process['Id'],
|
||||
'ajax_request' => true
|
||||
);
|
||||
$kill_process = 'server_status_processes.php' . PMA_URL_getCommon($url_params);
|
||||
$kill_process = 'server_status_processes.php' . URL::getCommon($url_params);
|
||||
|
||||
$retval = '<tr class="' . ($odd_row ? 'odd' : 'even') . '">';
|
||||
$retval .= '<td><a class="ajax kill_process" href="' . $kill_process . '">'
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\ServerStatusData;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Returns the html for the list filter
|
||||
@ -35,7 +36,7 @@ function PMA_getHtmlForFilter($ServerStatusData)
|
||||
$retval .= '<fieldset id="tableFilter">';
|
||||
$retval .= '<legend>' . __('Filters') . '</legend>';
|
||||
$retval .= '<form action="server_status_variables.php'
|
||||
. PMA_URL_getCommon() . '">';
|
||||
. URL::getCommon() . '">';
|
||||
$retval .= '<input type="submit" value="' . __('Refresh') . '" />';
|
||||
$retval .= '<div class="formelement">';
|
||||
$retval .= '<label for="filterText">' . __('Containing the word:') . '</label>';
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Return HTML to list the users belonging to a given user group
|
||||
@ -68,7 +69,7 @@ function PMA_getHtmlForUserGroupsTable()
|
||||
if ($result && $GLOBALS['dbi']->numRows($result)) {
|
||||
$html_output .= '<form name="userGroupsForm" id="userGroupsForm"'
|
||||
. ' action="server_privileges.php" method="post">';
|
||||
$html_output .= PMA_URL_getHiddenInputs();
|
||||
$html_output .= URL::getHiddenInputs();
|
||||
$html_output .= '<table id="userGroupsTable">';
|
||||
$html_output .= '<thead><tr>';
|
||||
$html_output .= '<th style="white-space: nowrap">'
|
||||
@ -98,7 +99,7 @@ function PMA_getHtmlForUserGroupsTable()
|
||||
|
||||
$html_output .= '<td>';
|
||||
$html_output .= '<a class="" href="server_user_groups.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'viewUsers' => 1, 'userGroup' => $groupName
|
||||
)
|
||||
@ -108,7 +109,7 @@ function PMA_getHtmlForUserGroupsTable()
|
||||
. '</a>';
|
||||
$html_output .= ' ';
|
||||
$html_output .= '<a class="" href="server_user_groups.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'editUserGroup' => 1, 'userGroup' => $groupName
|
||||
)
|
||||
@ -118,7 +119,7 @@ function PMA_getHtmlForUserGroupsTable()
|
||||
$html_output .= ' ';
|
||||
$html_output .= '<a class="deleteUserGroup ajax"'
|
||||
. ' href="server_user_groups.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'deleteUserGroup' => 1, 'userGroup' => $groupName
|
||||
)
|
||||
@ -140,7 +141,7 @@ function PMA_getHtmlForUserGroupsTable()
|
||||
|
||||
$html_output .= '<fieldset id="fieldset_add_user_group">';
|
||||
$html_output .= '<a href="server_user_groups.php'
|
||||
. PMA_URL_getCommon(array('addUserGroup' => 1)) . '">'
|
||||
. URL::getCommon(array('addUserGroup' => 1)) . '">'
|
||||
. PMA\libraries\Util::getIcon('b_usradd.png')
|
||||
. __('Add user group') . '</a>';
|
||||
$html_output .= '</fieldset>';
|
||||
@ -222,7 +223,7 @@ function PMA_getHtmlToEditUserGroup($userGroup = null)
|
||||
} else {
|
||||
$urlParams['addUserGroupSubmit'] = '1';
|
||||
}
|
||||
$html_output .= PMA_URL_getHiddenInputs($urlParams);
|
||||
$html_output .= URL::getHiddenInputs($urlParams);
|
||||
|
||||
$html_output .= '<fieldset id="fieldset_user_group_rights">';
|
||||
$html_output .= '<legend>' . __('User group menu assignments')
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Get HTML for secondary level menu tabs on 'Users' page
|
||||
@ -15,7 +16,7 @@
|
||||
*/
|
||||
function PMA_getHtmlForSubMenusOnUsersPage($selfUrl)
|
||||
{
|
||||
$url_params = PMA_URL_getCommon();
|
||||
$url_params = URL::getCommon();
|
||||
$items = array(
|
||||
array(
|
||||
'name' => __('User accounts overview'),
|
||||
|
||||
@ -9,6 +9,7 @@ use PMA\libraries\DisplayResults;
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Parses and analyzes the given SQL query.
|
||||
@ -188,7 +189,7 @@ function PMA_getHtmlForRelationalColumnDropdown($db, $table, $column, $curr_valu
|
||||
. htmlspecialchars($_REQUEST['curr_value'])
|
||||
. '</span>'
|
||||
. '<a href="browse_foreigners.php'
|
||||
. PMA_URL_getCommon($_url_params) . '"'
|
||||
. URL::getCommon($_url_params) . '"'
|
||||
. 'class="ajax browse_foreign" ' . '>'
|
||||
. __('Browse foreign values')
|
||||
. '</a>';
|
||||
@ -222,7 +223,7 @@ function PMA_getHtmlForProfilingChart($url_query, $db, $profiling_results)
|
||||
$pma_token = $_SESSION[' PMA_token '];
|
||||
$url_query = isset($url_query)
|
||||
? $url_query
|
||||
: PMA_URL_getCommon(array('db' => $db));
|
||||
: URL::getCommon(array('db' => $db));
|
||||
|
||||
$profiling_table = '';
|
||||
$profiling_table .= '<fieldset><legend>' . __('Profiling')
|
||||
@ -536,7 +537,7 @@ function PMA_getHtmlForBookmark($displayParts, $cfgBookmark, $sql_query, $db,
|
||||
&& ! empty($sql_query)
|
||||
) {
|
||||
$goto = 'sql.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
@ -551,7 +552,7 @@ function PMA_getHtmlForBookmark($displayParts, $cfgBookmark, $sql_query, $db,
|
||||
. ' onsubmit="return ! emptyCheckTheField(this,'
|
||||
. '\'bkm_fields[bkm_label]\');"'
|
||||
. ' class="bookmarkQueryForm print_ignore">';
|
||||
$html .= PMA_URL_getHiddenInputs();
|
||||
$html .= URL::getHiddenInputs();
|
||||
$html .= '<input type="hidden" name="db"'
|
||||
. ' value="' . htmlspecialchars($db) . '" />';
|
||||
$html .= '<input type="hidden" name="goto" value="' . $goto . '" />';
|
||||
|
||||
@ -10,6 +10,8 @@
|
||||
* @usedby tbl_tracking.php
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
@ -81,7 +83,7 @@ function PMA_getHtmlForSqlQueryForm(
|
||||
$html .= ' id="sqlqueryform" name="sqlform">' . "\n";
|
||||
|
||||
$html .= '<input type="hidden" name="is_js_confirmed" value="0" />'
|
||||
. "\n" . PMA_URL_getHiddenInputs($db, $table) . "\n"
|
||||
. "\n" . URL::getHiddenInputs($db, $table) . "\n"
|
||||
. '<input type="hidden" name="pos" value="0" />' . "\n"
|
||||
. '<input type="hidden" name="goto" value="'
|
||||
. htmlspecialchars($goto) . '" />' . "\n"
|
||||
@ -147,7 +149,7 @@ function PMA_initQueryForm($query)
|
||||
$tmp_db_link = '<a href="' . PMA\libraries\Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. PMA_URL_getCommon(array('db' => $db)) . '"';
|
||||
. URL::getCommon(array('db' => $db)) . '"';
|
||||
$tmp_db_link .= '>'
|
||||
. htmlspecialchars($db) . '</a>';
|
||||
$legend = sprintf(__('Run SQL query/queries on database %s'), $tmp_db_link);
|
||||
@ -168,7 +170,7 @@ function PMA_initQueryForm($query)
|
||||
|
||||
$tmp_tbl_link = '<a href="' . PMA\libraries\Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
) . PMA_URL_getCommon(array('db' => $db, 'table' => $table)) . '" >';
|
||||
) . URL::getCommon(array('db' => $db, 'table' => $table)) . '" >';
|
||||
$tmp_tbl_link .= htmlspecialchars($db)
|
||||
. '.' . htmlspecialchars($table) . '</a>';
|
||||
$legend = sprintf(__('Run SQL query/queries on table %s'), $tmp_tbl_link);
|
||||
|
||||
@ -5,6 +5,8 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
@ -23,7 +25,7 @@ $db_is_system_schema = $GLOBALS['dbi']->isSystemSchema($db);
|
||||
* Set parameters for links
|
||||
* @deprecated
|
||||
*/
|
||||
$url_query = PMA_URL_getCommon(array('db' => $db, 'table' => $table));
|
||||
$url_query = URL::getCommon(array('db' => $db, 'table' => $table));
|
||||
|
||||
/**
|
||||
* Set parameters for links
|
||||
@ -38,12 +40,12 @@ $url_params['table'] = $table;
|
||||
$err_url_0 = PMA\libraries\Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. PMA_URL_getCommon(array('db' => $db));
|
||||
. URL::getCommon(array('db' => $db));
|
||||
|
||||
$err_url = PMA\libraries\Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
)
|
||||
. PMA_URL_getCommon($url_params);
|
||||
. URL::getCommon($url_params);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\Tracker;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Filters tracking entries
|
||||
@ -59,7 +60,7 @@ function PMA_getHtmlForDataDefinitionAndManipulationStatements($url_query,
|
||||
) {
|
||||
$html = '<div id="div_create_version">';
|
||||
$html .= '<form method="post" action="' . $url_query . '">';
|
||||
$html .= PMA_URL_getHiddenInputs($db);
|
||||
$html .= URL::getHiddenInputs($db);
|
||||
foreach ($selected as $selected_table) {
|
||||
$html .= '<input type="hidden" name="selected[]"'
|
||||
. ' value="' . htmlspecialchars($selected_table) . '" />';
|
||||
@ -273,7 +274,7 @@ function PMA_getHtmlForTableVersionDetails(
|
||||
|
||||
$html = '<form method="post" action="tbl_tracking.php" name="versionsForm"'
|
||||
. ' id="versionsForm" class="ajax">';
|
||||
$html .= PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
|
||||
$html .= URL::getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
|
||||
$html .= '<table id="versions" class="data">';
|
||||
$html .= '<thead>';
|
||||
$html .= '<tr>';
|
||||
@ -326,7 +327,7 @@ function PMA_getHtmlForTableVersionDetails(
|
||||
$html .= '<td><a class="delete_version_anchor ajax"'
|
||||
. ' href="' . $delete_link . '" >' . $delete . '</a></td>';
|
||||
$html .= '<td><a href="tbl_tracking.php';
|
||||
$html .= PMA_URL_getCommon(
|
||||
$html .= URL::getCommon(
|
||||
$url_params + array(
|
||||
'report' => 'true', 'version' => $version['version']
|
||||
)
|
||||
@ -334,7 +335,7 @@ function PMA_getHtmlForTableVersionDetails(
|
||||
$html .= '">' . $report . '</a>';
|
||||
$html .= ' ';
|
||||
$html .= '<a href="tbl_tracking.php';
|
||||
$html .= PMA_URL_getCommon(
|
||||
$html .= URL::getCommon(
|
||||
$url_params + array(
|
||||
'snapshot' => 'true', 'version' => $version['version']
|
||||
)
|
||||
@ -575,7 +576,7 @@ function PMA_getHtmlForTrackingReportExportForm1(
|
||||
$ddlog_count = 0;
|
||||
|
||||
$html = '<form method="post" action="tbl_tracking.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
$url_params + array(
|
||||
'report' => 'true', 'version' => $_REQUEST['version']
|
||||
)
|
||||
@ -625,7 +626,7 @@ function PMA_getHtmlForTrackingReportExportForm2(
|
||||
$url_params, $str1, $str2, $str3, $str4, $str5
|
||||
) {
|
||||
$html = '<form method="post" action="tbl_tracking.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
$url_params + array(
|
||||
'report' => 'true', 'version' => $_REQUEST['version']
|
||||
)
|
||||
@ -638,7 +639,7 @@ function PMA_getHtmlForTrackingReportExportForm2(
|
||||
$html .= '</form>';
|
||||
|
||||
$html .= '<form class="disableAjax" method="post" action="tbl_tracking.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
$url_params
|
||||
+ array('report' => 'true', 'version' => $_REQUEST['version'])
|
||||
)
|
||||
@ -736,7 +737,7 @@ function PMA_getHtmlForOneStatement($entry, $filter_users,
|
||||
$html .= '<td>' . $statement . '</td>';
|
||||
$html .= '<td class="nowrap"><a class="delete_entry_anchor ajax"'
|
||||
. ' href="tbl_tracking.php'
|
||||
. PMA_URL_getCommon(
|
||||
. URL::getCommon(
|
||||
$url_params + array(
|
||||
'report' => 'true',
|
||||
'version' => $_REQUEST['version'],
|
||||
@ -1464,7 +1465,7 @@ function PMA_displayUntrackedTables(
|
||||
<form method="post" action="db_tracking.php" name="untrackedForm"
|
||||
id="untrackedForm" class="ajax">
|
||||
<?php
|
||||
echo PMA_URL_getHiddenInputs($db)
|
||||
echo URL::getHiddenInputs($db)
|
||||
?>
|
||||
<table id="noversions" class="data">
|
||||
<thead>
|
||||
@ -1610,7 +1611,7 @@ function PMA_displayTrackedTables(
|
||||
<form method="post" action="db_tracking.php" name="trackedForm"
|
||||
id="trackedForm" class="ajax">
|
||||
<?php
|
||||
echo PMA_URL_getHiddenInputs($db)
|
||||
echo URL::getHiddenInputs($db)
|
||||
?>
|
||||
<table id="versions" class="data">
|
||||
<thead>
|
||||
|
||||
@ -1,248 +0,0 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* URL/hidden inputs generating.
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates text with hidden inputs.
|
||||
*
|
||||
* @param string|array $db optional database name
|
||||
* (can also be an array of parameters)
|
||||
* @param string $table optional table name
|
||||
* @param int $indent indenting level
|
||||
* @param string|array $skip do not generate a hidden field for this parameter
|
||||
* (can be an array of strings)
|
||||
*
|
||||
* @see PMA_URL_getCommon()
|
||||
*
|
||||
* @return string string with input fields
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function PMA_URL_getHiddenInputs($db = '', $table = '',
|
||||
$indent = 0, $skip = array()
|
||||
) {
|
||||
if (is_array($db)) {
|
||||
$params =& $db;
|
||||
$_indent = empty($table) ? $indent : $table;
|
||||
$_skip = empty($indent) ? $skip : $indent;
|
||||
$indent =& $_indent;
|
||||
$skip =& $_skip;
|
||||
} else {
|
||||
$params = array();
|
||||
if (mb_strlen($db)) {
|
||||
$params['db'] = $db;
|
||||
}
|
||||
if (mb_strlen($table)) {
|
||||
$params['table'] = $table;
|
||||
}
|
||||
}
|
||||
|
||||
if (! empty($GLOBALS['server'])
|
||||
&& $GLOBALS['server'] != $GLOBALS['cfg']['ServerDefault']
|
||||
) {
|
||||
$params['server'] = $GLOBALS['server'];
|
||||
}
|
||||
if (empty($_COOKIE['pma_lang']) && ! empty($GLOBALS['lang'])) {
|
||||
$params['lang'] = $GLOBALS['lang'];
|
||||
}
|
||||
if (empty($_COOKIE['pma_collation_connection'])
|
||||
&& ! empty($GLOBALS['collation_connection'])
|
||||
) {
|
||||
$params['collation_connection'] = $GLOBALS['collation_connection'];
|
||||
}
|
||||
|
||||
$params['token'] = $_SESSION[' PMA_token '];
|
||||
|
||||
if (! is_array($skip)) {
|
||||
if (isset($params[$skip])) {
|
||||
unset($params[$skip]);
|
||||
}
|
||||
} else {
|
||||
foreach ($skip as $skipping) {
|
||||
if (isset($params[$skipping])) {
|
||||
unset($params[$skipping]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return PMA_getHiddenFields($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* create hidden form fields from array with name => value
|
||||
*
|
||||
* <code>
|
||||
* $values = array(
|
||||
* 'aaa' => aaa,
|
||||
* 'bbb' => array(
|
||||
* 'bbb_0',
|
||||
* 'bbb_1',
|
||||
* ),
|
||||
* 'ccc' => array(
|
||||
* 'a' => 'ccc_a',
|
||||
* 'b' => 'ccc_b',
|
||||
* ),
|
||||
* );
|
||||
* echo PMA_getHiddenFields($values);
|
||||
*
|
||||
* // produces:
|
||||
* <input type="hidden" name="aaa" Value="aaa" />
|
||||
* <input type="hidden" name="bbb[0]" Value="bbb_0" />
|
||||
* <input type="hidden" name="bbb[1]" Value="bbb_1" />
|
||||
* <input type="hidden" name="ccc[a]" Value="ccc_a" />
|
||||
* <input type="hidden" name="ccc[b]" Value="ccc_b" />
|
||||
* </code>
|
||||
*
|
||||
* @param array $values hidden values
|
||||
* @param string $pre prefix
|
||||
*
|
||||
* @return string form fields of type hidden
|
||||
*/
|
||||
function PMA_getHiddenFields($values, $pre = '')
|
||||
{
|
||||
$fields = '';
|
||||
|
||||
foreach ($values as $name => $value) {
|
||||
if (! empty($pre)) {
|
||||
$name = $pre . '[' . $name . ']';
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
$fields .= PMA_getHiddenFields($value, $name);
|
||||
} else {
|
||||
// do not generate an ending "\n" because
|
||||
// PMA_URL_getHiddenInputs() is sometimes called
|
||||
// from a JS document.write()
|
||||
$fields .= '<input type="hidden" name="' . htmlspecialchars($name)
|
||||
. '" value="' . htmlspecialchars($value) . '" />';
|
||||
}
|
||||
}
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates text with URL parameters.
|
||||
*
|
||||
* <code>
|
||||
* $params['myparam'] = 'myvalue';
|
||||
* $params['db'] = 'mysql';
|
||||
* $params['table'] = 'rights';
|
||||
* // note the missing ?
|
||||
* echo 'script.php' . PMA_URL_getCommon($params);
|
||||
* // produces with cookies enabled:
|
||||
* // script.php?myparam=myvalue&db=mysql&table=rights
|
||||
* // with cookies disabled:
|
||||
* // script.php?server=1&lang=en&myparam=myvalue&db=mysql
|
||||
* // &table=rights
|
||||
*
|
||||
* // note the missing ?
|
||||
* echo 'script.php' . PMA_URL_getCommon();
|
||||
* // produces with cookies enabled:
|
||||
* // script.php
|
||||
* // with cookies disabled:
|
||||
* // script.php?server=1&lang=en
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $params optional, Contains an associative array with url params
|
||||
*
|
||||
* @param string $encode 'html' to use htmlspecialchars() on the resulting
|
||||
* URL (for a normal URL displayed in HTML) or
|
||||
* something else to avoid using htmlspecialchars()
|
||||
* (for a URL sent via a header);
|
||||
* if not set,'html' is assumed
|
||||
*
|
||||
* @param string $divider optional character to use instead of '?'
|
||||
*
|
||||
* @return string string with URL parameters
|
||||
* @access public
|
||||
*/
|
||||
function PMA_URL_getCommon($params = array(), $encode = 'html', $divider = '?')
|
||||
{
|
||||
$separator = PMA_URL_getArgSeparator();
|
||||
|
||||
// avoid overwriting when creating navi panel links to servers
|
||||
if (isset($GLOBALS['server'])
|
||||
&& $GLOBALS['server'] != $GLOBALS['cfg']['ServerDefault']
|
||||
&& ! isset($params['server'])
|
||||
&& ! defined('PMA_SETUP')
|
||||
) {
|
||||
$params['server'] = $GLOBALS['server'];
|
||||
}
|
||||
|
||||
if (empty($_COOKIE['pma_lang']) && ! empty($GLOBALS['lang'])) {
|
||||
$params['lang'] = $GLOBALS['lang'];
|
||||
}
|
||||
if (empty($_COOKIE['pma_collation_connection'])
|
||||
&& ! empty($GLOBALS['collation_connection'])
|
||||
) {
|
||||
$params['collation_connection'] = $GLOBALS['collation_connection'];
|
||||
}
|
||||
|
||||
if (isset($_SESSION[' PMA_token '])) {
|
||||
$params['token'] = $_SESSION[' PMA_token '];
|
||||
}
|
||||
|
||||
if (empty($params)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$query = $divider . http_build_query($params, null, $separator);
|
||||
|
||||
if ($encode === 'html') {
|
||||
$query = htmlspecialchars($query);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns url separator
|
||||
*
|
||||
* extracted from arg_separator.input as set in php.ini
|
||||
* we do not use arg_separator.output to avoid problems with & and &
|
||||
*
|
||||
* @param string $encode whether to encode separator or not,
|
||||
* currently 'none' or 'html'
|
||||
*
|
||||
* @return string character used for separating url parts usually ; or &
|
||||
* @access public
|
||||
*/
|
||||
function PMA_URL_getArgSeparator($encode = 'none')
|
||||
{
|
||||
static $separator = null;
|
||||
static $html_separator = null;
|
||||
|
||||
if (null === $separator) {
|
||||
// use separators defined by php, but prefer ';'
|
||||
// as recommended by W3C
|
||||
// (see http://www.w3.org/TR/1999/REC-html401-19991224/appendix
|
||||
// /notes.html#h-B.2.2)
|
||||
$arg_separator = ini_get('arg_separator.input');
|
||||
if (mb_strpos($arg_separator, ';') !== false) {
|
||||
$separator = ';';
|
||||
} elseif (mb_strlen($arg_separator) > 0) {
|
||||
$separator = $arg_separator{0};
|
||||
} else {
|
||||
$separator = '&';
|
||||
}
|
||||
$html_separator = htmlentities($separator);
|
||||
}
|
||||
|
||||
switch ($encode) {
|
||||
case 'html':
|
||||
return $html_separator;
|
||||
case 'text' :
|
||||
case 'none' :
|
||||
default :
|
||||
return $separator;
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
*/
|
||||
use PMA\libraries\config\ConfigFile;
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -256,7 +257,7 @@ function PMA_userprefsRedirect($file_name,
|
||||
$hash = '#' . urlencode($hash);
|
||||
}
|
||||
PMA_sendHeaderLocation('./' . $file_name
|
||||
. PMA_URL_getCommon($url_params, '&') . $hash
|
||||
. URL::getCommon($url_params, '&') . $hash
|
||||
);
|
||||
}
|
||||
|
||||
@ -283,7 +284,7 @@ function PMA_userprefsAutoloadGetHeader()
|
||||
return PMA\libraries\Template::get('prefs_autoload')
|
||||
->render(
|
||||
array(
|
||||
'hiddenInputs' => PMA_URL_getHiddenInputs(),
|
||||
'hiddenInputs' => URL::getHiddenInputs(),
|
||||
'return_url' => $return_url,
|
||||
)
|
||||
);
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -28,7 +29,7 @@ if (isset($_REQUEST['getColumns'])) {
|
||||
if (isset($_REQUEST['splitColumn'])) {
|
||||
$num_fields = $_REQUEST['numFields'];
|
||||
$html = PMA_getHtmlForCreateNewColumn($num_fields, $db, $table);
|
||||
$html .= PMA_URL_getHiddenInputs($db, $table);
|
||||
$html .= URL::getHiddenInputs($db, $table);
|
||||
echo $html;
|
||||
exit;
|
||||
}
|
||||
@ -38,7 +39,7 @@ if (isset($_REQUEST['addNewPrimary'])) {
|
||||
$html = PMA_getHtmlForCreateNewColumn(
|
||||
$num_fields, $db, $table, $columnMeta
|
||||
);
|
||||
$html .= PMA_URL_getHiddenInputs($db, $table);
|
||||
$html .= URL::getHiddenInputs($db, $table);
|
||||
echo $html;
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
use PMA\libraries\config\ConfigFile;
|
||||
use PMA\libraries\config\FormDisplay;
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Gets some core libraries and displays a top message if required
|
||||
@ -45,7 +46,7 @@ if (isset($_POST['revert'])) {
|
||||
$url_params = array('form' => $form_param);
|
||||
PMA_sendHeaderLocation(
|
||||
'./prefs_forms.php'
|
||||
. PMA_URL_getCommon($url_params, 'text')
|
||||
. URL::getCommon($url_params, 'text')
|
||||
);
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ use PMA\libraries\config\FormDisplay;
|
||||
use PMA\libraries\Message;
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Gets some core libraries and displays a top message if required
|
||||
@ -122,7 +123,7 @@ if (isset($_POST['submit_export'])
|
||||
echo $form_display->displayErrors();
|
||||
echo '</div>';
|
||||
echo '<form action="prefs_manage.php" method="post">';
|
||||
echo PMA_URL_getHiddenInputs() , "\n";
|
||||
echo URL::getHiddenInputs() , "\n";
|
||||
echo '<input type="hidden" name="json" value="'
|
||||
, htmlspecialchars($json) , '" />';
|
||||
echo '<input type="hidden" name="fix_errors" value="1" />';
|
||||
@ -238,7 +239,7 @@ echo '<h2>' , __('Import') , '</h2>'
|
||||
, '<form class="group-cnt prefs-form disableAjax" name="prefs_import"'
|
||||
, ' action="prefs_manage.php" method="post" enctype="multipart/form-data">'
|
||||
, Util::generateHiddenMaxFileSize($GLOBALS['max_upload_size'])
|
||||
, PMA_URL_getHiddenInputs()
|
||||
, URL::getHiddenInputs()
|
||||
, '<input type="hidden" name="json" value="" />'
|
||||
, '<input type="radio" id="import_text_file" name="import_type"'
|
||||
, ' value="text_file" checked="checked" />'
|
||||
@ -309,7 +310,7 @@ if (file_exists('setup/index.php')) {
|
||||
</div>
|
||||
<form class="group-cnt prefs-form disableAjax" name="prefs_export"
|
||||
action="prefs_manage.php" method="post">
|
||||
<?php echo PMA_URL_getHiddenInputs(); ?>
|
||||
<?php echo URL::getHiddenInputs(); ?>
|
||||
<div style="padding-bottom:0.5em">
|
||||
<input type="radio" id="export_text_file" name="export_type"
|
||||
value="text_file" checked="checked" />
|
||||
@ -361,7 +362,7 @@ if (file_exists('setup/index.php')) {
|
||||
<form class="group-cnt prefs-form disableAjax" name="prefs_reset"
|
||||
action="prefs_manage.php" method="post">
|
||||
<?php
|
||||
echo PMA_URL_getHiddenInputs() , __(
|
||||
echo URL::getHiddenInputs() , __(
|
||||
'You can reset all your settings and restore them to default '
|
||||
. 'values.'
|
||||
);
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
*/
|
||||
use PMA\libraries\config\FormDisplay;
|
||||
use PMA\setup\lib\ConfigGenerator;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Core libraries.
|
||||
@ -31,7 +32,7 @@ if (PMA_ifSetOr($_POST['submit_clear'], '')) {
|
||||
$GLOBALS['ConfigFile']->resetConfigData();
|
||||
// drop post data
|
||||
header('HTTP/1.1 303 See Other');
|
||||
header('Location: index.php' . PMA_URL_getCommon());
|
||||
header('Location: index.php' . URL::getCommon());
|
||||
exit;
|
||||
} elseif (PMA_ifSetOr($_POST['submit_download'], '')) {
|
||||
//
|
||||
@ -49,7 +50,7 @@ if (PMA_ifSetOr($_POST['submit_clear'], '')) {
|
||||
ConfigGenerator::getConfigFile($GLOBALS['ConfigFile'])
|
||||
);
|
||||
header('HTTP/1.1 303 See Other');
|
||||
header('Location: index.php' . PMA_URL_getCommon() . '&action_done=config_saved');
|
||||
header('Location: index.php' . URL::getCommon() . '&action_done=config_saved');
|
||||
exit;
|
||||
} elseif (PMA_ifSetOr($_POST['submit_load'], '')) {
|
||||
//
|
||||
@ -59,7 +60,7 @@ if (PMA_ifSetOr($_POST['submit_clear'], '')) {
|
||||
include_once $config_file_path;
|
||||
$GLOBALS['ConfigFile']->setConfigData($cfg);
|
||||
header('HTTP/1.1 303 See Other');
|
||||
header('Location: index.php' . PMA_URL_getCommon());
|
||||
header('Location: index.php' . URL::getCommon());
|
||||
exit;
|
||||
} elseif (PMA_ifSetOr($_POST['submit_delete'], '')) {
|
||||
//
|
||||
@ -67,13 +68,13 @@ if (PMA_ifSetOr($_POST['submit_clear'], '')) {
|
||||
//
|
||||
@unlink($config_file_path);
|
||||
header('HTTP/1.1 303 See Other');
|
||||
header('Location: index.php' . PMA_URL_getCommon());
|
||||
header('Location: index.php' . URL::getCommon());
|
||||
exit;
|
||||
} else {
|
||||
//
|
||||
// Show generated config file in a <textarea>
|
||||
//
|
||||
header('HTTP/1.1 303 See Other');
|
||||
header('Location: index.php' . PMA_URL_getCommon() . '&page=config');
|
||||
header('Location: index.php' . URL::getCommon() . '&page=config');
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ use PMA\libraries\config\ConfigFile;
|
||||
use PMA\libraries\config\FormDisplay;
|
||||
use PMA\libraries\config\ServerConfigChecks;
|
||||
use PMA\libraries\LanguageManager;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (!defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -27,7 +28,7 @@ $all_languages = LanguageManager::getInstance()->sortedLanguages();
|
||||
|
||||
/** @var ConfigFile $cf */
|
||||
$cf = $GLOBALS['ConfigFile'];
|
||||
$separator = PMA_URL_getArgSeparator('html');
|
||||
$separator = URL::getArgSeparator('html');
|
||||
|
||||
// message handling
|
||||
PMA_messagesBegin();
|
||||
@ -96,7 +97,7 @@ if (!$is_https) {
|
||||
|
||||
echo '<form id="select_lang" method="post" action="'
|
||||
, htmlspecialchars($_SERVER['REQUEST_URI']) , '">';
|
||||
echo PMA_URL_getHiddenInputs();
|
||||
echo URL::getHiddenInputs();
|
||||
echo '<bdo lang="en" dir="ltr"><label for="lang">';
|
||||
echo __('Language') , (__('Language') != 'Language' ? ' - Language' : '');
|
||||
echo '</label></bdo><br />';
|
||||
@ -177,11 +178,11 @@ if ($cf->getServerCount() > 0) {
|
||||
echo '<td>' , htmlspecialchars($cf->getServerDSN($id)) , '</td>';
|
||||
echo '<td style="white-space: nowrap">';
|
||||
echo '<small>';
|
||||
echo '<a href="' , PMA_URL_getCommon() , $separator , 'page=servers'
|
||||
echo '<a href="' , URL::getCommon() , $separator , 'page=servers'
|
||||
, $separator , 'mode=edit' , $separator , 'id=' , $id , '">'
|
||||
, __('Edit') , '</a>';
|
||||
echo ' | ';
|
||||
echo '<a href="' , PMA_URL_getCommon() , $separator , 'page=servers'
|
||||
echo '<a href="' , URL::getCommon() , $separator , 'page=servers'
|
||||
, $separator , 'mode=remove' , $separator , 'id=' , $id , '">'
|
||||
, __('Delete') , '</a>';
|
||||
echo '</small>';
|
||||
@ -310,6 +311,6 @@ echo '<div id="footer">';
|
||||
echo '<a href="https://www.phpmyadmin.net/">' , __('phpMyAdmin homepage') , '</a>';
|
||||
echo '<a href="https://www.phpmyadmin.net/donate/">'
|
||||
, __('Donate') , '</a>';
|
||||
echo '<a href="' , PMA_URL_getCommon() , $separator , 'version_check=1">'
|
||||
echo '<a href="' , URL::getCommon() , $separator , 'version_check=1">'
|
||||
, __('Check for latest version') , '</a>';
|
||||
echo '</div>';
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin-Setup
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (!defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -12,9 +13,9 @@ if (!defined('PHPMYADMIN')) {
|
||||
|
||||
$formset_id = isset($_GET['formset']) ? $_GET['formset'] : null;
|
||||
|
||||
$separator = PMA_URL_getArgSeparator('html');
|
||||
$separator = URL::getArgSeparator('html');
|
||||
echo '<ul>';
|
||||
echo '<li><a href="index.php' , PMA_URL_getCommon() , '"'
|
||||
echo '<li><a href="index.php' , URL::getCommon() , '"'
|
||||
, ($formset_id === null ? ' class="active' : '')
|
||||
, '">' , __('Overview') , '</a></li>';
|
||||
|
||||
@ -28,7 +29,7 @@ $formsets = array(
|
||||
);
|
||||
|
||||
foreach ($formsets as $formset => $label) {
|
||||
echo '<li><a href="' , PMA_URL_getCommon() , $separator , 'page=form'
|
||||
echo '<li><a href="' , URL::getCommon() , $separator , 'page=form'
|
||||
, $separator , 'formset=' , $formset , '" '
|
||||
, ($formset_id === $formset ? ' class="active' : '')
|
||||
, '">' , $label , '</a></li>';
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
|
||||
use PMA\libraries\config\ConfigFile;
|
||||
use PMA\libraries\config\FormDisplay;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
if (!defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -33,7 +34,7 @@ if ($mode == 'edit' && $server_exists) {
|
||||
. ' <small>(' . htmlspecialchars($cf->getServerDSN($id)) . ')</small>';
|
||||
} elseif ($mode == 'remove' && $server_exists) {
|
||||
$cf->removeServer($id);
|
||||
header('Location: index.php' . PMA_URL_getCommon());
|
||||
header('Location: index.php' . URL::getCommon());
|
||||
exit;
|
||||
} elseif ($mode == 'revert' && $server_exists) {
|
||||
// handled by process_formset()
|
||||
|
||||
@ -22,7 +22,6 @@ if (!file_exists('./libraries/common.inc.php')) {
|
||||
require_once './libraries/common.inc.php';
|
||||
require_once './libraries/config/config_functions.lib.php';
|
||||
require_once './libraries/config/messages.inc.php';
|
||||
require_once './libraries/url_generating.lib.php';
|
||||
require_once './libraries/user_preferences.lib.php';
|
||||
|
||||
// use default error handler
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* @package PhpMyAdmin-Setup
|
||||
*/
|
||||
use PMA\libraries\config\FormDisplay;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Processes forms registered in $form_display, handles error correction
|
||||
@ -35,7 +36,7 @@ function PMA_Process_formset(FormDisplay $form_display)
|
||||
}
|
||||
|
||||
// form has errors, show warning
|
||||
$separator = PMA_URL_getArgSeparator('html');
|
||||
$separator = URL::getArgSeparator('html');
|
||||
$page = isset($_GET['page']) ? $_GET['page'] : null;
|
||||
$formset = isset($_GET['formset']) ? $_GET['formset'] : null;
|
||||
$formset = $formset ? "{$separator}formset=$formset" : '';
|
||||
@ -49,16 +50,16 @@ function PMA_Process_formset(FormDisplay $form_display)
|
||||
<div class="error">
|
||||
<h4><?php echo __('Warning') ?></h4>
|
||||
<?php echo __('Submitted form contains errors') ?><br />
|
||||
<a href="<?php echo PMA_URL_getCommon() , $separator ?>page=<?php echo $page , $formset , $formId , $separator ?>mode=revert">
|
||||
<a href="<?php echo URL::getCommon() , $separator ?>page=<?php echo $page , $formset , $formId , $separator ?>mode=revert">
|
||||
<?php echo __('Try to revert erroneous fields to their default values') ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php echo $form_display->displayErrors() ?>
|
||||
<a class="btn" href="index.php<?php echo PMA_URL_getCommon() ?>">
|
||||
<a class="btn" href="index.php<?php echo URL::getCommon() ?>">
|
||||
<?php echo __('Ignore errors') ?>
|
||||
</a>
|
||||
|
||||
<a class="btn" href="<?php echo PMA_URL_getCommon() , $separator ?>page=<?php echo $page , $formset , $formId , $separator ?>mode=edit">
|
||||
<a class="btn" href="<?php echo URL::getCommon() , $separator ?>page=<?php echo $page , $formset , $formId , $separator ?>mode=edit">
|
||||
<?php echo __('Show form') ?>
|
||||
</a>
|
||||
<?php
|
||||
@ -73,7 +74,7 @@ function PMA_generateHeader303()
|
||||
{
|
||||
// drop post data
|
||||
header('HTTP/1.1 303 See Other');
|
||||
header('Location: index.php' . PMA_URL_getCommon());
|
||||
header('Location: index.php' . URL::getCommon());
|
||||
|
||||
if (!defined('TESTSUITE')) {
|
||||
exit;
|
||||
|
||||
5
sql.php
5
sql.php
@ -10,6 +10,7 @@
|
||||
use PMA\libraries\config\PageSettings;
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Gets some core libraries
|
||||
@ -60,7 +61,7 @@ if (empty($goto)) {
|
||||
|
||||
if (! isset($err_url)) {
|
||||
$err_url = (! empty($back) ? $back : $goto)
|
||||
. '?' . PMA_URL_getCommon(array('db' => $GLOBALS['db']))
|
||||
. '?' . URL::getCommon(array('db' => $GLOBALS['db']))
|
||||
. ((mb_strpos(' ' . $goto, 'db_') != 1
|
||||
&& mb_strlen($table))
|
||||
? '&table=' . urlencode($table)
|
||||
@ -187,7 +188,7 @@ if (isset($_POST['store_bkm'])) {
|
||||
*/
|
||||
if ($goto == 'sql.php') {
|
||||
$is_gotofile = false;
|
||||
$goto = 'sql.php' . PMA_URL_getCommon(
|
||||
$goto = 'sql.php' . URL::getCommon(
|
||||
array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Get some core libraries
|
||||
@ -23,7 +24,7 @@ PMA\libraries\Util::checkParameters(array('db', 'table'));
|
||||
/**
|
||||
* Defines the url to return to in case of error in a sql statement
|
||||
*/
|
||||
$err_url = 'tbl_sql.php' . PMA_URL_getCommon(
|
||||
$err_url = 'tbl_sql.php' . URL::getCommon(
|
||||
array(
|
||||
'db' => $db, 'table' => $table
|
||||
)
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
use PMA\libraries\config\PageSettings;
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Gets the variables sent or posted to this script and displays the header
|
||||
@ -64,7 +65,7 @@ if (empty($GLOBALS['goto'])) {
|
||||
|
||||
|
||||
$_url_params = PMA_getUrlParameters($db, $table);
|
||||
$err_url = $GLOBALS['goto'] . PMA_URL_getCommon($_url_params);
|
||||
$err_url = $GLOBALS['goto'] . URL::getCommon($_url_params);
|
||||
unset($_url_params);
|
||||
|
||||
$comments_map = PMA_getCommentsMap($db, $table);
|
||||
@ -148,7 +149,7 @@ foreach ($table_columns as $column) {
|
||||
//If table has blob fields we have to disable ajax.
|
||||
$html_output .= PMA_getHtmlForInsertEditFormHeader($has_blob_field, $is_upload);
|
||||
|
||||
$html_output .= PMA_URL_getHiddenInputs($_form_params);
|
||||
$html_output .= URL::getHiddenInputs($_form_params);
|
||||
|
||||
$titles['Browse'] = Util::getIcon('b_browse.png', __('Browse foreign values'));
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
* Get some core libraries
|
||||
@ -40,7 +41,7 @@ if ($GLOBALS['dbi']->getColumns($db, $table)) {
|
||||
sprintf(__('Table %s already exists!'), htmlspecialchars($table)),
|
||||
'',
|
||||
false,
|
||||
'db_structure.php' . PMA_URL_getCommon(array('db' => $db))
|
||||
'db_structure.php' . URL::getCommon(array('db' => $db))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -117,7 +118,7 @@ if (!empty($submit_mult)) {
|
||||
default:
|
||||
$action = 'tbl_row_action.php';
|
||||
$err_url = 'tbl_row_action.php'
|
||||
. PMA_URL_getCommon($GLOBALS['url_params']);
|
||||
. URL::getCommon($GLOBALS['url_params']);
|
||||
if (! isset($_REQUEST['mult_btn'])) {
|
||||
$original_sql_query = $sql_query;
|
||||
if (! empty($url_query)) {
|
||||
@ -127,7 +128,7 @@ if (!empty($submit_mult)) {
|
||||
include 'libraries/mult_submits.inc.php';
|
||||
$_url_params = $GLOBALS['url_params'];
|
||||
$_url_params['goto'] = 'tbl_sql.php';
|
||||
$url_query = PMA_URL_getCommon($_url_params);
|
||||
$url_query = URL::getCommon($_url_params);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
<?php
|
||||
use PMA\libraries\Partition;
|
||||
use PMA\libraries\StorageEngine;
|
||||
use PMA\libraries\URL;
|
||||
|
||||
?>
|
||||
<form method="post"
|
||||
action="<?= $action; ?>"
|
||||
class="<?= ($action == 'tbl_create.php' ? 'create_table' : 'append_fields'); ?>_form ajax lock-page">
|
||||
<?= PMA_URL_getHiddenInputs($form_params); ?>
|
||||
<?= URL::getHiddenInputs($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 -->
|
||||
@ -167,4 +168,4 @@ use PMA\libraries\StorageEngine;
|
||||
</fieldset>
|
||||
<div id="properties_message">
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
@ -82,7 +82,7 @@
|
||||
<?= __('MIME type'); ?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="transformation_overview.php<?= PMA_URL_getCommon(); ?>#transformation"
|
||||
<a href="transformation_overview.php<?= PMA\libraries\URL::getCommon(); ?>#transformation"
|
||||
title="<?= __('List of available transformations and their options'); ?>"
|
||||
target="_blank">
|
||||
<?= __('Browser display transformation'); ?>
|
||||
@ -101,7 +101,7 @@
|
||||
); ?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="transformation_overview.php<?= PMA_URL_getCommon(); ?>#input_transformation"
|
||||
<a href="transformation_overview.php<?= PMA\libraries\URL::getCommon(); ?>#input_transformation"
|
||||
title="<?= __('List of available transformations and their options'); ?>"
|
||||
target="_blank">
|
||||
<?= __('Input transformation'); ?>
|
||||
@ -130,4 +130,4 @@
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<?php endif; ?>
|
||||
<?= __('Create table'); ?>
|
||||
</legend>
|
||||
<?= PMA_URL_getHiddenInputs($db); ?>
|
||||
<?= PMA\libraries\URL::getHiddenInputs($db); ?>
|
||||
<div class="formelement">
|
||||
<?= __('Name'); ?>:
|
||||
<input type="text" name="table" maxlength="64" size="30" required="required" />
|
||||
@ -20,4 +20,4 @@
|
||||
<fieldset class="tblFooters">
|
||||
<input type="submit" value="<?= __('Go'); ?>" />
|
||||
</fieldset>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php $cfgRelation = PMA_getRelationsParam(); ?>
|
||||
<form action="db_designer.php" method="post" name="edit_delete_pages" id="edit_delete_pages" class="ajax">
|
||||
<?= PMA_URL_getHiddenInputs($db); ?>
|
||||
<?= PMA\libraries\URL::getHiddenInputs($db); ?>
|
||||
<fieldset id="page_edit_delete_options">
|
||||
<input type="hidden" name="operation" value="<?= $operation; ?>" />
|
||||
<label for="selected_page">
|
||||
@ -8,4 +8,4 @@
|
||||
</label>
|
||||
<?= PMA_getHtmlForPageSelector($cfgRelation, $db); ?>
|
||||
</fieldset>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
@ -6,7 +6,7 @@ $choices = array(
|
||||
);
|
||||
?>
|
||||
<form action="db_designer.php" method="post" name="save_as_pages" id="save_as_pages" class="ajax">
|
||||
<?= PMA_URL_getHiddenInputs($db); ?>
|
||||
<?= PMA\libraries\URL::getHiddenInputs($db); ?>
|
||||
<fieldset id="page_save_as_options">
|
||||
<table>
|
||||
<tbody>
|
||||
@ -30,4 +30,4 @@ $choices = array(
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
@ -14,6 +14,6 @@
|
||||
<textarea cols="80" name="sql_query" id="textSqlquery" rows="15">
|
||||
</textarea>
|
||||
<input type="hidden" name="submit_sql" value="true">
|
||||
<?= PMA_URL_getHiddenInputs($_GET['db']); ?>
|
||||
<?= PMA\libraries\URL::getHiddenInputs($_GET['db']); ?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<form method="post" action="schema_export.php" class="disableAjax" id="id_export_pages">
|
||||
<fieldset>
|
||||
<?= PMA_URL_getHiddenInputs($db); ?>
|
||||
<?= PMA\libraries\URL::getHiddenInputs($db); ?>
|
||||
<label><?= __('Select Export Relational Type'); ?></label><br/>
|
||||
<?= PMA_pluginGetChoice(
|
||||
'Schema', 'export_type', $export_list, 'format'
|
||||
@ -8,4 +8,4 @@
|
||||
<input type="hidden" name="page_number" value="<?= htmlspecialchars($page); ?>" />
|
||||
<?= PMA_pluginGetOptions('Schema', $export_list); ?>
|
||||
</fieldset>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
@ -28,7 +28,7 @@ if (isset($approx_rows)) {
|
||||
);
|
||||
}
|
||||
$cell_text = ($approx_rows)
|
||||
? '<a href="db_structure.php' . PMA_URL_getCommon($row_sum_url)
|
||||
? '<a href="db_structure.php' . PMA\libraries\URL::getCommon($row_sum_url)
|
||||
. '" class="ajax row_count_sum">' . '~' . $row_count_sum . '</a>'
|
||||
: $row_count_sum;
|
||||
?>
|
||||
@ -90,4 +90,4 @@ $cell_text = ($approx_rows)
|
||||
: '-');?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</tbody>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user