Move classes to PhpMyAdmin namespace
- Move Table to PhpMyAdmin namespace - Move Template to PhpMyAdmin namespace - Move ThemeManager to PhpMyAdmin namespace - Move Theme to PhpMyAdmin namespace - Move Tracker to PhpMyAdmin namespace - Move Transformations to PhpMyAdmin namespace - Move TypesMySQL to PhpMyAdmin namespace - Move Types to PhpMyAdmin namespace - Move Util to PhpMyAdmin namespace - Move VersionInformation to PhpMyAdmin namespace - Move Url to PhpMyAdmin namespace Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
This commit is contained in:
parent
6e71574e9c
commit
ca910e8de8
2
ajax.php
2
ajax.php
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
require_once 'libraries/common.inc.php';
|
||||
|
||||
$response = Response::getInstance();
|
||||
|
||||
@ -24,7 +24,7 @@ foreach ($request_params as $one_request_param) {
|
||||
}
|
||||
}
|
||||
|
||||
PMA\libraries\Util::checkParameters(array('db', 'table', 'field'));
|
||||
PhpMyAdmin\Util::checkParameters(array('db', 'table', 'field'));
|
||||
|
||||
$response = Response::getInstance();
|
||||
$response->getFooter()->setMinimal();
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
use PhpMyAdmin\Core;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Response;
|
||||
|
||||
/**
|
||||
@ -119,7 +119,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">'
|
||||
. URL::getHiddenInputs(
|
||||
. Url::getHiddenInputs(
|
||||
$db
|
||||
)
|
||||
. '<input id="del_col_name" type="hidden" name="col_name" value="">'
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
*/
|
||||
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\Transformations;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Transformations;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* Gets the variables sent or posted to this script, then displays headers
|
||||
@ -27,7 +27,7 @@ if (! isset($selected_tbl)) {
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
}
|
||||
|
||||
$response = Response::getInstance();
|
||||
@ -42,12 +42,12 @@ $cfgRelation = PMA_getRelationsParam();
|
||||
/**
|
||||
* Check parameters
|
||||
*/
|
||||
PMA\libraries\Util::checkParameters(array('db'));
|
||||
PhpMyAdmin\Util::checkParameters(array('db'));
|
||||
|
||||
/**
|
||||
* Defines the url to return to in case of error in a sql statement
|
||||
*/
|
||||
$err_url = 'db_sql.php' . URL::getCommon(array('db' => $db));
|
||||
$err_url = 'db_sql.php' . Url::getCommon(array('db' => $db));
|
||||
|
||||
if ($cfgRelation['commwork']) {
|
||||
$comment = PMA_getDbComment($db);
|
||||
@ -87,7 +87,7 @@ foreach ($tables as $table) {
|
||||
$GLOBALS['dbi']->selectDb($db);
|
||||
$indexes = $GLOBALS['dbi']->getTableIndexes($db, $table);
|
||||
list($primary, $pk_array, $indexes_info, $indexes_data)
|
||||
= PMA\libraries\Util::processIndexData($indexes);
|
||||
= PhpMyAdmin\Util::processIndexData($indexes);
|
||||
|
||||
/**
|
||||
* Gets columns properties
|
||||
@ -130,7 +130,7 @@ foreach ($tables as $table) {
|
||||
$row['Null'] = 'NO';
|
||||
}
|
||||
$extracted_columnspec
|
||||
= PMA\libraries\Util::extractColumnSpec($row['Type']);
|
||||
= PhpMyAdmin\Util::extractColumnSpec($row['Type']);
|
||||
|
||||
// reformat mysql query output
|
||||
// set or enum types: slashes single quotes inside options
|
||||
@ -155,7 +155,7 @@ foreach ($tables as $table) {
|
||||
}
|
||||
echo '</td>';
|
||||
echo '<td'
|
||||
, PMA\libraries\Util::getClassForType(
|
||||
, PhpMyAdmin\Util::getClassForType(
|
||||
$extracted_columnspec['type']
|
||||
)
|
||||
, ' lang="en" dir="ltr">' , $type , '</td>';
|
||||
@ -210,4 +210,4 @@ foreach ($tables as $table) {
|
||||
/**
|
||||
* Displays the footer
|
||||
*/
|
||||
echo PMA\libraries\Util::getButton();
|
||||
echo PhpMyAdmin\Util::getButton();
|
||||
|
||||
@ -138,7 +138,7 @@ list(
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
// Embed some data into HTML, later it will be read
|
||||
// by pmd/init.js and converted to JS variables.
|
||||
|
||||
@ -23,7 +23,7 @@ $header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('export.js');
|
||||
|
||||
// $sub_part is used in PMA\libraries\Util::getDbInfo() to see if we are coming from
|
||||
// $sub_part is used in PhpMyAdmin\Util::getDbInfo() to see if we are coming from
|
||||
// db_export.php, in which case we don't obey $cfg['MaxTableList']
|
||||
$sub_part = '_export';
|
||||
require_once 'libraries/db_common.inc.php';
|
||||
@ -39,7 +39,7 @@ list(
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
/**
|
||||
* Displays the form
|
||||
|
||||
@ -35,7 +35,7 @@ list(
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
require 'libraries/display_import.lib.php';
|
||||
$response = Response::getInstance();
|
||||
|
||||
@ -134,7 +134,7 @@ if (strlen($GLOBALS['db']) > 0
|
||||
|
||||
// if someday the RENAME DATABASE reappears, do not DROP
|
||||
$local_query = 'DROP DATABASE '
|
||||
. PMA\libraries\Util::backquote($GLOBALS['db']) . ';';
|
||||
. PhpMyAdmin\Util::backquote($GLOBALS['db']) . ';';
|
||||
$sql_query .= "\n" . $local_query;
|
||||
$GLOBALS['dbi']->query($local_query);
|
||||
|
||||
@ -185,7 +185,7 @@ if (strlen($GLOBALS['db']) > 0
|
||||
$response->addJSON('newname', $_REQUEST['newname']);
|
||||
$response->addJSON(
|
||||
'sql_query',
|
||||
PMA\libraries\Util::getMessage(null, $sql_query)
|
||||
PhpMyAdmin\Util::getMessage(null, $sql_query)
|
||||
);
|
||||
$response->addJSON('db', $GLOBALS['db']);
|
||||
exit;
|
||||
@ -222,12 +222,12 @@ list(
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
echo "\n";
|
||||
|
||||
if (isset($message)) {
|
||||
echo PMA\libraries\Util::getMessage($message, $sql_query);
|
||||
echo PhpMyAdmin\Util::getMessage($message, $sql_query);
|
||||
unset($message);
|
||||
}
|
||||
|
||||
@ -296,8 +296,8 @@ if ($cfgRelation['pdfwork'] && $num_tables > 0) {
|
||||
// We only show this if we find something in the new pdf_pages table
|
||||
$test_query = '
|
||||
SELECT *
|
||||
FROM ' . PMA\libraries\Util::backquote($GLOBALS['cfgRelation']['db'])
|
||||
. '.' . PMA\libraries\Util::backquote($cfgRelation['pdf_pages']) . '
|
||||
FROM ' . PhpMyAdmin\Util::backquote($GLOBALS['cfgRelation']['db'])
|
||||
. '.' . PhpMyAdmin\Util::backquote($cfgRelation['pdf_pages']) . '
|
||||
WHERE db_name = \'' . $GLOBALS['dbi']->escapeString($GLOBALS['db'])
|
||||
. '\'';
|
||||
$test_rs = PMA_queryAsControlUser(
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\SavedSearches;
|
||||
use PhpMyAdmin\Sql;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* requirements
|
||||
@ -120,7 +120,7 @@ list(
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
if ($message_to_display) {
|
||||
PhpMyAdmin\Message::error(
|
||||
@ -133,7 +133,7 @@ unset($message_to_display);
|
||||
// create new qbe search instance
|
||||
$db_qbe = new PhpMyAdmin\DbQbe($GLOBALS['db'], $savedSearchList, $savedSearch);
|
||||
|
||||
$url = 'db_designer.php' . URL::getCommon(
|
||||
$url = 'db_designer.php' . Url::getCommon(
|
||||
array_merge(
|
||||
$url_params,
|
||||
array('query' => 1)
|
||||
|
||||
@ -28,7 +28,7 @@ require 'libraries/db_common.inc.php';
|
||||
|
||||
// If config variable $GLOBALS['cfg']['UseDbSearch'] is on false : exit.
|
||||
if (! $GLOBALS['cfg']['UseDbSearch']) {
|
||||
PMA\libraries\Util::mysqlDie(
|
||||
PhpMyAdmin\Util::mysqlDie(
|
||||
__('Access denied!'), '', false, $err_url
|
||||
);
|
||||
} // end if
|
||||
@ -50,7 +50,7 @@ if (! $response->isAjax()) {
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
}
|
||||
|
||||
// Main search form has been submitted, get results
|
||||
|
||||
@ -10,7 +10,7 @@ namespace PMA;
|
||||
|
||||
use PMA\libraries\controllers\database\DatabaseStructureController;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/db_common.inc.php';
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\Tracker;
|
||||
use PhpMyAdmin\Tracker;
|
||||
|
||||
/**
|
||||
* Run common work
|
||||
@ -42,7 +42,7 @@ list(
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
// Work to do?
|
||||
// (here, do not use $_REQUEST['db] as it can be crafted)
|
||||
@ -113,8 +113,8 @@ $cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
// Prepare statement to get HEAD version
|
||||
$all_tables_query = ' SELECT table_name, MAX(version) as version FROM ' .
|
||||
PMA\libraries\Util::backquote($cfgRelation['db']) . '.' .
|
||||
PMA\libraries\Util::backquote($cfgRelation['tracking']) .
|
||||
PhpMyAdmin\Util::backquote($cfgRelation['db']) . '.' .
|
||||
PhpMyAdmin\Util::backquote($cfgRelation['tracking']) .
|
||||
' WHERE db_name = \'' . $GLOBALS['dbi']->escapeString($_REQUEST['db']) .
|
||||
'\' ' .
|
||||
' GROUP BY table_name' .
|
||||
@ -147,5 +147,5 @@ if (count($data['ddlog']) > 0) {
|
||||
$log .= '# ' . $entry['date'] . ' ' . $entry['username'] . "\n"
|
||||
. $entry['statement'] . "\n";
|
||||
}
|
||||
echo PMA\libraries\Util::getMessage(__('Database Log'), $log);
|
||||
echo PhpMyAdmin\Util::getMessage(__('Database Log'), $log);
|
||||
}
|
||||
|
||||
10
export.php
10
export.php
@ -9,7 +9,7 @@
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Encoding;
|
||||
use PMA\libraries\plugins\ExportPlugin;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
|
||||
/**
|
||||
@ -172,7 +172,7 @@ foreach ($post_params as $one_post_param) {
|
||||
|
||||
$table = $GLOBALS['table'];
|
||||
|
||||
PMA\libraries\Util::checkParameters(array('what', 'export_type'));
|
||||
PhpMyAdmin\Util::checkParameters(array('what', 'export_type'));
|
||||
|
||||
// sanitize this parameter which will be used below in a file inclusion
|
||||
$what = Core::securePath($_POST['what']);
|
||||
@ -258,9 +258,9 @@ if ($_REQUEST['output_format'] == 'astext') {
|
||||
|
||||
// Generate error url and check for needed variables
|
||||
if ($export_type == 'server') {
|
||||
$err_url = 'server_export.php' . URL::getCommon();
|
||||
$err_url = 'server_export.php' . Url::getCommon();
|
||||
} elseif ($export_type == 'database' && strlen($db) > 0) {
|
||||
$err_url = 'db_export.php' . 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 +268,7 @@ if ($export_type == 'server') {
|
||||
$tables = array();
|
||||
}
|
||||
} elseif ($export_type == 'table' && strlen($db) > 0 && strlen($table) > 0) {
|
||||
$err_url = 'tbl_export.php' . URL::getCommon(
|
||||
$err_url = 'tbl_export.php' . Url::getCommon(
|
||||
array(
|
||||
'db' => $db, 'table' => $table
|
||||
)
|
||||
|
||||
@ -10,7 +10,7 @@ use PhpMyAdmin\Core;
|
||||
use PMA\libraries\gis\GISFactory;
|
||||
use PMA\libraries\gis\GISVisualization;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* Escapes special characters if the variable is set.
|
||||
@ -28,7 +28,7 @@ function escape($variable)
|
||||
require_once 'libraries/common.inc.php';
|
||||
|
||||
if (! isset($_REQUEST['field'])) {
|
||||
PMA\libraries\Util::checkParameters(array('field'));
|
||||
PhpMyAdmin\Util::checkParameters(array('field'));
|
||||
}
|
||||
|
||||
// Get data if any posted
|
||||
@ -131,7 +131,7 @@ if (isset($_REQUEST['input_name'])) {
|
||||
echo '<input type="hidden" name="input_name" value="'
|
||||
, htmlspecialchars($_REQUEST['input_name']) , '" />';
|
||||
}
|
||||
echo URL::getHiddenInputs();
|
||||
echo Url::getHiddenInputs();
|
||||
|
||||
echo '<!-- Visualization section -->';
|
||||
echo '<div id="placeholder" style="width:450px;height:300px;'
|
||||
|
||||
24
import.php
24
import.php
@ -13,7 +13,7 @@ use PhpMyAdmin\File;
|
||||
use PMA\libraries\plugins\ImportPlugin;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Sql;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/* Enable LOAD DATA LOCAL INFILE for LDI plugin */
|
||||
if (isset($_POST['format']) && $_POST['format'] == 'ldi') {
|
||||
@ -171,7 +171,7 @@ if (! empty($sql_query)) {
|
||||
$rename_table_names
|
||||
)) {
|
||||
$ajax_reload['reload'] = true;
|
||||
$ajax_reload['table_name'] = PMA\libraries\Util::unQuote(
|
||||
$ajax_reload['table_name'] = PhpMyAdmin\Util::unQuote(
|
||||
$rename_table_names[2]
|
||||
);
|
||||
}
|
||||
@ -247,7 +247,7 @@ $post_patterns = array(
|
||||
Core::setPostAsGlobal($post_patterns);
|
||||
|
||||
// Check needed parameters
|
||||
PMA\libraries\Util::checkParameters(array('import_type', 'format'));
|
||||
PhpMyAdmin\Util::checkParameters(array('import_type', 'format'));
|
||||
|
||||
// We don't want anything special in format
|
||||
$format = Core::securePath($format);
|
||||
@ -278,7 +278,7 @@ if ($import_type == 'table') {
|
||||
}
|
||||
}
|
||||
}
|
||||
$err_url = $goto . URL::getCommon($urlparams);
|
||||
$err_url = $goto . Url::getCommon($urlparams);
|
||||
$_SESSION['Import_message']['go_back_url'] = $err_url;
|
||||
// Avoid setting selflink to 'import.php'
|
||||
// problem similar to bug 4276
|
||||
@ -438,7 +438,7 @@ if (! empty($local_import_file) && ! empty($cfg['UploadDir'])) {
|
||||
// sanitize $local_import_file as it comes from a POST
|
||||
$local_import_file = Core::securePath($local_import_file);
|
||||
|
||||
$import_file = PMA\libraries\Util::userDir($cfg['UploadDir'])
|
||||
$import_file = PhpMyAdmin\Util::userDir($cfg['UploadDir'])
|
||||
. $local_import_file;
|
||||
|
||||
/*
|
||||
@ -532,11 +532,11 @@ if (! $error) {
|
||||
} else {
|
||||
// Do the real import
|
||||
try {
|
||||
$default_fk_check = PMA\libraries\Util::handleDisableFKCheckInit();
|
||||
$default_fk_check = PhpMyAdmin\Util::handleDisableFKCheckInit();
|
||||
$import_plugin->doImport($sql_data);
|
||||
PMA\libraries\Util::handleDisableFKCheckCleanup($default_fk_check);
|
||||
PhpMyAdmin\Util::handleDisableFKCheckCleanup($default_fk_check);
|
||||
} catch (Exception $e) {
|
||||
PMA\libraries\Util::handleDisableFKCheckCleanup($default_fk_check);
|
||||
PhpMyAdmin\Util::handleDisableFKCheckCleanup($default_fk_check);
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
@ -605,7 +605,7 @@ if ($timeout_passed) {
|
||||
$urlparams['local_import_file'] = $local_import_file;
|
||||
}
|
||||
|
||||
$importUrl = $err_url = $goto . URL::getCommon($urlparams);
|
||||
$importUrl = $err_url = $goto . Url::getCommon($urlparams);
|
||||
|
||||
$message = PhpMyAdmin\Message::error(
|
||||
__(
|
||||
@ -656,7 +656,7 @@ if ($sqlLength <= $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
|
||||
// There was an error?
|
||||
if (isset($my_die)) {
|
||||
foreach ($my_die as $key => $die) {
|
||||
PMA\libraries\Util::mysqlDie(
|
||||
PhpMyAdmin\Util::mysqlDie(
|
||||
$die['error'], $die['sql'], false, $err_url, $error
|
||||
);
|
||||
}
|
||||
@ -689,7 +689,7 @@ if ($go_sql) {
|
||||
if (Sql::hasNoRightsToDropDatabase(
|
||||
$analyzed_sql_results, $cfg['AllowUserDropDatabase'], $GLOBALS['is_superuser']
|
||||
)) {
|
||||
PMA\libraries\Util::mysqlDie(
|
||||
PhpMyAdmin\Util::mysqlDie(
|
||||
__('"DROP DATABASE" statements are disabled.'),
|
||||
'',
|
||||
false,
|
||||
@ -755,7 +755,7 @@ if ($go_sql) {
|
||||
$response->addJSON('message', PhpMyAdmin\Message::success($msg));
|
||||
$response->addJSON(
|
||||
'sql_query',
|
||||
PMA\libraries\Util::getMessage($msg, $sql_query, 'success')
|
||||
PhpMyAdmin\Util::getMessage($msg, $sql_query, 'success')
|
||||
);
|
||||
} else if ($result == false) {
|
||||
$response->setRequestStatus(false);
|
||||
|
||||
42
index.php
42
index.php
@ -13,8 +13,8 @@ use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\RecentFavoriteTable;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
use PMA\libraries\ThemeManager;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\ThemeManager;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* Gets some core libraries and displays a top message if required
|
||||
@ -71,11 +71,11 @@ if (isset($_REQUEST['ajax_request']) && ! empty($_REQUEST['access_time'])) {
|
||||
if (! empty($_REQUEST['db'])) {
|
||||
$page = null;
|
||||
if (! empty($_REQUEST['table'])) {
|
||||
$page = PMA\libraries\Util::getScriptNameForOption(
|
||||
$page = PhpMyAdmin\Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
);
|
||||
} else {
|
||||
$page = PMA\libraries\Util::getScriptNameForOption(
|
||||
$page = PhpMyAdmin\Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
);
|
||||
}
|
||||
@ -110,7 +110,7 @@ $show_query = '1';
|
||||
|
||||
// Any message to display?
|
||||
if (! empty($message)) {
|
||||
echo PMA\libraries\Util::getMessage($message);
|
||||
echo PhpMyAdmin\Util::getMessage($message);
|
||||
unset($message);
|
||||
}
|
||||
if (isset($_SESSION['partial_logout'])) {
|
||||
@ -120,7 +120,7 @@ if (isset($_SESSION['partial_logout'])) {
|
||||
unset($_SESSION['partial_logout']);
|
||||
}
|
||||
|
||||
$common_url_query = URL::getCommon();
|
||||
$common_url_query = Url::getCommon();
|
||||
$mysql_cur_user_and_host = '';
|
||||
|
||||
// when $server > 0, a server has been chosen so we can display
|
||||
@ -186,7 +186,7 @@ if ($server > 0 || count($cfg['Servers']) > 1
|
||||
) {
|
||||
echo '<li id="li_select_server" class="no_bullets" >';
|
||||
include_once 'libraries/select_server.lib.php';
|
||||
echo PMA\libraries\Util::getImage('s_host.png') , " "
|
||||
echo PhpMyAdmin\Util::getImage('s_host.png') , " "
|
||||
, PMA_selectServer(true, true);
|
||||
echo '</li>';
|
||||
}
|
||||
@ -202,7 +202,7 @@ if ($server > 0 || count($cfg['Servers']) > 1
|
||||
if ($cfg['ShowChgPassword']) {
|
||||
$conditional_class = 'ajax';
|
||||
PMA_printListItem(
|
||||
PMA\libraries\Util::getImage('s_passwd.png') . " " . __(
|
||||
PhpMyAdmin\Util::getImage('s_passwd.png') . " " . __(
|
||||
'Change password'
|
||||
),
|
||||
'li_change_password',
|
||||
@ -217,12 +217,12 @@ 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"
|
||||
. 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')
|
||||
. ' ' . PhpMyAdmin\Util::getImage('s_asci.png')
|
||||
. " " . __('Server connection collation') . "\n"
|
||||
// put the doc link in the form so that it appears on the same line
|
||||
. PMA\libraries\Util::showMySQLDocu('Charset-connection')
|
||||
. PhpMyAdmin\Util::showMySQLDocu('Charset-connection')
|
||||
. ': ' . "\n"
|
||||
. ' </label>' . "\n"
|
||||
|
||||
@ -249,7 +249,7 @@ $language_manager = LanguageManager::getInstance();
|
||||
if (empty($cfg['Lang']) && $language_manager->hasChoice()) {
|
||||
echo '<li id="li_select_lang" class="no_bullets">';
|
||||
|
||||
echo PMA\libraries\Util::getImage('s_lang.png') , " "
|
||||
echo PhpMyAdmin\Util::getImage('s_lang.png') , " "
|
||||
, $language_manager->getSelectorDisplay();
|
||||
echo '</li>';
|
||||
}
|
||||
@ -258,7 +258,7 @@ if (empty($cfg['Lang']) && $language_manager->hasChoice()) {
|
||||
|
||||
if ($GLOBALS['cfg']['ThemeManager']) {
|
||||
echo '<li id="li_select_theme" class="no_bullets">';
|
||||
echo PMA\libraries\Util::getImage('s_theme.png') , " "
|
||||
echo PhpMyAdmin\Util::getImage('s_theme.png') , " "
|
||||
, ThemeManager::getInstance()->getHtmlSelectBox();
|
||||
echo '</li>';
|
||||
}
|
||||
@ -273,7 +273,7 @@ echo '</ul>';
|
||||
if ($server > 0) {
|
||||
echo '<ul>';
|
||||
PMA_printListItem(
|
||||
PMA\libraries\Util::getImage('b_tblops.png') . " " . __(
|
||||
PhpMyAdmin\Util::getImage('b_tblops.png') . " " . __(
|
||||
'More settings'
|
||||
),
|
||||
'li_user_preferences',
|
||||
@ -303,7 +303,7 @@ if ($server > 0 && $GLOBALS['cfg']['ShowServerInfo']) {
|
||||
'li_server_info'
|
||||
);
|
||||
PMA_printListItem(
|
||||
__('Server type:') . ' ' . PMA\libraries\Util::getServerType(),
|
||||
__('Server type:') . ' ' . PhpMyAdmin\Util::getServerType(),
|
||||
'li_server_type'
|
||||
);
|
||||
PMA_printListItem(
|
||||
@ -352,11 +352,11 @@ if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) {
|
||||
|
||||
$php_ext_string = __('PHP extension:') . ' ';
|
||||
|
||||
$extensions = PMA\libraries\Util::listPHPExtensions();
|
||||
$extensions = PhpMyAdmin\Util::listPHPExtensions();
|
||||
|
||||
foreach ($extensions as $extension) {
|
||||
$php_ext_string .= ' ' . $extension
|
||||
. PMA\libraries\Util::showPHPDocu('book.' . $extension . '.php');
|
||||
. PhpMyAdmin\Util::showPHPDocu('book.' . $extension . '.php');
|
||||
}
|
||||
|
||||
PMA_printListItem(
|
||||
@ -405,7 +405,7 @@ PMA_printListItem(
|
||||
PMA_printListItem(
|
||||
__('Documentation'),
|
||||
'li_pma_docs',
|
||||
PMA\libraries\Util::getDocuLink('index'),
|
||||
PhpMyAdmin\Util::getDocuLink('index'),
|
||||
null,
|
||||
'_blank'
|
||||
);
|
||||
@ -435,14 +435,14 @@ PMA_printListItem(
|
||||
PMA_printListItem(
|
||||
__('List of changes'),
|
||||
'li_pma_changes',
|
||||
'changelog.php' . URL::getCommon(),
|
||||
'changelog.php' . Url::getCommon(),
|
||||
null,
|
||||
'_blank'
|
||||
);
|
||||
PMA_printListItem(
|
||||
__('License'),
|
||||
'li_pma_license',
|
||||
'license.php' . URL::getCommon(),
|
||||
'license.php' . Url::getCommon(),
|
||||
null,
|
||||
'_blank'
|
||||
);
|
||||
@ -657,7 +657,7 @@ function PMA_printListItem($name, $listId = null, $url = null,
|
||||
$mysql_help_page = null, $target = null, $a_id = null, $class = null,
|
||||
$a_class = null
|
||||
) {
|
||||
echo PMA\libraries\Template::get('list/item')
|
||||
echo PhpMyAdmin\Template::get('list/item')
|
||||
->render(
|
||||
array(
|
||||
'content' => $name,
|
||||
|
||||
@ -3943,7 +3943,7 @@ function showIndexEditDialog($outer)
|
||||
|
||||
/**
|
||||
* Function to display tooltips that were
|
||||
* generated on the PHP side by PMA\libraries\Util::showHint()
|
||||
* generated on the PHP side by PhpMyAdmin\Util::showHint()
|
||||
*
|
||||
* @param object $div a div jquery object which specifies the
|
||||
* domain for searching for tooltips. If we
|
||||
@ -4203,7 +4203,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
PMA_init_slider();
|
||||
|
||||
/**
|
||||
* Enables the text generated by PMA\libraries\Util::linkOrButton() to be clickable
|
||||
* Enables the text generated by PhpMyAdmin\Util::linkOrButton() to be clickable
|
||||
*/
|
||||
$(document).on('click', 'a.formLinkSubmit', function (e) {
|
||||
if (! $(this).hasClass('requireConfirm')) {
|
||||
|
||||
@ -748,7 +748,7 @@ echo "var themeCalendarImage = '" , $GLOBALS['pmaThemeImage']
|
||||
/* Image path */
|
||||
echo "var pmaThemeImage = '" , $GLOBALS['pmaThemeImage'] , "';\n";
|
||||
|
||||
echo "var mysql_doc_template = '" , PMA\libraries\Util::getMySQLDocuURL('%s')
|
||||
echo "var mysql_doc_template = '" , PhpMyAdmin\Util::getMySQLDocuURL('%s')
|
||||
, "';\n";
|
||||
|
||||
//Max input vars allowed by PHP.
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* Function to get html for one relational key
|
||||
@ -114,7 +114,7 @@ function PMA_getHtmlForRelationalFieldSelection($db, $table, $field, $foreignDat
|
||||
. 'id="browse_foreign_form" name="browse_foreign_from" '
|
||||
. 'action="browse_foreigners.php" method="post">'
|
||||
. '<fieldset>'
|
||||
. URL::getHiddenInputs($db, $table)
|
||||
. Url::getHiddenInputs($db, $table)
|
||||
. '<input type="hidden" name="field" value="' . htmlspecialchars($field)
|
||||
. '" />'
|
||||
. '<input type="hidden" name="fieldkey" value="'
|
||||
@ -307,7 +307,7 @@ function PMA_getHtmlForGotoPage($foreignData)
|
||||
$nbTotalPage = @ceil($foreignData['the_total'] / $session_max_rows);
|
||||
|
||||
if ($foreignData['the_total'] > $GLOBALS['cfg']['MaxRows']) {
|
||||
$gotopage = PMA\libraries\Util::pageselector(
|
||||
$gotopage = PhpMyAdmin\Util::pageselector(
|
||||
'pos',
|
||||
$session_max_rows,
|
||||
$pageNow,
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
*/
|
||||
use PhpMyAdmin\Charsets;
|
||||
use PhpMyAdmin\Message;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* Defines the central_columns parameters for the current user
|
||||
@ -615,7 +615,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">'
|
||||
. URL::getHiddenInputs(
|
||||
. Url::getHiddenInputs(
|
||||
$db
|
||||
)
|
||||
. '<input type="hidden" name="pos" value="' . ($pos - $max_rows) . '" />'
|
||||
@ -630,7 +630,7 @@ function PMA_getHTMLforTableNavigation($total_rows, $pos, $db)
|
||||
$table_navigation_html .= '<td>';
|
||||
$table_navigation_html .= '<form action="db_central_columns.php'
|
||||
. '" method="post">'
|
||||
. URL::getHiddenInputs(
|
||||
. Url::getHiddenInputs(
|
||||
$db
|
||||
)
|
||||
. '<input type="hidden" name="total_rows" value="' . $total_rows . '"/>';
|
||||
@ -643,7 +643,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">'
|
||||
. URL::getHiddenInputs(
|
||||
. Url::getHiddenInputs(
|
||||
$db
|
||||
)
|
||||
. '<input type="hidden" name="pos" value="' . ($pos + $max_rows) . '" />'
|
||||
@ -803,7 +803,7 @@ function PMA_getHTMLforAddCentralColumn($total_rows, $pos, $db)
|
||||
__('Add column')
|
||||
)
|
||||
. '<form id="add_column" action="db_central_columns.php" method="post">'
|
||||
. URL::getHiddenInputs(
|
||||
. Url::getHiddenInputs(
|
||||
$db
|
||||
)
|
||||
. '<input type="hidden" name="add_column" value="add">'
|
||||
@ -834,7 +834,7 @@ function PMA_getHTMLforAddCentralColumn($total_rows, $pos, $db)
|
||||
function PMA_getHTMLforCentralColumnsTableRow($row, $row_num, $db)
|
||||
{
|
||||
$tableHtml = '<tr data-rownum="' . $row_num . '" id="f_' . $row_num . '">'
|
||||
. URL::getHiddenInputs(
|
||||
. Url::getHiddenInputs(
|
||||
$db
|
||||
)
|
||||
. '<input type="hidden" name="edit_save" value="save">'
|
||||
@ -858,7 +858,7 @@ function PMA_getHTMLforCentralColumnsTableRow($row, $row_num, $db)
|
||||
. '<span>' . htmlspecialchars($row['col_name']) . '</span>'
|
||||
. '<input name="orig_col_name" type="hidden" '
|
||||
. 'value="' . htmlspecialchars($row['col_name']) . '">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_name')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_name')
|
||||
->render(
|
||||
array(
|
||||
'columnNumber' => $row_num,
|
||||
@ -876,7 +876,7 @@ function PMA_getHTMLforCentralColumnsTableRow($row, $row_num, $db)
|
||||
$tableHtml .=
|
||||
'<td name = "col_type" class="nowrap"><span>'
|
||||
. htmlspecialchars($row['col_type']) . '</span>'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_type')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_type')
|
||||
->render(
|
||||
array(
|
||||
'column_number' => $row_num,
|
||||
@ -891,7 +891,7 @@ function PMA_getHTMLforCentralColumnsTableRow($row, $row_num, $db)
|
||||
'<td class="nowrap" name="col_length">'
|
||||
. '<span>' . ($row['col_length']?htmlspecialchars($row['col_length']):"")
|
||||
. '</span>'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_length')->render(
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_length')->render(
|
||||
array(
|
||||
'column_number' => $row_num,
|
||||
'ci' => 2,
|
||||
@ -919,7 +919,7 @@ function PMA_getHTMLforCentralColumnsTableRow($row, $row_num, $db)
|
||||
'<td class="nowrap" name="col_default"><span>' . (isset($row['col_default'])
|
||||
? htmlspecialchars($row['col_default']) : 'None')
|
||||
. '</span>'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_default')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_default')
|
||||
->render(
|
||||
array(
|
||||
'columnNumber' => $row_num,
|
||||
@ -945,7 +945,7 @@ function PMA_getHTMLforCentralColumnsTableRow($row, $row_num, $db)
|
||||
($row['col_attribute']
|
||||
? htmlspecialchars($row['col_attribute']) : "" )
|
||||
. '</span>'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_attribute')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_attribute')
|
||||
->render(
|
||||
array(
|
||||
'columnNumber' => $row_num,
|
||||
@ -961,7 +961,7 @@ function PMA_getHTMLforCentralColumnsTableRow($row, $row_num, $db)
|
||||
'<td class="nowrap" name="col_isNull">'
|
||||
. '<span>' . ($row['col_isNull'] ? __('Yes') : __('No'))
|
||||
. '</span>'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_null')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_null')
|
||||
->render(
|
||||
array(
|
||||
'column_number' => $row_num,
|
||||
@ -977,7 +977,7 @@ function PMA_getHTMLforCentralColumnsTableRow($row, $row_num, $db)
|
||||
$tableHtml .=
|
||||
'<td class="nowrap" name="col_extra"><span>'
|
||||
. htmlspecialchars($row['col_extra']) . '</span>'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_extra')->render(
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_extra')->render(
|
||||
array(
|
||||
'column_number' => $row_num,
|
||||
'ci' => 7,
|
||||
@ -1006,7 +1006,7 @@ function PMA_getHTMLforCentralColumnsEditTableRow($row, $row_num)
|
||||
. '<input name="orig_col_name[' . $row_num . ']" type="hidden" '
|
||||
. 'value="' . htmlspecialchars($row['col_name']) . '">'
|
||||
. '<td name="col_name" class="nowrap">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_name')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_name')
|
||||
->render(
|
||||
array(
|
||||
'columnNumber' => $row_num,
|
||||
@ -1023,7 +1023,7 @@ function PMA_getHTMLforCentralColumnsEditTableRow($row, $row_num)
|
||||
. '</td>';
|
||||
$tableHtml .=
|
||||
'<td name = "col_type" class="nowrap">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_type')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_type')
|
||||
->render(
|
||||
array(
|
||||
'column_number' => $row_num,
|
||||
@ -1036,7 +1036,7 @@ function PMA_getHTMLforCentralColumnsEditTableRow($row, $row_num)
|
||||
. '</td>';
|
||||
$tableHtml .=
|
||||
'<td class="nowrap" name="col_length">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_length')->render(
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_length')->render(
|
||||
array(
|
||||
'column_number' => $row_num,
|
||||
'ci' => 2,
|
||||
@ -1061,7 +1061,7 @@ function PMA_getHTMLforCentralColumnsEditTableRow($row, $row_num)
|
||||
}
|
||||
$tableHtml .=
|
||||
'<td class="nowrap" name="col_default">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_default')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_default')
|
||||
->render(
|
||||
array(
|
||||
'columnNumber' => $row_num,
|
||||
@ -1081,7 +1081,7 @@ function PMA_getHTMLforCentralColumnsEditTableRow($row, $row_num)
|
||||
. '</td>';
|
||||
$tableHtml .=
|
||||
'<td class="nowrap" name="col_attribute">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_attribute')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_attribute')
|
||||
->render(
|
||||
array(
|
||||
'columnNumber' => $row_num,
|
||||
@ -1097,7 +1097,7 @@ function PMA_getHTMLforCentralColumnsEditTableRow($row, $row_num)
|
||||
. '</td>';
|
||||
$tableHtml .=
|
||||
'<td class="nowrap" name="col_isNull">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_null')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_null')
|
||||
->render(
|
||||
array(
|
||||
'column_number' => $row_num,
|
||||
@ -1112,7 +1112,7 @@ function PMA_getHTMLforCentralColumnsEditTableRow($row, $row_num)
|
||||
|
||||
$tableHtml .=
|
||||
'<td class="nowrap" name="col_extra">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_extra')->render(
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_extra')->render(
|
||||
array(
|
||||
'column_number' => $row_num,
|
||||
'ci' => 7,
|
||||
@ -1180,7 +1180,7 @@ function PMA_getCentralColumnsListRaw($db, $table)
|
||||
*/
|
||||
function PMA_getCentralColumnsTableFooter($pmaThemeImage, $text_dir)
|
||||
{
|
||||
$html_output = PMA\libraries\Template::get('select_all')
|
||||
$html_output = PhpMyAdmin\Template::get('select_all')
|
||||
->render(
|
||||
array(
|
||||
'pma_theme_image' => $pmaThemeImage,
|
||||
@ -1263,7 +1263,7 @@ function PMA_getHTMLforAddNewColumn($db, $total_rows)
|
||||
. '<form id="add_new" class="new_central_col '
|
||||
. ($total_rows != 0 ? 'hide"' : '"')
|
||||
. 'method="post" action="db_central_columns.php">'
|
||||
. URL::getHiddenInputs(
|
||||
. Url::getHiddenInputs(
|
||||
$db
|
||||
)
|
||||
. '<input type="hidden" name="add_new_column" value="add_new_column">'
|
||||
@ -1272,7 +1272,7 @@ function PMA_getHTMLforAddNewColumn($db, $total_rows)
|
||||
$addNewColumn .= '<tr>'
|
||||
. '<td></td>'
|
||||
. '<td name="col_name" class="nowrap">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_name')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_name')
|
||||
->render(
|
||||
array(
|
||||
'columnNumber' => 0,
|
||||
@ -1286,7 +1286,7 @@ function PMA_getHTMLforAddNewColumn($db, $total_rows)
|
||||
)
|
||||
. '</td>'
|
||||
. '<td name = "col_type" class="nowrap">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_type')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_type')
|
||||
->render(
|
||||
array(
|
||||
'column_number' => 0,
|
||||
@ -1298,7 +1298,7 @@ function PMA_getHTMLforAddNewColumn($db, $total_rows)
|
||||
)
|
||||
. '</td>'
|
||||
. '<td class="nowrap" name="col_length">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_length')->render(
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_length')->render(
|
||||
array(
|
||||
'column_number' => 0,
|
||||
'ci' => 2,
|
||||
@ -1309,7 +1309,7 @@ function PMA_getHTMLforAddNewColumn($db, $total_rows)
|
||||
)
|
||||
. '</td>'
|
||||
. '<td class="nowrap" name="col_default">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_default')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_default')
|
||||
->render(
|
||||
array(
|
||||
'columnNumber' => 0,
|
||||
@ -1327,7 +1327,7 @@ function PMA_getHTMLforAddNewColumn($db, $total_rows)
|
||||
)
|
||||
. '</td>'
|
||||
. '<td class="nowrap" name="col_attribute">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_attribute')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_attribute')
|
||||
->render(
|
||||
array(
|
||||
'columnNumber' => 0,
|
||||
@ -1340,7 +1340,7 @@ function PMA_getHTMLforAddNewColumn($db, $total_rows)
|
||||
)
|
||||
. '</td>'
|
||||
. '<td class="nowrap" name="col_isNull">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_null')
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_null')
|
||||
->render(
|
||||
array(
|
||||
'column_number' => 0,
|
||||
@ -1351,7 +1351,7 @@ function PMA_getHTMLforAddNewColumn($db, $total_rows)
|
||||
)
|
||||
. '</td>'
|
||||
. '<td class="nowrap" name="col_extra">'
|
||||
. PMA\libraries\Template::get('columns_definitions/column_extra')->render(
|
||||
. PhpMyAdmin\Template::get('columns_definitions/column_extra')->render(
|
||||
array(
|
||||
'column_number' => 0,
|
||||
'ci' => 7,
|
||||
|
||||
@ -29,7 +29,7 @@ function PMA_getItemsFromShowGrantsRow($row)
|
||||
mb_strpos($row, '.', $db_name_offset) - $db_name_offset
|
||||
);
|
||||
|
||||
$show_grants_dbname = PMA\libraries\Util::unQuote($show_grants_dbname, '`');
|
||||
$show_grants_dbname = PhpMyAdmin\Util::unQuote($show_grants_dbname, '`');
|
||||
|
||||
$show_grants_str = mb_substr(
|
||||
$row,
|
||||
@ -45,7 +45,7 @@ function PMA_getItemsFromShowGrantsRow($row)
|
||||
$row, $tblname_start_offset,
|
||||
$tblname_end_offset - $tblname_start_offset
|
||||
);
|
||||
$show_grants_tblname = PMA\libraries\Util::unQuote($show_grants_tblname, '`');
|
||||
$show_grants_tblname = PhpMyAdmin\Util::unQuote($show_grants_tblname, '`');
|
||||
|
||||
return array(
|
||||
$show_grants_str,
|
||||
@ -141,33 +141,33 @@ function PMA_checkRequiredPrivilegesForAdjust(
|
||||
*/
|
||||
function PMA_analyseShowGrant()
|
||||
{
|
||||
if (PMA\libraries\Util::cacheExists('is_create_db_priv')) {
|
||||
$GLOBALS['is_create_db_priv'] = PMA\libraries\Util::cacheGet(
|
||||
if (PhpMyAdmin\Util::cacheExists('is_create_db_priv')) {
|
||||
$GLOBALS['is_create_db_priv'] = PhpMyAdmin\Util::cacheGet(
|
||||
'is_create_db_priv'
|
||||
);
|
||||
$GLOBALS['is_reload_priv'] = PMA\libraries\Util::cacheGet(
|
||||
$GLOBALS['is_reload_priv'] = PhpMyAdmin\Util::cacheGet(
|
||||
'is_reload_priv'
|
||||
);
|
||||
$GLOBALS['db_to_create'] = PMA\libraries\Util::cacheGet(
|
||||
$GLOBALS['db_to_create'] = PhpMyAdmin\Util::cacheGet(
|
||||
'db_to_create'
|
||||
);
|
||||
$GLOBALS['dbs_where_create_table_allowed'] = PMA\libraries\Util::cacheGet(
|
||||
$GLOBALS['dbs_where_create_table_allowed'] = PhpMyAdmin\Util::cacheGet(
|
||||
'dbs_where_create_table_allowed'
|
||||
);
|
||||
$GLOBALS['dbs_to_test'] = PMA\libraries\Util::cacheGet(
|
||||
$GLOBALS['dbs_to_test'] = PhpMyAdmin\Util::cacheGet(
|
||||
'dbs_to_test'
|
||||
);
|
||||
|
||||
$GLOBALS['db_priv'] = PMA\libraries\Util::cacheGet(
|
||||
$GLOBALS['db_priv'] = PhpMyAdmin\Util::cacheGet(
|
||||
'db_priv'
|
||||
);
|
||||
$GLOBALS['col_priv'] = PMA\libraries\Util::cacheGet(
|
||||
$GLOBALS['col_priv'] = PhpMyAdmin\Util::cacheGet(
|
||||
'col_priv'
|
||||
);
|
||||
$GLOBALS['table_priv'] = PMA\libraries\Util::cacheGet(
|
||||
$GLOBALS['table_priv'] = PhpMyAdmin\Util::cacheGet(
|
||||
'table_priv'
|
||||
);
|
||||
$GLOBALS['proc_priv'] = PMA\libraries\Util::cacheGet(
|
||||
$GLOBALS['proc_priv'] = PhpMyAdmin\Util::cacheGet(
|
||||
'proc_priv'
|
||||
);
|
||||
|
||||
@ -244,7 +244,7 @@ function PMA_analyseShowGrant()
|
||||
// this array may contain wildcards
|
||||
$GLOBALS['dbs_where_create_table_allowed'][] = $show_grants_dbname;
|
||||
|
||||
$dbname_to_test = PMA\libraries\Util::backquote($show_grants_dbname);
|
||||
$dbname_to_test = PhpMyAdmin\Util::backquote($show_grants_dbname);
|
||||
|
||||
if ($GLOBALS['is_create_db_priv']) {
|
||||
// no need for any more tests if we already know this
|
||||
@ -291,19 +291,19 @@ function PMA_analyseShowGrant()
|
||||
|
||||
// must also cacheUnset() them in
|
||||
// libraries/plugins/auth/AuthenticationCookie.php
|
||||
PMA\libraries\Util::cacheSet('is_create_db_priv', $GLOBALS['is_create_db_priv']);
|
||||
PMA\libraries\Util::cacheSet('is_reload_priv', $GLOBALS['is_reload_priv']);
|
||||
PMA\libraries\Util::cacheSet('db_to_create', $GLOBALS['db_to_create']);
|
||||
PMA\libraries\Util::cacheSet(
|
||||
PhpMyAdmin\Util::cacheSet('is_create_db_priv', $GLOBALS['is_create_db_priv']);
|
||||
PhpMyAdmin\Util::cacheSet('is_reload_priv', $GLOBALS['is_reload_priv']);
|
||||
PhpMyAdmin\Util::cacheSet('db_to_create', $GLOBALS['db_to_create']);
|
||||
PhpMyAdmin\Util::cacheSet(
|
||||
'dbs_where_create_table_allowed',
|
||||
$GLOBALS['dbs_where_create_table_allowed']
|
||||
);
|
||||
PMA\libraries\Util::cacheSet('dbs_to_test', $GLOBALS['dbs_to_test']);
|
||||
PhpMyAdmin\Util::cacheSet('dbs_to_test', $GLOBALS['dbs_to_test']);
|
||||
|
||||
PMA\libraries\Util::cacheSet('proc_priv', $GLOBALS['proc_priv']);
|
||||
PMA\libraries\Util::cacheSet('table_priv', $GLOBALS['table_priv']);
|
||||
PMA\libraries\Util::cacheSet('col_priv', $GLOBALS['col_priv']);
|
||||
PMA\libraries\Util::cacheSet('db_priv', $GLOBALS['db_priv']);
|
||||
PhpMyAdmin\Util::cacheSet('proc_priv', $GLOBALS['proc_priv']);
|
||||
PhpMyAdmin\Util::cacheSet('table_priv', $GLOBALS['table_priv']);
|
||||
PhpMyAdmin\Util::cacheSet('col_priv', $GLOBALS['col_priv']);
|
||||
PhpMyAdmin\Util::cacheSet('db_priv', $GLOBALS['db_priv']);
|
||||
} // end function
|
||||
|
||||
list($username, $hostname) = $GLOBALS['dbi']->getCurrentUserAndHost();
|
||||
|
||||
@ -10,8 +10,8 @@ namespace PhpMyAdmin;
|
||||
|
||||
use Exception;
|
||||
use PhpMyAdmin\Core;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
|
||||
|
||||
/**
|
||||
@ -407,7 +407,7 @@ class Advisor
|
||||
// linking to server_variables.php
|
||||
$rule['recommendation'] = preg_replace(
|
||||
'/\{([a-z_0-9]+)\}/Ui',
|
||||
'<a href="server_variables.php' . URL::getCommon()
|
||||
'<a href="server_variables.php' . Url::getCommon()
|
||||
. '&filter=\1">\1</a>',
|
||||
$this->translate($rule['recommendation'])
|
||||
);
|
||||
@ -599,7 +599,7 @@ class Advisor
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper for PMA\libraries\Util::timespanFormat
|
||||
* Wrapper for PhpMyAdmin\Util::timespanFormat
|
||||
*
|
||||
* This function is used when evaluating advisory_rules.txt
|
||||
*
|
||||
@ -613,7 +613,7 @@ class Advisor
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper around PMA\libraries\Util::formatByteDown
|
||||
* Wrapper around PhpMyAdmin\Util::formatByteDown
|
||||
*
|
||||
* This function is used when evaluating advisory_rules.txt
|
||||
*
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Handles bookmarking SQL queries
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
*/
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Class used to manage MySQL charsets
|
||||
|
||||
@ -11,9 +11,9 @@ use DirectoryIterator;
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Error;
|
||||
use PhpMyAdmin\LanguageManager;
|
||||
use PMA\libraries\ThemeManager;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\ThemeManager;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Indication for error handler (see end of this file).
|
||||
@ -1582,7 +1582,7 @@ class Config
|
||||
{
|
||||
return '<form name="form_fontsize_selection" id="form_fontsize_selection"'
|
||||
. ' method="get" action="index.php" class="disableAjax">' . "\n"
|
||||
. URL::getHiddenInputs() . "\n"
|
||||
. Url::getHiddenInputs() . "\n"
|
||||
. Config::getFontsizeSelection() . "\n"
|
||||
. '</form>';
|
||||
}
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\Bookmark;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
|
||||
@ -13,9 +13,9 @@ use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Core class
|
||||
@ -682,7 +682,7 @@ class Core
|
||||
$params = array();
|
||||
$params['url'] = $url;
|
||||
|
||||
$url = 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);
|
||||
|
||||
@ -13,10 +13,10 @@ use PhpMyAdmin\Error;
|
||||
use PhpMyAdmin\Index;
|
||||
use PhpMyAdmin\LanguageManager;
|
||||
use PhpMyAdmin\SystemDatabase;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\Tracker;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Table;
|
||||
use PhpMyAdmin\Tracker;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
require_once './libraries/util.lib.php';
|
||||
|
||||
@ -2046,7 +2046,7 @@ class DatabaseInterface
|
||||
$error .= $separator . __('The server is not responding.');
|
||||
} elseif ($error_number == 1698 ) {
|
||||
$error .= ' - ' . $error_message;
|
||||
$error .= $separator . '<a href="logout.php' . URL::getCommon() . '">';
|
||||
$error .= $separator . '<a href="logout.php' . Url::getCommon() . '">';
|
||||
$error .= __('Logout and try as another user.') . '</a>';
|
||||
} elseif ($error_number == 1005) {
|
||||
if (strpos($error_message, 'errno: 13') !== false) {
|
||||
@ -2062,7 +2062,7 @@ class DatabaseInterface
|
||||
*/
|
||||
$error .= ' - ' . $error_message .
|
||||
' (<a href="server_engines.php' .
|
||||
URL::getCommon(
|
||||
Url::getCommon(
|
||||
array('engine' => 'InnoDB', 'page' => 'Status')
|
||||
) . '">' . __('Details…') . '</a>)';
|
||||
}
|
||||
|
||||
@ -9,9 +9,9 @@ namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Table;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Class to handle database QBE search
|
||||
@ -1563,7 +1563,7 @@ class DbQbe
|
||||
if (empty($from_clause)) {
|
||||
// Create cartesian product
|
||||
$from_clause = implode(
|
||||
", ", array_map(array('PMA\libraries\Util', 'backquote'), $search_tables)
|
||||
", ", array_map(array('PhpMyAdmin\Util', 'backquote'), $search_tables)
|
||||
);
|
||||
}
|
||||
|
||||
@ -1669,7 +1669,7 @@ class DbQbe
|
||||
if (count($unfinalized) > 0) {
|
||||
// Add these tables as cartesian product before joined tables
|
||||
$join .= implode(
|
||||
', ', array_map(array('PMA\libraries\Util', 'backquote'), $unfinalized)
|
||||
', ', array_map(array('PhpMyAdmin\Util', 'backquote'), $unfinalized)
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1831,7 +1831,7 @@ class DbQbe
|
||||
$url_params['db'] = $this->_db;
|
||||
$url_params['criteriaColumnCount'] = $this->_new_column_count;
|
||||
$url_params['rows'] = $this->_new_row_count;
|
||||
$html_output .= URL::getHiddenInputs($url_params);
|
||||
$html_output .= Url::getHiddenInputs($url_params);
|
||||
$html_output .= '</fieldset>';
|
||||
// get footers
|
||||
$html_output .= $this->_getTableFooters();
|
||||
@ -1839,7 +1839,7 @@ class DbQbe
|
||||
$html_output .= $this->_getTablesList();
|
||||
$html_output .= '</form>';
|
||||
$html_output .= '<form action="db_qbe.php" method="post" class="lock-page">';
|
||||
$html_output .= 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>';
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\Sanitize;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Class to handle database search
|
||||
@ -337,7 +337,7 @@ class DbSearch
|
||||
if ($res_cnt > 0) {
|
||||
$this_url_params['db'] = htmlspecialchars($GLOBALS['db']);
|
||||
$this_url_params['table'] = htmlspecialchars($each_table);
|
||||
$browse_result_path = 'sql.php' . URL::getCommon($this_url_params);
|
||||
$browse_result_path = 'sql.php' . Url::getCommon($this_url_params);
|
||||
$html_output .= '<td><a name="browse_search" '
|
||||
. ' class="ajax browse_results" href="'
|
||||
. $browse_result_path . '" '
|
||||
@ -371,7 +371,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 .= URL::getHiddenInputs($GLOBALS['db']);
|
||||
$html_output .= Url::getHiddenInputs($GLOBALS['db']);
|
||||
$html_output .= '<fieldset>';
|
||||
// set legend caption
|
||||
$html_output .= '<legend>' . __('Search in database') . '</legend>';
|
||||
|
||||
@ -16,11 +16,11 @@ use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
use PhpMyAdmin\Sql;
|
||||
use PhpMyAdmin\SqlParser\Utils\Query;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Transformations;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Table;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Transformations;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Handle all the functionalities related to displaying results
|
||||
@ -747,7 +747,7 @@ class DisplayResults
|
||||
|
||||
return '<td>'
|
||||
. '<form action="sql.php" method="post" ' . $onsubmit . '>'
|
||||
. URL::getHiddenInputs(
|
||||
. Url::getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
)
|
||||
. '<input type="hidden" name="sql_query" value="'
|
||||
@ -802,7 +802,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" method="post">';
|
||||
$table_navigation_html .= URL::getHiddenInputs($_url_params);
|
||||
$table_navigation_html .= Url::getHiddenInputs($_url_params);
|
||||
|
||||
$table_navigation_html .= Util::pageselector(
|
||||
'pos',
|
||||
@ -949,7 +949,7 @@ class DisplayResults
|
||||
. ')'
|
||||
. '">';
|
||||
|
||||
$table_navigation_html .= URL::getHiddenInputs(
|
||||
$table_navigation_html .= Url::getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
);
|
||||
|
||||
@ -1021,7 +1021,7 @@ class DisplayResults
|
||||
return "\n"
|
||||
. '<td>'
|
||||
. '<form action="sql.php" method="post">'
|
||||
. URL::getHiddenInputs(
|
||||
. Url::getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
)
|
||||
. '<input type="hidden" name="sql_query" value="'
|
||||
@ -1300,7 +1300,7 @@ class DisplayResults
|
||||
$table_headers_html .= '<input class="save_cells_at_once" type="hidden"'
|
||||
. ' value="' . $GLOBALS['cfg']['SaveCellsAtOnce'] . '" />'
|
||||
. '<div class="common_hidden_inputs">'
|
||||
. URL::getHiddenInputs(
|
||||
. Url::getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
)
|
||||
. '</div>';
|
||||
@ -1434,11 +1434,11 @@ class DisplayResults
|
||||
|
||||
$drop_down_html .= '<form action="sql.php" method="post" ' .
|
||||
'class="print_ignore">' . "\n"
|
||||
. URL::getHiddenInputs(
|
||||
. Url::getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table')
|
||||
)
|
||||
// to avoid calling Sql::handleSortOrder() later
|
||||
. URL::getHiddenFields(array('sort_by_key' => '1'))
|
||||
. Url::getHiddenFields(array('sort_by_key' => '1'))
|
||||
. __('Sort by key')
|
||||
. ': <select name="sql_query" class="autosubmit">' . "\n";
|
||||
|
||||
@ -1719,7 +1719,7 @@ class DisplayResults
|
||||
'display_options_form' => 1
|
||||
);
|
||||
|
||||
$options_html .= URL::getHiddenInputs($url_params)
|
||||
$options_html .= Url::getHiddenInputs($url_params)
|
||||
. '<br />'
|
||||
. Util::getDivForSliderEffect(
|
||||
'', __('Options')
|
||||
@ -1859,7 +1859,7 @@ class DisplayResults
|
||||
|
||||
$tmp_image = '<img class="fulltext" src="' . $tmp_image_file . '" alt="'
|
||||
. $tmp_txt . '" title="' . $tmp_txt . '" />';
|
||||
$tmp_url = 'sql.php' . 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
|
||||
@ -1893,7 +1893,7 @@ class DisplayResults
|
||||
$form_html .= ' class="ajax" ';
|
||||
|
||||
$form_html .= '>'
|
||||
. URL::getHiddenInputs(
|
||||
. Url::getHiddenInputs(
|
||||
$this->__get('db'), $this->__get('table'), 1
|
||||
)
|
||||
. '<input type="hidden" name="goto" value="sql.php" />';
|
||||
@ -2025,8 +2025,8 @@ class DisplayResults
|
||||
'session_max_rows' => $session_max_rows,
|
||||
'is_browse_distinct' => $this->__get('is_browse_distinct'),
|
||||
);
|
||||
$single_order_url = 'sql.php' . URL::getCommon($_single_url_params);
|
||||
$multi_order_url = 'sql.php' . 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
|
||||
@ -2299,10 +2299,10 @@ class DisplayResults
|
||||
/**
|
||||
* Get sort order link
|
||||
*
|
||||
* @param string $order_img the sort order image
|
||||
* @param array $fields_meta set of field properties
|
||||
* @param string $order_url the url for sort
|
||||
* @param string $multi_order_url the url for sort
|
||||
* @param string $order_img the sort order image
|
||||
* @param array $fields_meta set of field properties
|
||||
* @param string $order_url the url for sort
|
||||
* @param string $multi_order_url the url for sort
|
||||
*
|
||||
* @return string the sort order link
|
||||
*
|
||||
@ -3165,7 +3165,7 @@ class DisplayResults
|
||||
$_url_params['sql_query'] = $url_sql_query;
|
||||
}
|
||||
|
||||
$transform_options['wrapper_link'] = URL::getCommon($_url_params);
|
||||
$transform_options['wrapper_link'] = Url::getCommon($_url_params);
|
||||
|
||||
$display_params = $this->__get('display_params');
|
||||
|
||||
@ -3284,7 +3284,7 @@ class DisplayResults
|
||||
$divider = strpos($link_relations['default_page'], '?') ? '&' : '?';
|
||||
if (empty($link_relations['link_dependancy_params'])) {
|
||||
return $link_relations['default_page']
|
||||
. URL::getCommonRaw($linking_url_params, $divider);
|
||||
. Url::getCommonRaw($linking_url_params, $divider);
|
||||
}
|
||||
|
||||
foreach ($link_relations['link_dependancy_params'] as $new_param) {
|
||||
@ -3308,7 +3308,7 @@ class DisplayResults
|
||||
}
|
||||
|
||||
return $link_relations['default_page']
|
||||
. URL::getCommonRaw($linking_url_params, $divider);
|
||||
. Url::getCommonRaw($linking_url_params, $divider);
|
||||
}
|
||||
|
||||
|
||||
@ -3473,12 +3473,12 @@ class DisplayResults
|
||||
);
|
||||
|
||||
$edit_url = 'tbl_change.php'
|
||||
. URL::getCommon(
|
||||
. Url::getCommon(
|
||||
$_url_params + array('default_action' => 'update')
|
||||
);
|
||||
|
||||
$copy_url = 'tbl_change.php'
|
||||
. URL::getCommon(
|
||||
. Url::getCommon(
|
||||
$_url_params + array('default_action' => 'insert')
|
||||
);
|
||||
|
||||
@ -3532,7 +3532,7 @@ class DisplayResults
|
||||
'goto' => (empty($goto) ? 'tbl_sql.php' : $goto),
|
||||
);
|
||||
|
||||
$lnk_goto = 'sql.php' . URL::getCommonRaw($_url_params);
|
||||
$lnk_goto = 'sql.php' . Url::getCommonRaw($_url_params);
|
||||
|
||||
$del_query = 'DELETE FROM '
|
||||
. Util::backquote($this->__get('table'))
|
||||
@ -3546,7 +3546,7 @@ class DisplayResults
|
||||
'message_to_show' => __('The row has been deleted.'),
|
||||
'goto' => $lnk_goto,
|
||||
);
|
||||
$del_url = 'sql.php' . URL::getCommon($_url_params);
|
||||
$del_url = 'sql.php' . Url::getCommon($_url_params);
|
||||
|
||||
$js_conf = 'DELETE FROM ' . Sanitize::jsFormat($this->__get('table'))
|
||||
. ' WHERE ' . Sanitize::jsFormat($where_clause, false)
|
||||
@ -3563,7 +3563,7 @@ class DisplayResults
|
||||
'goto' => 'index.php',
|
||||
);
|
||||
|
||||
$lnk_goto = 'sql.php' . URL::getCommonRaw($_url_params);
|
||||
$lnk_goto = 'sql.php' . Url::getCommonRaw($_url_params);
|
||||
|
||||
$kill = $GLOBALS['dbi']->getKillQuery($row[0]);
|
||||
|
||||
@ -3573,7 +3573,7 @@ class DisplayResults
|
||||
'goto' => $lnk_goto,
|
||||
);
|
||||
|
||||
$del_url = 'sql.php' . URL::getCommon($_url_params);
|
||||
$del_url = 'sql.php' . Url::getCommon($_url_params);
|
||||
$js_conf = $kill;
|
||||
$del_str = Util::getIcon(
|
||||
'b_drop.png', __('Kill')
|
||||
@ -5073,7 +5073,7 @@ class DisplayResults
|
||||
'printview' => '1',
|
||||
'sql_query' => $this->__get('sql_query'),
|
||||
);
|
||||
$url_query = URL::getCommon($_url_params);
|
||||
$url_query = Url::getCommon($_url_params);
|
||||
|
||||
if (!$header_shown) {
|
||||
$results_operations_html .= $header;
|
||||
@ -5138,7 +5138,7 @@ class DisplayResults
|
||||
}
|
||||
|
||||
$results_operations_html .= Util::linkOrButton(
|
||||
'tbl_export.php' . URL::getCommon($_url_params),
|
||||
'tbl_export.php' . Url::getCommon($_url_params),
|
||||
Util::getIcon(
|
||||
'b_tblexport.png', __('Export'), true
|
||||
),
|
||||
@ -5151,7 +5151,7 @@ class DisplayResults
|
||||
|
||||
// prepare chart
|
||||
$results_operations_html .= Util::linkOrButton(
|
||||
'tbl_chart.php' . URL::getCommon($_url_params),
|
||||
'tbl_chart.php' . Url::getCommon($_url_params),
|
||||
Util::getIcon(
|
||||
'b_chart.png', __('Display chart'), true
|
||||
),
|
||||
@ -5176,7 +5176,7 @@ class DisplayResults
|
||||
$results_operations_html
|
||||
.= Util::linkOrButton(
|
||||
'tbl_gis_visualization.php'
|
||||
. URL::getCommon($_url_params),
|
||||
. Url::getCommon($_url_params),
|
||||
Util::getIcon(
|
||||
'b_globe.gif', __('Visualize GIS data'), true
|
||||
),
|
||||
@ -5321,7 +5321,7 @@ class DisplayResults
|
||||
&& (!empty($tmpdb) && !empty($meta->orgtable))
|
||||
) {
|
||||
$result = '<a href="tbl_get_field.php'
|
||||
. URL::getCommon($url_params)
|
||||
. Url::getCommon($url_params)
|
||||
. '" class="disableAjax">'
|
||||
. $result . '</a>';
|
||||
}
|
||||
@ -5489,7 +5489,7 @@ class DisplayResults
|
||||
);
|
||||
|
||||
$result .= '<a class="ajax" href="sql.php'
|
||||
. URL::getCommon($_url_params)
|
||||
. Url::getCommon($_url_params)
|
||||
. '"' . $title . '>';
|
||||
|
||||
if ($transformation_plugin != $default_function) {
|
||||
|
||||
@ -9,7 +9,7 @@ namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\Error;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* handling errors
|
||||
@ -352,7 +352,7 @@ class ErrorHandler
|
||||
$retval .= ' class="hide"';
|
||||
}
|
||||
$retval .= '>';
|
||||
$retval .= URL::getHiddenFields(array(
|
||||
$retval .= Url::getHiddenFields(array(
|
||||
'exception_type' => 'php',
|
||||
'send_error_report' => '1',
|
||||
));
|
||||
|
||||
@ -10,7 +10,7 @@ namespace PhpMyAdmin;
|
||||
use PMA\libraries\config\ConfigFile;
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Message;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\ZipExtension;
|
||||
|
||||
/**
|
||||
|
||||
@ -13,8 +13,8 @@ use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
use PhpMyAdmin\Scripts;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
use Traversable;
|
||||
|
||||
/**
|
||||
@ -182,7 +182,7 @@ class Footer
|
||||
) {
|
||||
$params['single_table'] = $_REQUEST['single_table'];
|
||||
}
|
||||
return basename(Core::getenv('SCRIPT_NAME')) . URL::getCommonRaw($params);
|
||||
return basename(Core::getenv('SCRIPT_NAME')) . Url::getCommonRaw($params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -16,8 +16,8 @@ use PMA\libraries\navigation\Navigation;
|
||||
use PhpMyAdmin\RecentFavoriteTable;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
use PhpMyAdmin\Scripts;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Class used to output the HTTP and HTML headers
|
||||
@ -225,7 +225,7 @@ class Header
|
||||
}
|
||||
|
||||
$params = array(
|
||||
'common_query' => URL::getCommonRaw(),
|
||||
'common_query' => Url::getCommonRaw(),
|
||||
'opendb_url' => Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
),
|
||||
|
||||
@ -10,8 +10,8 @@ namespace PhpMyAdmin;
|
||||
use PhpMyAdmin\IndexColumn;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Index manipulation class
|
||||
@ -651,7 +651,7 @@ class Index
|
||||
);
|
||||
$html_output .= '<fieldset class="tblFooters print_ignore" style="text-align: '
|
||||
. 'left;"><form action="tbl_indexes.php" method="post">';
|
||||
$html_output .= URL::getHiddenInputs(
|
||||
$html_output .= Url::getHiddenInputs(
|
||||
$GLOBALS['db'], $GLOBALS['table']
|
||||
);
|
||||
$html_output .= sprintf(
|
||||
@ -741,7 +741,7 @@ class Index
|
||||
$r .= '" ' . $row_span . '>'
|
||||
. ' <a class="';
|
||||
$r .= 'ajax';
|
||||
$r .= '" href="tbl_indexes.php' . 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'];
|
||||
@ -767,7 +767,7 @@ class Index
|
||||
. ' value="' . $js_msg . '" />';
|
||||
$r .= ' <a class="drop_primary_key_index_anchor';
|
||||
$r .= ' ajax';
|
||||
$r .= '" href="sql.php' . URL::getCommon($this_params)
|
||||
$r .= '" href="sql.php' . Url::getCommon($this_params)
|
||||
. '" >'
|
||||
. Util::getIcon('b_drop.png', __('Drop')) . '</a>'
|
||||
. '</td>' . "\n";
|
||||
|
||||
@ -9,9 +9,9 @@ namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Language;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Language selection manager
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\ListAbstract;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
require_once './libraries/check_user_privileges.lib.php';
|
||||
|
||||
|
||||
@ -8,9 +8,9 @@
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PMA\libraries\Tracker;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Tracker;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Class for generating the top menu
|
||||
@ -208,7 +208,7 @@ class Menu
|
||||
Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabServer'], 'server'
|
||||
),
|
||||
URL::getCommon(),
|
||||
Url::getCommon(),
|
||||
htmlspecialchars($server_info),
|
||||
__('Server')
|
||||
);
|
||||
@ -227,7 +227,7 @@ class Menu
|
||||
Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
),
|
||||
URL::getCommon(array('db' => $this->_db)),
|
||||
Url::getCommon(array('db' => $this->_db)),
|
||||
htmlspecialchars($this->_db),
|
||||
__('Database')
|
||||
);
|
||||
@ -261,7 +261,7 @@ class Menu
|
||||
Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
),
|
||||
URL::getCommon(
|
||||
Url::getCommon(
|
||||
array(
|
||||
'db' => $this->_db, 'table' => $this->_table
|
||||
)
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\Sanitize;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* a single message
|
||||
|
||||
@ -10,7 +10,7 @@ namespace PhpMyAdmin;
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
use TCPDF;
|
||||
use TCPDF_FONTS;
|
||||
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\Message;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Handles the recently used and favorite tables.
|
||||
@ -188,7 +188,7 @@ class RecentFavoriteTable
|
||||
'table' => $table['table']
|
||||
);
|
||||
$recent_url = 'tbl_recent_favorite.php'
|
||||
. URL::getCommon($recent_params);
|
||||
. Url::getCommon($recent_params);
|
||||
$html .= '<a href="' . $recent_url . '">`'
|
||||
. htmlspecialchars($table['db']) . '`.`'
|
||||
. htmlspecialchars($table['table']) . '`</a>';
|
||||
@ -206,7 +206,7 @@ class RecentFavoriteTable
|
||||
'remove_favorite' => true
|
||||
);
|
||||
$fav_rm_url = 'db_structure.php'
|
||||
. URL::getCommon($fav_params);
|
||||
. Url::getCommon($fav_params);
|
||||
$html .= 'href="' . $fav_rm_url
|
||||
. '" title="' . __("Remove from Favorites")
|
||||
. '" data-favtargetn="'
|
||||
@ -220,7 +220,7 @@ class RecentFavoriteTable
|
||||
'table' => $table['table']
|
||||
);
|
||||
$table_url = 'tbl_recent_favorite.php'
|
||||
. URL::getCommon($fav_params);
|
||||
. Url::getCommon($fav_params);
|
||||
$html .= '<a href="' . $table_url . '">`'
|
||||
. htmlspecialchars($table['db']) . '`.`'
|
||||
. htmlspecialchars($table['table']) . '`</a>';
|
||||
@ -353,7 +353,7 @@ class RecentFavoriteTable
|
||||
if ($cfgRelation['favoritework'] && ! isset($_SESSION['tmpval']['favorites_synced'][$server_id])) {
|
||||
$params = array('ajax_request' => true, 'favorite_table' => true,
|
||||
'sync_favorite_tables' => true);
|
||||
$url = 'db_structure.php' . URL::getCommon($params);
|
||||
$url = 'db_structure.php' . Url::getCommon($params);
|
||||
$retval = '<a class="hide" id="sync_favorite_tables"';
|
||||
$retval .= ' href="' . $url . '"></a>';
|
||||
}
|
||||
@ -368,7 +368,7 @@ class RecentFavoriteTable
|
||||
public static function getHtmlUpdateRecentTables()
|
||||
{
|
||||
$params = array('ajax_request' => true, 'recent_table' => true);
|
||||
$url = 'index.php' . URL::getCommon($params);
|
||||
$url = 'index.php' . Url::getCommon($params);
|
||||
$retval = '<a class="hide" id="update_recent_tables"';
|
||||
$retval .= ' href="' . $url . '"></a>';
|
||||
return $retval;
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\Core;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* This class includes various sanitization methods that can be called statically
|
||||
|
||||
@ -9,7 +9,7 @@ namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Saved searches managing
|
||||
|
||||
@ -9,7 +9,7 @@ namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\Header;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* Collects information about which JavaScript
|
||||
@ -47,10 +47,10 @@ class Scripts
|
||||
$first_dynamic_scripts = "";
|
||||
$dynamic_scripts = "";
|
||||
$scripts = array();
|
||||
$separator = URL::getArgSeparator();
|
||||
$separator = Url::getArgSeparator();
|
||||
foreach ($files as $value) {
|
||||
if (mb_strpos($value['filename'], ".php") !== false) {
|
||||
$file_name = $value['filename'] . URL::getCommon($value['params'] + array('v' => PMA_VERSION));
|
||||
$file_name = $value['filename'] . Url::getCommon($value['params'] + array('v' => PMA_VERSION));
|
||||
if ($value['before_statics'] === true) {
|
||||
$first_dynamic_scripts
|
||||
.= "<script data-cfasync='false' type='text/javascript' "
|
||||
@ -67,7 +67,7 @@ class Scripts
|
||||
$scripts[] = "scripts%5B%5D=" . $value['filename'];
|
||||
}
|
||||
}
|
||||
$separator = URL::getArgSeparator();
|
||||
$separator = Url::getArgSeparator();
|
||||
$static_scripts = '';
|
||||
// Using chunks of 10 files to avoid too long URLs
|
||||
// as some servers are set to 512 bytes URL limit
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
*/
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* This class provides data about the server status
|
||||
@ -144,13 +144,13 @@ class ServerStatusData
|
||||
// variable or section name => (name => url)
|
||||
|
||||
$links['table'][__('Flush (close) all tables')] = $this->selfUrl
|
||||
. URL::getCommon(
|
||||
. Url::getCommon(
|
||||
array(
|
||||
'flush' => 'TABLES'
|
||||
)
|
||||
);
|
||||
$links['table'][__('Show open tables')]
|
||||
= 'sql.php' . URL::getCommon(
|
||||
= 'sql.php' . Url::getCommon(
|
||||
array(
|
||||
'sql_query' => 'SHOW OPEN TABLES',
|
||||
'goto' => $this->selfUrl,
|
||||
@ -159,7 +159,7 @@ class ServerStatusData
|
||||
|
||||
if ($GLOBALS['replication_info']['master']['status']) {
|
||||
$links['repl'][__('Show slave hosts')]
|
||||
= 'sql.php' . URL::getCommon(
|
||||
= 'sql.php' . Url::getCommon(
|
||||
array(
|
||||
'sql_query' => 'SHOW SLAVE HOSTS',
|
||||
'goto' => $this->selfUrl,
|
||||
@ -175,7 +175,7 @@ class ServerStatusData
|
||||
|
||||
$links['qcache'][__('Flush query cache')]
|
||||
= $this->selfUrl
|
||||
. URL::getCommon(
|
||||
. Url::getCommon(
|
||||
array(
|
||||
'flush' => 'QUERY CACHE'
|
||||
)
|
||||
@ -191,10 +191,10 @@ class ServerStatusData
|
||||
$links['Slow_queries']['doc'] = 'slow_query_log';
|
||||
|
||||
$links['innodb'][__('Variables')]
|
||||
= 'server_engines.php?' . URL::getCommon(array('engine' => 'InnoDB'));
|
||||
= 'server_engines.php?' . Url::getCommon(array('engine' => 'InnoDB'));
|
||||
$links['innodb'][__('InnoDB Status')]
|
||||
= 'server_engines.php'
|
||||
. URL::getCommon(
|
||||
. Url::getCommon(
|
||||
array(
|
||||
'engine' => 'InnoDB',
|
||||
'page' => 'Status'
|
||||
@ -419,7 +419,7 @@ class ServerStatusData
|
||||
*/
|
||||
public function getMenuHtml()
|
||||
{
|
||||
$url_params = URL::getCommon();
|
||||
$url_params = Url::getCommon();
|
||||
$items = array(
|
||||
array(
|
||||
'name' => __('Server'),
|
||||
|
||||
@ -18,10 +18,10 @@ use PhpMyAdmin\SqlParser\Statements\AlterStatement;
|
||||
use PhpMyAdmin\SqlParser\Statements\DropStatement;
|
||||
use PhpMyAdmin\SqlParser\Statements\SelectStatement;
|
||||
use PhpMyAdmin\SqlParser\Utils\Query;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\Transformations;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Table;
|
||||
use PhpMyAdmin\Transformations;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Sql class
|
||||
@ -208,7 +208,7 @@ class Sql
|
||||
. htmlspecialchars($_REQUEST['curr_value'])
|
||||
. '</span>'
|
||||
. '<a href="browse_foreigners.php'
|
||||
. URL::getCommon($_url_params) . '"'
|
||||
. Url::getCommon($_url_params) . '"'
|
||||
. 'class="ajax browse_foreign" ' . '>'
|
||||
. __('Browse foreign values')
|
||||
. '</a>';
|
||||
@ -241,7 +241,7 @@ class Sql
|
||||
if (! empty($profiling_results)) {
|
||||
$url_query = isset($url_query)
|
||||
? $url_query
|
||||
: URL::getCommon(array('db' => $db));
|
||||
: Url::getCommon(array('db' => $db));
|
||||
|
||||
$profiling_table = '';
|
||||
$profiling_table .= '<fieldset><legend>' . __('Profiling')
|
||||
@ -554,7 +554,7 @@ EOT;
|
||||
&& ! empty($sql_query)
|
||||
) {
|
||||
$goto = 'sql.php'
|
||||
. URL::getCommon(
|
||||
. Url::getCommon(
|
||||
array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
@ -567,7 +567,7 @@ EOT;
|
||||
. ' onsubmit="return ! emptyCheckTheField(this,'
|
||||
. '\'bkm_fields[bkm_label]\');"'
|
||||
. ' class="bookmarkQueryForm print_ignore">';
|
||||
$html .= URL::getHiddenInputs();
|
||||
$html .= Url::getHiddenInputs();
|
||||
$html .= '<input type="hidden" name="db"'
|
||||
. ' value="' . htmlspecialchars($db) . '" />';
|
||||
$html .= '<input type="hidden" name="goto" value="' . $goto . '" />';
|
||||
|
||||
@ -19,7 +19,7 @@ use PMA\libraries\engines\Myisam;
|
||||
use PMA\libraries\engines\Ndbcluster;
|
||||
use PMA\libraries\engines\Pbxt;
|
||||
use PMA\libraries\engines\PerformanceSchema;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* defines
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
require_once 'libraries/database_interface.inc.php';
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Index;
|
||||
@ -16,6 +16,8 @@ use PhpMyAdmin\SqlParser\Components\OptionsArray;
|
||||
use PhpMyAdmin\SqlParser\Context;
|
||||
use PhpMyAdmin\SqlParser\Parser;
|
||||
use PhpMyAdmin\SqlParser\Statements\DropStatement;
|
||||
use PhpMyAdmin\SqlParser\Utils\Table as TableUtils;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Handles everything related to tables
|
||||
@ -733,7 +735,7 @@ class Table
|
||||
$extra, $comment, $virtuality, $expression, $move_to
|
||||
) {
|
||||
return Util::backquote($oldcol) . ' '
|
||||
. Table::generateFieldSpec(
|
||||
. self::generateFieldSpec(
|
||||
$newcol, $type, $length, $attribute,
|
||||
$collation, $null, $default_type, $default_value, $extra,
|
||||
$comment, $virtuality, $expression, $move_to
|
||||
@ -1261,7 +1263,7 @@ class Table
|
||||
'db_name' => $target_db,
|
||||
'table_name' => $target_table
|
||||
);
|
||||
Table::duplicateInfo(
|
||||
self::duplicateInfo(
|
||||
'displaywork',
|
||||
'table_info',
|
||||
$get_fields,
|
||||
@ -1286,7 +1288,7 @@ class Table
|
||||
'foreign_db' => $target_db,
|
||||
'master_table' => $target_table
|
||||
);
|
||||
Table::duplicateInfo(
|
||||
self::duplicateInfo(
|
||||
'relwork',
|
||||
'relation',
|
||||
$get_fields,
|
||||
@ -1308,7 +1310,7 @@ class Table
|
||||
'foreign_db' => $target_db,
|
||||
'foreign_table' => $target_table
|
||||
);
|
||||
Table::duplicateInfo(
|
||||
self::duplicateInfo(
|
||||
'relwork',
|
||||
'relation',
|
||||
$get_fields,
|
||||
@ -1326,7 +1328,7 @@ class Table
|
||||
$get_fields = array('page_descr');
|
||||
$where_fields = array('db_name' => $source_db);
|
||||
$new_fields = array('db_name' => $target_db);
|
||||
$last_id = Table::duplicateInfo(
|
||||
$last_id = self::duplicateInfo(
|
||||
'pdfwork',
|
||||
'pdf_pages',
|
||||
$get_fields,
|
||||
@ -1345,7 +1347,7 @@ class Table
|
||||
'table_name' => $target_table,
|
||||
'pdf_page_number' => $last_id
|
||||
);
|
||||
Table::duplicateInfo(
|
||||
self::duplicateInfo(
|
||||
'pdfwork',
|
||||
'table_coords',
|
||||
$get_fields,
|
||||
@ -1433,7 +1435,7 @@ class Table
|
||||
// Allow whitespaces (not trailing) in $new_name,
|
||||
// since we are using $backquoted in getting the fullName of table
|
||||
// below to be used in the query
|
||||
if (! Table::isValidName($new_name, true)) {
|
||||
if (! self::isValidName($new_name, true)) {
|
||||
$this->errors[] = __('Invalid table name:') . ' '
|
||||
. $new_table->getFullName();
|
||||
return false;
|
||||
@ -2540,7 +2542,7 @@ class Table
|
||||
* @var \PhpMyAdmin\SqlParser\Statements\CreateStatement $stmt
|
||||
*/
|
||||
$stmt = $parser->statements[0];
|
||||
$fields = \PhpMyAdmin\SqlParser\Utils\Table::getFields($stmt);
|
||||
$fields = TableUtils::getFields($stmt);
|
||||
if ($column != null) {
|
||||
$expression = isset($fields[$column]['expr']) ?
|
||||
substr($fields[$column]['expr'], 1, -1) : '';
|
||||
@ -1,27 +1,27 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* hold PMA\libraries\Template class
|
||||
* hold PhpMyAdmin\Template class
|
||||
*
|
||||
* @package PMA\libraries
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use Twig_Environment;
|
||||
use Twig_Loader_Filesystem;
|
||||
use PMA\libraries\twig\CharsetsExtension;
|
||||
use PMA\libraries\twig\I18nExtension;
|
||||
use PMA\libraries\twig\MessageExtension;
|
||||
use PMA\libraries\twig\SanitizeExtension;
|
||||
use PMA\libraries\twig\UrlExtension;
|
||||
use PMA\libraries\twig\UtilExtension;
|
||||
use Twig_Environment;
|
||||
use Twig_Loader_Filesystem;
|
||||
|
||||
/**
|
||||
* Class Template
|
||||
*
|
||||
* Handle front end templating
|
||||
*
|
||||
* @package PMA\libraries
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
class Template
|
||||
{
|
||||
@ -5,9 +5,10 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\ThemeManager;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* handles theme
|
||||
@ -456,7 +457,7 @@ class Theme
|
||||
public function getPrintPreview()
|
||||
{
|
||||
$url_params = array('set_theme' => $this->getId());
|
||||
$url = 'index.php' . URL::getCommon($url_params);
|
||||
$url = 'index.php' . Url::getCommon($url_params);
|
||||
|
||||
$retval = '<div class="theme_preview">';
|
||||
$retval .= '<h2>';
|
||||
@ -5,9 +5,10 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Theme;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* phpMyAdmin theme manager
|
||||
@ -369,7 +370,7 @@ class ThemeManager
|
||||
if ($form) {
|
||||
$select_box .= '<form name="setTheme" method="post"';
|
||||
$select_box .= ' action="index.php" class="disableAjax">';
|
||||
$select_box .= URL::getHiddenInputs();
|
||||
$select_box .= Url::getHiddenInputs();
|
||||
}
|
||||
|
||||
$theme_preview_path= './themes.php';
|
||||
@ -5,9 +5,19 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PMA\libraries\plugins\export\ExportSql;
|
||||
use PhpMyAdmin\SqlParser\Parser;
|
||||
use PhpMyAdmin\SqlParser\Statements\AlterStatement;
|
||||
use PhpMyAdmin\SqlParser\Statements\CreateStatement;
|
||||
use PhpMyAdmin\SqlParser\Statements\DeleteStatement;
|
||||
use PhpMyAdmin\SqlParser\Statements\DropStatement;
|
||||
use PhpMyAdmin\SqlParser\Statements\InsertStatement;
|
||||
use PhpMyAdmin\SqlParser\Statements\RenameStatement;
|
||||
use PhpMyAdmin\SqlParser\Statements\TruncateStatement;
|
||||
use PhpMyAdmin\SqlParser\Statements\UpdateStatement;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* This class tracks changes on databases, tables and views.
|
||||
@ -628,7 +638,7 @@ class Tracker
|
||||
// $parsed_sql = PMA_SQP_parse($query);
|
||||
// $sql_info = PMA_SQP_analyze($parsed_sql);
|
||||
|
||||
$parser = new \PhpMyAdmin\SqlParser\Parser($query);
|
||||
$parser = new Parser($query);
|
||||
|
||||
$tokens = $parser->list->tokens;
|
||||
|
||||
@ -649,7 +659,7 @@ class Tracker
|
||||
$result['type'] = 'DDL';
|
||||
|
||||
// Parse CREATE statement
|
||||
if ($statement instanceof \PhpMyAdmin\SqlParser\Statements\CreateStatement) {
|
||||
if ($statement instanceof CreateStatement) {
|
||||
if (empty($options) || !isset($options[6])) {
|
||||
return $result;
|
||||
}
|
||||
@ -677,7 +687,7 @@ class Tracker
|
||||
}
|
||||
|
||||
// Parse ALTER statement
|
||||
elseif ($statement instanceof \PhpMyAdmin\SqlParser\Statements\AlterStatement) {
|
||||
elseif ($statement instanceof AlterStatement) {
|
||||
if (empty($options) || !isset($options[3])) {
|
||||
return $result;
|
||||
}
|
||||
@ -694,7 +704,7 @@ class Tracker
|
||||
}
|
||||
|
||||
// Parse DROP statement
|
||||
elseif ($statement instanceof \PhpMyAdmin\SqlParser\Statements\DropStatement) {
|
||||
elseif ($statement instanceof DropStatement) {
|
||||
if (empty($options) || !isset($options[1])) {
|
||||
return $result;
|
||||
}
|
||||
@ -714,7 +724,7 @@ class Tracker
|
||||
}
|
||||
|
||||
// Prase RENAME statement
|
||||
elseif ($statement instanceof \PhpMyAdmin\SqlParser\Statements\RenameStatement) {
|
||||
elseif ($statement instanceof RenameStatement) {
|
||||
$result['identifier'] = 'RENAME TABLE';
|
||||
$result['tablename'] = $statement->renames[0]->old->table;
|
||||
$result['tablename_after_rename'] = $statement->renames[0]->new->table;
|
||||
@ -730,25 +740,25 @@ class Tracker
|
||||
$result['type'] = 'DML';
|
||||
|
||||
// Parse UPDATE statement
|
||||
if ($statement instanceof \PhpMyAdmin\SqlParser\Statements\UpdateStatement) {
|
||||
if ($statement instanceof UpdateStatement) {
|
||||
$result['identifier'] = 'UPDATE';
|
||||
$result['tablename'] = $statement->tables[0]->table;
|
||||
}
|
||||
|
||||
// Parse INSERT INTO statement
|
||||
if ($statement instanceof \PhpMyAdmin\SqlParser\Statements\InsertStatement) {
|
||||
if ($statement instanceof InsertStatement) {
|
||||
$result['identifier'] = 'INSERT';
|
||||
$result['tablename'] = $statement->into->dest->table;
|
||||
}
|
||||
|
||||
// Parse DELETE statement
|
||||
if ($statement instanceof \PhpMyAdmin\SqlParser\Statements\DeleteStatement) {
|
||||
if ($statement instanceof DeleteStatement) {
|
||||
$result['identifier'] = 'DELETE';
|
||||
$result['tablename'] = $statement->from[0]->table;
|
||||
}
|
||||
|
||||
// Parse TRUNCATE statement
|
||||
if ($statement instanceof \PhpMyAdmin\SqlParser\Statements\TruncateStatement) {
|
||||
if ($statement instanceof TruncateStatement) {
|
||||
$result['identifier'] = 'TRUNCATE' ;
|
||||
$result['tablename'] = $statement->table->table;
|
||||
}
|
||||
@ -15,10 +15,10 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Transformations class
|
||||
@ -5,7 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
/**
|
||||
* Generic class holding type definitions.
|
||||
@ -5,7 +5,10 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\Types;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Class holding type definitions for MySQL.
|
||||
@ -536,7 +539,7 @@ class TypesMySQL extends Types
|
||||
);
|
||||
|
||||
if (PMA_MYSQL_INT_VERSION >= 50708
|
||||
&& \PMA\libraries\Util::getServerType() != 'MariaDB'
|
||||
&& Util::getServerType() != 'MariaDB'
|
||||
) {
|
||||
$ret['JSON'] = array(
|
||||
'JSON',
|
||||
@ -5,14 +5,14 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
/**
|
||||
* Static methods for URL/hidden inputs generating
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
class URL
|
||||
class Url
|
||||
{
|
||||
/**
|
||||
* Generates text with hidden inputs.
|
||||
@ -24,7 +24,7 @@ class URL
|
||||
* @param string|array $skip do not generate a hidden field for this parameter
|
||||
* (can be an array of strings)
|
||||
*
|
||||
* @see URL::getCommon()
|
||||
* @see Url::getCommon()
|
||||
*
|
||||
* @return string string with input fields
|
||||
*
|
||||
@ -75,7 +75,7 @@ class URL
|
||||
}
|
||||
}
|
||||
|
||||
return URL::getHiddenFields($params);
|
||||
return Url::getHiddenFields($params);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -93,7 +93,7 @@ class URL
|
||||
* 'b' => 'ccc_b',
|
||||
* ),
|
||||
* );
|
||||
* echo URL::getHiddenFields($values);
|
||||
* echo Url::getHiddenFields($values);
|
||||
*
|
||||
* // produces:
|
||||
* <input type="hidden" name="aaa" Value="aaa" />
|
||||
@ -123,10 +123,10 @@ class URL
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
$fields .= URL::getHiddenFields($value, $name);
|
||||
$fields .= Url::getHiddenFields($value, $name);
|
||||
} else {
|
||||
// do not generate an ending "\n" because
|
||||
// URL::getHiddenInputs() is sometimes called
|
||||
// Url::getHiddenInputs() is sometimes called
|
||||
// from a JS document.write()
|
||||
$fields .= '<input type="hidden" name="' . htmlspecialchars($name)
|
||||
. '" value="' . htmlspecialchars($value) . '" />';
|
||||
@ -144,7 +144,7 @@ class URL
|
||||
* $params['db'] = 'mysql';
|
||||
* $params['table'] = 'rights';
|
||||
* // note the missing ?
|
||||
* echo 'script.php' . URL::getCommon($params);
|
||||
* echo 'script.php' . Url::getCommon($params);
|
||||
* // produces with cookies enabled:
|
||||
* // script.php?myparam=myvalue&db=mysql&table=rights
|
||||
* // with cookies disabled:
|
||||
@ -152,7 +152,7 @@ class URL
|
||||
* // &table=rights
|
||||
*
|
||||
* // note the missing ?
|
||||
* echo 'script.php' . URL::getCommon();
|
||||
* echo 'script.php' . Url::getCommon();
|
||||
* // produces with cookies enabled:
|
||||
* // script.php
|
||||
* // with cookies disabled:
|
||||
@ -168,7 +168,7 @@ class URL
|
||||
public static function getCommon($params = array(), $divider = '?')
|
||||
{
|
||||
return htmlspecialchars(
|
||||
URL::getCommonRaw($params, $divider)
|
||||
Url::getCommonRaw($params, $divider)
|
||||
);
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ class URL
|
||||
* $params['db'] = 'mysql';
|
||||
* $params['table'] = 'rights';
|
||||
* // note the missing ?
|
||||
* echo 'script.php' . URL::getCommon($params);
|
||||
* echo 'script.php' . Url::getCommon($params);
|
||||
* // produces with cookies enabled:
|
||||
* // script.php?myparam=myvalue&db=mysql&table=rights
|
||||
* // with cookies disabled:
|
||||
@ -188,7 +188,7 @@ class URL
|
||||
* // &table=rights
|
||||
*
|
||||
* // note the missing ?
|
||||
* echo 'script.php' . URL::getCommon();
|
||||
* echo 'script.php' . Url::getCommon();
|
||||
* // produces with cookies enabled:
|
||||
* // script.php
|
||||
* // with cookies disabled:
|
||||
@ -203,7 +203,7 @@ class URL
|
||||
*/
|
||||
public static function getCommonRaw($params = array(), $divider = '?')
|
||||
{
|
||||
$separator = URL::getArgSeparator();
|
||||
$separator = Url::getArgSeparator();
|
||||
|
||||
// avoid overwriting when creating navi panel links to servers
|
||||
if (isset($GLOBALS['server'])
|
||||
@ -275,6 +275,3 @@ class URL
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Hold the PMA\libraries\Util class
|
||||
* Hold the PhpMyAdmin\Util class
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
@ -18,8 +18,8 @@ use PhpMyAdmin\SqlParser\Lexer;
|
||||
use PhpMyAdmin\SqlParser\Parser;
|
||||
use PhpMyAdmin\SqlParser\Token;
|
||||
use PhpMyAdmin\SqlParser\Utils\Error as ParserError;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Url;
|
||||
use stdClass;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
@ -609,14 +609,14 @@ class Util
|
||||
$_url_params['db'] = $db;
|
||||
$_url_params['table'] = $table;
|
||||
$doedit_goto = '<a href="tbl_sql.php'
|
||||
. URL::getCommon($_url_params) . '">';
|
||||
. Url::getCommon($_url_params) . '">';
|
||||
} elseif (strlen($db) > 0) {
|
||||
$_url_params['db'] = $db;
|
||||
$doedit_goto = '<a href="db_sql.php'
|
||||
. URL::getCommon($_url_params) . '">';
|
||||
. Url::getCommon($_url_params) . '">';
|
||||
} else {
|
||||
$doedit_goto = '<a href="server_sql.php'
|
||||
. URL::getCommon($_url_params) . '">';
|
||||
. Url::getCommon($_url_params) . '">';
|
||||
}
|
||||
|
||||
$error_msg .= $doedit_goto
|
||||
@ -1068,7 +1068,7 @@ class Util
|
||||
$explain_params['sql_query'] = 'EXPLAIN ' . $sql_query;
|
||||
$explain_link = ' ['
|
||||
. self::linkOrButton(
|
||||
'import.php' . URL::getCommon($explain_params),
|
||||
'import.php' . Url::getCommon($explain_params),
|
||||
__('Explain SQL')
|
||||
) . ']';
|
||||
} elseif (preg_match(
|
||||
@ -1079,7 +1079,7 @@ class Util
|
||||
= mb_substr($sql_query, 8);
|
||||
$explain_link = ' ['
|
||||
. self::linkOrButton(
|
||||
'import.php' . URL::getCommon($explain_params),
|
||||
'import.php' . Url::getCommon($explain_params),
|
||||
__('Skip Explain SQL')
|
||||
) . ']';
|
||||
$url = 'https://mariadb.org/explain_analyzer/analyze/'
|
||||
@ -1105,7 +1105,7 @@ class Util
|
||||
if (! empty($cfg['SQLQuery']['Edit'])
|
||||
&& empty($GLOBALS['show_as_php'])
|
||||
) {
|
||||
$edit_link .= URL::getCommon($url_params) . '#querybox';
|
||||
$edit_link .= Url::getCommon($url_params) . '#querybox';
|
||||
$edit_link = ' ['
|
||||
. self::linkOrButton($edit_link, __('Edit'))
|
||||
. ']';
|
||||
@ -1120,7 +1120,7 @@ class Util
|
||||
if (! empty($GLOBALS['show_as_php'])) {
|
||||
$php_link = ' ['
|
||||
. self::linkOrButton(
|
||||
'import.php' . URL::getCommon($url_params),
|
||||
'import.php' . Url::getCommon($url_params),
|
||||
__('Without PHP code'),
|
||||
array(),
|
||||
true,
|
||||
@ -1132,7 +1132,7 @@ class Util
|
||||
|
||||
$php_link .= ' ['
|
||||
. self::linkOrButton(
|
||||
'import.php' . URL::getCommon($url_params),
|
||||
'import.php' . Url::getCommon($url_params),
|
||||
__('Submit query'),
|
||||
array(),
|
||||
true,
|
||||
@ -1147,7 +1147,7 @@ class Util
|
||||
$_message = __('Create PHP code');
|
||||
$php_link = ' ['
|
||||
. self::linkOrButton(
|
||||
'import.php' . URL::getCommon($php_params),
|
||||
'import.php' . Url::getCommon($php_params),
|
||||
$_message
|
||||
)
|
||||
. ']';
|
||||
@ -1161,7 +1161,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' . URL::getCommon($url_params);
|
||||
$refresh_link = 'import.php' . Url::getCommon($url_params);
|
||||
$refresh_link = ' ['
|
||||
. self::linkOrButton($refresh_link, __('Refresh')) . ']';
|
||||
} else {
|
||||
@ -1174,7 +1174,7 @@ class Util
|
||||
|
||||
$retval .= '<div class="tools print_ignore">';
|
||||
$retval .= '<form action="sql.php" method="post">';
|
||||
$retval .= URL::getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
|
||||
$retval .= Url::getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
|
||||
$retval .= '<input type="hidden" name="sql_query" value="'
|
||||
. htmlspecialchars($sql_query) . '" />';
|
||||
|
||||
@ -1648,7 +1648,7 @@ class Util
|
||||
if (! empty($tab['args']) && is_array($tab['args'])) {
|
||||
$url_params = array_merge($url_params, $tab['args']);
|
||||
}
|
||||
$tab['link'] = htmlentities($tab['link']) . URL::getCommon($url_params);
|
||||
$tab['link'] = htmlentities($tab['link']) . Url::getCommon($url_params);
|
||||
}
|
||||
|
||||
if (! empty($tab['fragment'])) {
|
||||
@ -1843,7 +1843,7 @@ class Util
|
||||
}
|
||||
$ret = '<form action="' . $url_parts['path'] . '" class="link"'
|
||||
. ' method="post"' . $target . ' style="display: inline;">';
|
||||
$ret .= URL::getHiddenInputs();
|
||||
$ret .= Url::getHiddenInputs();
|
||||
$subname_open = '';
|
||||
$subname_close = '';
|
||||
$submit_link = '#';
|
||||
@ -1904,7 +1904,7 @@ class Util
|
||||
public static function splitURLQuery($url)
|
||||
{
|
||||
// decode encoded url separators
|
||||
$separator = URL::getArgSeparator();
|
||||
$separator = Url::getArgSeparator();
|
||||
// on most places separator is still hard coded ...
|
||||
if ($separator !== '&') {
|
||||
// ... so always replace & with $separator
|
||||
@ -2413,19 +2413,19 @@ class Util
|
||||
|
||||
$_url_params[$name] = 0;
|
||||
$list_navigator_html .= '<a' . $class . $title1 . ' href="' . $script
|
||||
. 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 . URL::getCommon($_url_params) . '">'
|
||||
. ' href="' . $script . Url::getCommon($_url_params) . '">'
|
||||
. $caption2 . '</a>';
|
||||
}
|
||||
|
||||
$list_navigator_html .= '<form action="' . basename($script)
|
||||
. '" method="post">';
|
||||
|
||||
$list_navigator_html .= URL::getHiddenInputs($_url_params);
|
||||
$list_navigator_html .= Url::getHiddenInputs($_url_params);
|
||||
$list_navigator_html .= self::pageselector(
|
||||
$name,
|
||||
$max_count,
|
||||
@ -2452,7 +2452,7 @@ class Util
|
||||
|
||||
$_url_params[$name] = $pos + $max_count;
|
||||
$list_navigator_html .= '<a' . $class . $title3 . ' href="' . $script
|
||||
. URL::getCommon($_url_params) . '" >' . $caption3
|
||||
. Url::getCommon($_url_params) . '" >' . $caption3
|
||||
. '</a>';
|
||||
|
||||
$_url_params[$name] = floor($count / $max_count) * $max_count;
|
||||
@ -2461,7 +2461,7 @@ class Util
|
||||
}
|
||||
|
||||
$list_navigator_html .= ' <a' . $class . $title4
|
||||
. ' href="' . $script . URL::getCommon($_url_params) . '" >'
|
||||
. ' href="' . $script . Url::getCommon($_url_params) . '" >'
|
||||
. $caption4 . '</a>';
|
||||
}
|
||||
$list_navigator_html .= '</div>' . "\n";
|
||||
@ -2515,7 +2515,7 @@ class Util
|
||||
. self::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. URL::getCommon(array('db' => $database)) . '" title="'
|
||||
. Url::getCommon(array('db' => $database)) . '" title="'
|
||||
. htmlspecialchars(
|
||||
sprintf(
|
||||
__('Jump to database “%s”.'),
|
||||
@ -4734,7 +4734,7 @@ class Util
|
||||
*
|
||||
* See https://letsencrypt.org/certificates/
|
||||
*/
|
||||
$certs_dir = dirname(__file__) . '/certs/';
|
||||
$certs_dir = dirname(__file__) . '/../certs/';
|
||||
/* See code below for logic */
|
||||
if ($ssl == CURLOPT_CAPATH) {
|
||||
$curl_status &= curl_setopt($curl_handle, CURLOPT_CAPATH, $certs_dir);
|
||||
@ -5,15 +5,11 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
namespace PMA\libraries;
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
use stdClass;
|
||||
|
||||
if (!defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Responsible for retrieving version information and notifiying about latest version
|
||||
*
|
||||
@ -38,11 +38,11 @@ use PhpMyAdmin\ErrorHandler;
|
||||
use PhpMyAdmin\Message;
|
||||
use PMA\libraries\plugins\AuthenticationPlugin;
|
||||
use PhpMyAdmin\DbList;
|
||||
use PMA\libraries\ThemeManager;
|
||||
use PMA\libraries\Tracker;
|
||||
use PhpMyAdmin\ThemeManager;
|
||||
use PhpMyAdmin\Tracker;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\TypesMySQL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\TypesMySQL;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\LanguageManager;
|
||||
use PhpMyAdmin\Logging;
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ use PhpMyAdmin\Sanitize;
|
||||
/**
|
||||
* Core libraries.
|
||||
*/
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
require_once './libraries/config/FormDisplay.tpl.php';
|
||||
|
||||
|
||||
@ -5,9 +5,9 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
|
||||
/**
|
||||
@ -39,8 +39,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 .= URL::getHiddenInputs('', '', 0, 'server') . "\n";
|
||||
$htmlOutput .= URL::getHiddenFields((array)$hidden_fields);
|
||||
$htmlOutput .= Url::getHiddenInputs('', '', 0, 'server') . "\n";
|
||||
$htmlOutput .= Url::getHiddenFields((array)$hidden_fields);
|
||||
return $htmlOutput;
|
||||
}
|
||||
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
namespace PMA\libraries\config;
|
||||
|
||||
use PhpMyAdmin\Core;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Performs various compatibility, security and consistency checks on current config
|
||||
@ -378,13 +378,13 @@ class ServerConfigChecks
|
||||
);
|
||||
$sAllowArbitraryServerWarn = sprintf(
|
||||
$sAllowArbitraryServerWarn,
|
||||
'[a@?page=form' . URL::getCommon(array(), '&')
|
||||
'[a@?page=form' . Url::getCommon(array(), '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]',
|
||||
'[a@?page=form' . URL::getCommon(array(), '&')
|
||||
'[a@?page=form' . Url::getCommon(array(), '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]',
|
||||
'[a@?page=form' . URL::getCommon(array(), '&')
|
||||
'[a@?page=form' . Url::getCommon(array(), '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]'
|
||||
);
|
||||
@ -400,7 +400,7 @@ class ServerConfigChecks
|
||||
);
|
||||
$sBZipDumpWarning = sprintf(
|
||||
$sBZipDumpWarning,
|
||||
'[a@?page=form' . URL::getCommon(array(), '&')
|
||||
'[a@?page=form' . Url::getCommon(array(), '&')
|
||||
. '&formset=Features#tab_Import_export]',
|
||||
'[/a]', '%s'
|
||||
);
|
||||
@ -415,7 +415,7 @@ class ServerConfigChecks
|
||||
);
|
||||
$sGZipDumpWarning = sprintf(
|
||||
$sGZipDumpWarning,
|
||||
'[a@?page=form' . URL::getCommon(array(), '&')
|
||||
'[a@?page=form' . Url::getCommon(array(), '&')
|
||||
. '&formset=Features#tab_Import_export]',
|
||||
'[/a]',
|
||||
'%s'
|
||||
@ -427,7 +427,7 @@ class ServerConfigChecks
|
||||
);
|
||||
$sLoginCookieValidityWarn = sprintf(
|
||||
$sLoginCookieValidityWarn,
|
||||
'[a@?page=form' . URL::getCommon(array(), '&')
|
||||
'[a@?page=form' . Url::getCommon(array(), '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]',
|
||||
'[a@' . Core::getPHPDocLink(
|
||||
@ -443,7 +443,7 @@ class ServerConfigChecks
|
||||
);
|
||||
$sLoginCookieValidityWarn2 = sprintf(
|
||||
$sLoginCookieValidityWarn2,
|
||||
'[a@?page=form' . URL::getCommon(array(), '&')
|
||||
'[a@?page=form' . Url::getCommon(array(), '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]'
|
||||
);
|
||||
@ -454,10 +454,10 @@ class ServerConfigChecks
|
||||
);
|
||||
$sLoginCookieValidityWarn3 = sprintf(
|
||||
$sLoginCookieValidityWarn3,
|
||||
'[a@?page=form' . URL::getCommon(array(), '&')
|
||||
'[a@?page=form' . Url::getCommon(array(), '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]',
|
||||
'[a@?page=form' . URL::getCommon(array(), '&')
|
||||
'[a@?page=form' . Url::getCommon(array(), '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]'
|
||||
);
|
||||
@ -469,10 +469,10 @@ class ServerConfigChecks
|
||||
);
|
||||
$sSecurityInfoMsg = sprintf(
|
||||
$sSecurityInfoMsg,
|
||||
'[a@?page=servers' . URL::getCommon(array(), '&')
|
||||
'[a@?page=servers' . Url::getCommon(array(), '&')
|
||||
. '&mode=edit&id=%1$d#tab_Server_config]',
|
||||
'[/a]',
|
||||
'[a@?page=form' . URL::getCommon(array(), '&')
|
||||
'[a@?page=form' . Url::getCommon(array(), '&')
|
||||
. '&formset=Features#tab_Security]',
|
||||
'[/a]'
|
||||
);
|
||||
@ -485,7 +485,7 @@ class ServerConfigChecks
|
||||
);
|
||||
$sServerAuthConfigMsg = sprintf(
|
||||
$sServerAuthConfigMsg,
|
||||
'[a@?page=servers' . URL::getCommon(array(), '&')
|
||||
'[a@?page=servers' . Url::getCommon(array(), '&')
|
||||
. '&mode=edit&id=%1$d#tab_Server]',
|
||||
'[/a]'
|
||||
);
|
||||
@ -495,7 +495,7 @@ class ServerConfigChecks
|
||||
);
|
||||
$sZipDumpExportWarn = sprintf(
|
||||
$sZipDumpExportWarn,
|
||||
'[a@?page=form' . URL::getCommon(array(), '&')
|
||||
'[a@?page=form' . Url::getCommon(array(), '&')
|
||||
. '&formset=Features#tab_Import_export]',
|
||||
'[/a]',
|
||||
'%s'
|
||||
@ -506,7 +506,7 @@ class ServerConfigChecks
|
||||
);
|
||||
$sZipDumpImportWarn = sprintf(
|
||||
$sZipDumpImportWarn,
|
||||
'[a@?page=form' . URL::getCommon(array(), '&')
|
||||
'[a@?page=form' . Url::getCommon(array(), '&')
|
||||
. '&formset=Features#tab_Import_export]',
|
||||
'[/a]',
|
||||
'%s'
|
||||
|
||||
@ -9,7 +9,7 @@ namespace PMA\libraries\config;
|
||||
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Validation class for various validation functions
|
||||
|
||||
@ -16,10 +16,10 @@ use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\RecentFavoriteTable;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Tracker;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Tracker;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
|
||||
require_once 'libraries/display_create_table.lib.php';
|
||||
@ -134,7 +134,7 @@ class DatabaseStructureController extends DatabaseController
|
||||
// If there are no tables, the user is redirected to the last page
|
||||
// having any.
|
||||
if ($this->_total_num_tables > 0 && $this->_pos > $this->_total_num_tables) {
|
||||
$uri = './db_structure.php' . URL::getCommonRaw(array(
|
||||
$uri = './db_structure.php' . Url::getCommonRaw(array(
|
||||
'db' => $this->db,
|
||||
'pos' => max(0, $this->_total_num_tables - $GLOBALS['cfg']['MaxTableList']),
|
||||
'reload' => 1
|
||||
@ -203,7 +203,7 @@ class DatabaseStructureController extends DatabaseController
|
||||
/* Printable view of a table */
|
||||
$this->response->addHTML(
|
||||
Template::get('database/structure/print_view_data_dictionary_link')
|
||||
->render(array('url_query' => URL::getCommon(
|
||||
->render(array('url_query' => Url::getCommon(
|
||||
array(
|
||||
'db' => $this->db,
|
||||
'goto' => 'db_structure.php',
|
||||
@ -345,7 +345,7 @@ class DatabaseStructureController extends DatabaseController
|
||||
public function multiSubmitAction()
|
||||
{
|
||||
$action = 'db_structure.php';
|
||||
$err_url = 'db_structure.php' . URL::getCommon(
|
||||
$err_url = 'db_structure.php' . Url::getCommon(
|
||||
array('db' => $this->db)
|
||||
);
|
||||
|
||||
@ -407,7 +407,7 @@ class DatabaseStructureController extends DatabaseController
|
||||
|
||||
$table_is_view = false;
|
||||
// Sets parameters for links
|
||||
$tbl_url_query = URL::getCommon(
|
||||
$tbl_url_query = Url::getCommon(
|
||||
array('db' => $this->db, 'table' => $current_table['TABLE_NAME'])
|
||||
);
|
||||
// do not list the previous table's size info for a view
|
||||
|
||||
@ -12,9 +12,9 @@ namespace PMA\libraries\controllers\server;
|
||||
use PMA\libraries\controllers\Controller;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Message;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* Handles viewing binary logs
|
||||
@ -189,7 +189,7 @@ class ServerBinlogController extends Controller
|
||||
}
|
||||
|
||||
$html .= '<a href="server_binlog.php'
|
||||
. URL::getCommon($this_url_params) . '"';
|
||||
. Url::getCommon($this_url_params) . '"';
|
||||
if (Util::showIcons('TableNavigationLinksMode')) {
|
||||
$html .= ' title="' . _pgettext('Previous page', 'Previous') . '">';
|
||||
} else {
|
||||
@ -211,7 +211,7 @@ class ServerBinlogController extends Controller
|
||||
$tempTitle = __('Show Full Queries');
|
||||
$tempImgMode = 'full';
|
||||
}
|
||||
$html .= '<a href="server_binlog.php' . 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>';
|
||||
@ -222,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'
|
||||
. URL::getCommon($this_url_params)
|
||||
. Url::getCommon($this_url_params)
|
||||
. '"';
|
||||
if (Util::showIcons('TableNavigationLinksMode')) {
|
||||
$html .= ' title="' . _pgettext('Next page', 'Next') . '">';
|
||||
|
||||
@ -11,7 +11,7 @@ namespace PMA\libraries\controllers\server;
|
||||
|
||||
use PMA\libraries\controllers\Controller;
|
||||
use PhpMyAdmin\Charsets;
|
||||
use PMA\libraries\Template;
|
||||
use PhpMyAdmin\Template;
|
||||
|
||||
/**
|
||||
* Handles viewing character sets and collations
|
||||
|
||||
@ -13,9 +13,9 @@ use PMA\libraries\controllers\Controller;
|
||||
use PhpMyAdmin\Charsets;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* Handles viewing and creating and deleting databases
|
||||
@ -176,7 +176,7 @@ class ServerDatabasesController extends Controller
|
||||
Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. URL::getCommon(array('db' => $_POST['new_db']))
|
||||
. Url::getCommon(array('db' => $_POST['new_db']))
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -192,7 +192,7 @@ class ServerDatabasesController extends Controller
|
||||
$message = Message::error(__('No databases selected.'));
|
||||
} else {
|
||||
$action = 'server_databases.php';
|
||||
$err_url = $action . URL::getCommon();
|
||||
$err_url = $action . Url::getCommon();
|
||||
|
||||
$GLOBALS['submit_mult'] = 'drop_db';
|
||||
$GLOBALS['mult_btn'] = __('Yes');
|
||||
@ -285,7 +285,7 @@ class ServerDatabasesController extends Controller
|
||||
|
||||
$html .= '<form class="ajax" action="server_databases.php" ';
|
||||
$html .= 'method="post" name="dbStatsForm" id="dbStatsForm">' . "\n";
|
||||
$html .= URL::getHiddenInputs($_url_params);
|
||||
$html .= Url::getHiddenInputs($_url_params);
|
||||
|
||||
$_url_params['sort_by'] = 'SCHEMA_NAME';
|
||||
$_url_params['sort_order']
|
||||
@ -579,7 +579,7 @@ class ServerDatabasesController extends Controller
|
||||
'class' => 'li_switch_dbstats',
|
||||
'url' => array(
|
||||
'href' => 'server_databases.php'
|
||||
. URL::getCommon(array('dbstats' => '1')),
|
||||
. Url::getCommon(array('dbstats' => '1')),
|
||||
'title' => __('Enable statistics')
|
||||
),
|
||||
);
|
||||
|
||||
@ -11,8 +11,8 @@ namespace PMA\libraries\controllers\server;
|
||||
|
||||
use PMA\libraries\controllers\Controller;
|
||||
use PhpMyAdmin\StorageEngine;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Handles viewing storage engine details
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
namespace PMA\libraries\controllers\server;
|
||||
|
||||
use PMA\libraries\controllers\Controller;
|
||||
use PMA\libraries\Template;
|
||||
use PhpMyAdmin\Template;
|
||||
|
||||
/**
|
||||
* Handles viewing server plugin details
|
||||
|
||||
@ -12,9 +12,9 @@ namespace PMA\libraries\controllers\server;
|
||||
use PMA\libraries\controllers\Controller;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* Handles viewing and editing server variables
|
||||
@ -275,7 +275,7 @@ class ServerVariablesController extends Controller
|
||||
*/
|
||||
private function _getHtmlForLinkTemplates()
|
||||
{
|
||||
$url = 'server_variables.php' . URL::getCommon();
|
||||
$url = 'server_variables.php' . Url::getCommon();
|
||||
return Template::get('server/variables/link_template')
|
||||
->render(array('url' => $url));
|
||||
}
|
||||
|
||||
@ -12,9 +12,9 @@ namespace PMA\libraries\controllers\table;
|
||||
use PMA\libraries\controllers\TableController;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\Table;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Table;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -12,9 +12,9 @@ namespace PMA\libraries\controllers\table;
|
||||
use PMA\libraries\controllers\TableController;
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Message;
|
||||
use PMA\libraries\Template;
|
||||
use PhpMyAdmin\Template;
|
||||
use PMA\libraries\gis\GISVisualization;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/db_common.inc.php';
|
||||
@ -187,7 +187,7 @@ class TableGisVisualizationController extends TableController
|
||||
* Displays the page
|
||||
*/
|
||||
$this->url_params['sql_query'] = $this->sql_query;
|
||||
$downloadUrl = 'tbl_gis_visualization.php' . URL::getCommon(
|
||||
$downloadUrl = 'tbl_gis_visualization.php' . Url::getCommon(
|
||||
array_merge(
|
||||
$this->url_params,
|
||||
array(
|
||||
|
||||
@ -12,8 +12,8 @@ namespace PMA\libraries\controllers\table;
|
||||
use PMA\libraries\controllers\TableController;
|
||||
use PhpMyAdmin\Index;
|
||||
use PhpMyAdmin\Message;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Response;
|
||||
|
||||
|
||||
|
||||
@ -12,9 +12,9 @@ use PMA\libraries\controllers\TableController;
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Index;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Table;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Handles table relation logic
|
||||
|
||||
@ -11,8 +11,8 @@ namespace PMA\libraries\controllers\table;
|
||||
use PMA\libraries\controllers\TableController;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Sql;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Class TableSearchController
|
||||
|
||||
@ -18,11 +18,11 @@ use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Index;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Sql;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\Transformations;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Table;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Transformations;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
use PMA\Util as Util_lib;
|
||||
|
||||
require_once 'libraries/util.lib.php';
|
||||
@ -96,7 +96,7 @@ class TableStructureController extends TableController
|
||||
parent::__construct();
|
||||
|
||||
$this->_db_is_system_schema = $db_is_system_schema;
|
||||
$this->_url_query = URL::getCommonRaw(array('db' => $db, 'table' => $table));
|
||||
$this->_url_query = Url::getCommonRaw(array('db' => $db, 'table' => $table));
|
||||
$this->_tbl_is_view = $tbl_is_view;
|
||||
$this->_tbl_storage_engine = $tbl_storage_engine;
|
||||
$this->_table_info_num_rows = $table_info_num_rows;
|
||||
@ -319,7 +319,7 @@ class TableStructureController extends TableController
|
||||
$url_params = array();
|
||||
include_once 'libraries/tbl_common.inc.php';
|
||||
$this->_db_is_system_schema = $db_is_system_schema;
|
||||
$this->_url_query = URL::getCommonRaw(array(
|
||||
$this->_url_query = Url::getCommonRaw(array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
'goto' => 'tbl_structure.php',
|
||||
@ -829,7 +829,7 @@ class TableStructureController extends TableController
|
||||
*/
|
||||
protected function updateColumns()
|
||||
{
|
||||
$err_url = 'tbl_structure.php' . URL::getCommon(
|
||||
$err_url = 'tbl_structure.php' . Url::getCommon(
|
||||
array(
|
||||
'db' => $this->db, 'table' => $this->table
|
||||
)
|
||||
@ -1228,7 +1228,7 @@ class TableStructureController extends TableController
|
||||
);
|
||||
|
||||
$edit_view_url = 'view_create.php'
|
||||
. URL::getCommon($url_params) . '&'
|
||||
. Url::getCommon($url_params) . '&'
|
||||
. implode(
|
||||
'&',
|
||||
array_map(
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
*/
|
||||
|
||||
use PhpMyAdmin\Core;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Table;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Transforms the radio button field_key into 4 arrays
|
||||
@ -116,11 +116,11 @@ function PMA_setColumnCreationStatementSuffix($current_field_num,
|
||||
$sql_suffix .= ' FIRST';
|
||||
} else {
|
||||
$sql_suffix .= ' AFTER '
|
||||
. PMA\libraries\Util::backquote($_REQUEST['after_field']);
|
||||
. PhpMyAdmin\Util::backquote($_REQUEST['after_field']);
|
||||
}
|
||||
} else {
|
||||
$sql_suffix .= ' AFTER '
|
||||
. PMA\libraries\Util::backquote(
|
||||
. PhpMyAdmin\Util::backquote(
|
||||
$_REQUEST['field_name'][$current_field_num - 1]
|
||||
);
|
||||
}
|
||||
@ -151,12 +151,12 @@ function PMA_buildIndexStatements($index, $index_choice,
|
||||
. ' ' . $index_choice;
|
||||
|
||||
if (! empty($index['Key_name']) && $index['Key_name'] != 'PRIMARY') {
|
||||
$sql_query .= ' ' . PMA\libraries\Util::backquote($index['Key_name']);
|
||||
$sql_query .= ' ' . PhpMyAdmin\Util::backquote($index['Key_name']);
|
||||
}
|
||||
|
||||
$index_fields = array();
|
||||
foreach ($index['columns'] as $key => $column) {
|
||||
$index_fields[$key] = PMA\libraries\Util::backquote(
|
||||
$index_fields[$key] = PhpMyAdmin\Util::backquote(
|
||||
$_REQUEST['field_name'][$column['col_index']]
|
||||
);
|
||||
if ($column['size']) {
|
||||
@ -410,8 +410,8 @@ function PMA_getTableCreationQuery($db, $table)
|
||||
$sql_statement = PMA_getColumnCreationStatements(true);
|
||||
|
||||
// Builds the 'create table' statement
|
||||
$sql_query = 'CREATE TABLE ' . PMA\libraries\Util::backquote($db) . '.'
|
||||
. PMA\libraries\Util::backquote(trim($table)) . ' (' . $sql_statement . ')';
|
||||
$sql_query = 'CREATE TABLE ' . PhpMyAdmin\Util::backquote($db) . '.'
|
||||
. PhpMyAdmin\Util::backquote(trim($table)) . ' (' . $sql_statement . ')';
|
||||
|
||||
// Adds table type, character set, comments and partition definition
|
||||
if (!empty($_REQUEST['tbl_storage_engine'])
|
||||
@ -479,14 +479,14 @@ function PMA_tryColumnCreationQuery($db, $table, $err_url)
|
||||
// To allow replication, we first select the db to use and then run queries
|
||||
// on this db.
|
||||
if (!($GLOBALS['dbi']->selectDb($db))) {
|
||||
PMA\libraries\Util::mysqlDie(
|
||||
PhpMyAdmin\Util::mysqlDie(
|
||||
$GLOBALS['dbi']->getError(),
|
||||
'USE ' . PMA\libraries\Util::backquote($db), false,
|
||||
'USE ' . PhpMyAdmin\Util::backquote($db), false,
|
||||
$err_url
|
||||
);
|
||||
}
|
||||
$sql_query = 'ALTER TABLE ' .
|
||||
PMA\libraries\Util::backquote($table) . ' ' . $sql_statement . ';';
|
||||
PhpMyAdmin\Util::backquote($table) . ' ' . $sql_statement . ';';
|
||||
// If there is a request for SQL previewing.
|
||||
if (isset($_REQUEST['preview_sql'])) {
|
||||
Core::previewSQL($sql_query);
|
||||
|
||||
@ -33,7 +33,7 @@ if (defined('TESTSUITE')) {
|
||||
$extension = 'mysqli';
|
||||
if (!DatabaseInterface::checkDbExtension($extension)) {
|
||||
|
||||
$docurl = PMA\libraries\Util::getDocuLink('faq', 'faqmysql');
|
||||
$docurl = PhpMyAdmin\Util::getDocuLink('faq', 'faqmysql');
|
||||
$doclink = sprintf(
|
||||
__('See %sour documentation%s for more information.'),
|
||||
'[a@' . $docurl . '@documentation]',
|
||||
|
||||
@ -9,14 +9,14 @@
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\URL;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
PMA\libraries\Util::checkParameters(array('db'));
|
||||
PhpMyAdmin\Util::checkParameters(array('db'));
|
||||
|
||||
global $cfg;
|
||||
global $db;
|
||||
@ -32,12 +32,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' . URL::getCommon();
|
||||
$err_url_0 = 'index.php' . Url::getCommon();
|
||||
|
||||
$err_url = PMA\libraries\Util::getScriptNameForOption(
|
||||
$err_url = PhpMyAdmin\Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. URL::getCommon(array('db' => $db));
|
||||
. Url::getCommon(array('db' => $db));
|
||||
|
||||
/**
|
||||
* Ensures the database exists (else move to the "parent" script) and displays
|
||||
@ -61,7 +61,7 @@ if (! isset($is_db) || ! $is_db) {
|
||||
if (isset($message)) {
|
||||
$params['message'] = $message;
|
||||
}
|
||||
$uri = './index.php' . URL::getCommonRaw($params);
|
||||
$uri = './index.php' . Url::getCommonRaw($params);
|
||||
if (strlen($db) === 0 || ! $is_db) {
|
||||
$response = Response::getInstance();
|
||||
if ($response->isAjax()) {
|
||||
@ -86,7 +86,7 @@ if (isset($_REQUEST['submitcollation'])
|
||||
) {
|
||||
list($db_charset) = explode('_', $_REQUEST['db_collation']);
|
||||
$sql_query = 'ALTER DATABASE '
|
||||
. PMA\libraries\Util::backquote($db)
|
||||
. PhpMyAdmin\Util::backquote($db)
|
||||
. ' DEFAULT' . Util::getCharsetQueryPart($_REQUEST['db_collation']);
|
||||
$result = $GLOBALS['dbi']->query($sql_query);
|
||||
$message = Message::success();
|
||||
@ -107,4 +107,4 @@ if (isset($_REQUEST['submitcollation'])
|
||||
/**
|
||||
* Set parameters for links
|
||||
*/
|
||||
$url_query = URL::getCommon(array('db' => $db));
|
||||
$url_query = Url::getCommon(array('db' => $db));
|
||||
|
||||
@ -24,7 +24,7 @@ require_once 'libraries/relation.lib.php';
|
||||
*/
|
||||
function PMA_getHtmlForPageSelector($cfgRelation, $db)
|
||||
{
|
||||
return PMA\libraries\Template::get('database/designer/page_selector')
|
||||
return PhpMyAdmin\Template::get('database/designer/page_selector')
|
||||
->render(
|
||||
array(
|
||||
'db' => $db,
|
||||
@ -43,7 +43,7 @@ function PMA_getHtmlForPageSelector($cfgRelation, $db)
|
||||
*/
|
||||
function PMA_getHtmlForEditOrDeletePages($db, $operation)
|
||||
{
|
||||
return PMA\libraries\Template::get('database/designer/edit_delete_pages')
|
||||
return PhpMyAdmin\Template::get('database/designer/edit_delete_pages')
|
||||
->render(
|
||||
array(
|
||||
'db' => $db,
|
||||
@ -61,7 +61,7 @@ function PMA_getHtmlForEditOrDeletePages($db, $operation)
|
||||
*/
|
||||
function PMA_getHtmlForPageSaveAs($db)
|
||||
{
|
||||
return PMA\libraries\Template::get('database/designer/page_save_as')
|
||||
return PhpMyAdmin\Template::get('database/designer/page_save_as')
|
||||
->render(
|
||||
array(
|
||||
'db' => $db
|
||||
@ -80,8 +80,8 @@ function PMA_getPageIdsAndNames($db)
|
||||
{
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
$page_query = "SELECT `page_nr`, `page_descr` FROM "
|
||||
. PMA\libraries\Util::backquote($cfgRelation['db']) . "."
|
||||
. PMA\libraries\Util::backquote($cfgRelation['pdf_pages'])
|
||||
. PhpMyAdmin\Util::backquote($cfgRelation['db']) . "."
|
||||
. PhpMyAdmin\Util::backquote($cfgRelation['pdf_pages'])
|
||||
. " WHERE db_name = '" . $GLOBALS['dbi']->escapeString($db) . "'"
|
||||
. " ORDER BY `page_descr`";
|
||||
$page_rs = PMA_queryAsControlUser(
|
||||
@ -120,7 +120,7 @@ function PMA_getHtmlForSchemaExport($db, $page)
|
||||
)->getDisplay();
|
||||
}
|
||||
|
||||
return PMA\libraries\Template::get('database/designer/schema_export')
|
||||
return PhpMyAdmin\Template::get('database/designer/schema_export')
|
||||
->render(
|
||||
array(
|
||||
'db' => $db,
|
||||
@ -143,7 +143,7 @@ function PMA_getHtmlForSchemaExport($db, $page)
|
||||
function PMA_getHtmlForJSFields(
|
||||
$script_tables, $script_contr, $script_display_field, $display_page
|
||||
) {
|
||||
return PMA\libraries\Template::get('database/designer/js_fields')
|
||||
return PhpMyAdmin\Template::get('database/designer/js_fields')
|
||||
->render(
|
||||
array(
|
||||
'script_tables' => $script_tables,
|
||||
@ -166,7 +166,7 @@ function PMA_getHtmlForJSFields(
|
||||
*/
|
||||
function PMA_getDesignerPageMenu($visualBuilder, $selected_page, $params_array)
|
||||
{
|
||||
return PMA\libraries\Template::get('database/designer/side_menu')
|
||||
return PhpMyAdmin\Template::get('database/designer/side_menu')
|
||||
->render(
|
||||
array(
|
||||
'visualBuilder' => $visualBuilder,
|
||||
@ -190,9 +190,9 @@ function PMA_getSideMenuParamsArray()
|
||||
if ($GLOBALS['cfgRelation']['designersettingswork']) {
|
||||
|
||||
$query = 'SELECT `settings_data` FROM '
|
||||
. PMA\libraries\Util::backquote($cfgRelation['db']) . '.'
|
||||
. PMA\libraries\Util::backquote($cfgRelation['designer_settings'])
|
||||
. ' WHERE ' . PMA\libraries\Util::backquote('username') . ' = "'
|
||||
. PhpMyAdmin\Util::backquote($cfgRelation['db']) . '.'
|
||||
. PhpMyAdmin\Util::backquote($cfgRelation['designer_settings'])
|
||||
. ' WHERE ' . PhpMyAdmin\Util::backquote('username') . ' = "'
|
||||
. $GLOBALS['cfg']['Server']['user'] . '";';
|
||||
|
||||
$result = $GLOBALS['dbi']->fetchSingleRow($query);
|
||||
@ -271,7 +271,7 @@ function PMA_returnClassNamesFromMenuButtons()
|
||||
*/
|
||||
function PMA_getHTMLCanvas()
|
||||
{
|
||||
return PMA\libraries\Template::get('database/designer/canvas')->render();
|
||||
return PhpMyAdmin\Template::get('database/designer/canvas')->render();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -284,7 +284,7 @@ function PMA_getHTMLCanvas()
|
||||
*/
|
||||
function PMA_getHTMLTableList($tab_pos, $display_page)
|
||||
{
|
||||
return PMA\libraries\Template::get('database/designer/table_list')
|
||||
return PhpMyAdmin\Template::get('database/designer/table_list')
|
||||
->render(
|
||||
array(
|
||||
'tab_pos' => $tab_pos,
|
||||
@ -307,7 +307,7 @@ function PMA_getHTMLTableList($tab_pos, $display_page)
|
||||
function PMA_getDatabaseTables(
|
||||
$tab_pos, $display_page, $tab_column, $tables_all_keys, $tables_pk_or_unique_keys
|
||||
) {
|
||||
return PMA\libraries\Template::get('database/designer/database_tables')
|
||||
return PhpMyAdmin\Template::get('database/designer/database_tables')
|
||||
->render(
|
||||
array(
|
||||
'tab_pos' => $tab_pos,
|
||||
@ -326,7 +326,7 @@ function PMA_getDatabaseTables(
|
||||
*/
|
||||
function PMA_getNewRelationPanel()
|
||||
{
|
||||
return PMA\libraries\Template::get('database/designer/new_relation_panel')
|
||||
return PhpMyAdmin\Template::get('database/designer/new_relation_panel')
|
||||
->render();
|
||||
}
|
||||
|
||||
@ -337,7 +337,7 @@ function PMA_getNewRelationPanel()
|
||||
*/
|
||||
function PMA_getDeleteRelationPanel()
|
||||
{
|
||||
return PMA\libraries\Template::get('database/designer/delete_relation_panel')
|
||||
return PhpMyAdmin\Template::get('database/designer/delete_relation_panel')
|
||||
->render();
|
||||
}
|
||||
|
||||
@ -348,7 +348,7 @@ function PMA_getDeleteRelationPanel()
|
||||
*/
|
||||
function PMA_getOptionsPanel()
|
||||
{
|
||||
return PMA\libraries\Template::get('database/designer/options_panel')->render();
|
||||
return PhpMyAdmin\Template::get('database/designer/options_panel')->render();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -358,7 +358,7 @@ function PMA_getOptionsPanel()
|
||||
*/
|
||||
function PMA_getRenameToPanel()
|
||||
{
|
||||
return PMA\libraries\Template::get('database/designer/rename_to_panel')
|
||||
return PhpMyAdmin\Template::get('database/designer/rename_to_panel')
|
||||
->render();
|
||||
}
|
||||
|
||||
@ -369,7 +369,7 @@ function PMA_getRenameToPanel()
|
||||
*/
|
||||
function PMA_getHavingQueryPanel()
|
||||
{
|
||||
return PMA\libraries\Template::get('database/designer/having_query_panel')
|
||||
return PhpMyAdmin\Template::get('database/designer/having_query_panel')
|
||||
->render();
|
||||
}
|
||||
|
||||
@ -380,7 +380,7 @@ function PMA_getHavingQueryPanel()
|
||||
*/
|
||||
function PMA_getAggregateQueryPanel()
|
||||
{
|
||||
return PMA\libraries\Template::get('database/designer/aggregate_query_panel')
|
||||
return PhpMyAdmin\Template::get('database/designer/aggregate_query_panel')
|
||||
->render();
|
||||
}
|
||||
|
||||
@ -391,7 +391,7 @@ function PMA_getAggregateQueryPanel()
|
||||
*/
|
||||
function PMA_getWhereQueryPanel()
|
||||
{
|
||||
return PMA\libraries\Template::get('database/designer/where_query_panel')
|
||||
return PhpMyAdmin\Template::get('database/designer/where_query_panel')
|
||||
->render();
|
||||
}
|
||||
|
||||
@ -402,5 +402,5 @@ function PMA_getWhereQueryPanel()
|
||||
*/
|
||||
function PMA_getQueryDetails()
|
||||
{
|
||||
return PMA\libraries\Template::get('database/designer/query_details')->render();
|
||||
return PhpMyAdmin\Template::get('database/designer/query_details')->render();
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -46,7 +46,7 @@ if (empty($is_db)) {
|
||||
}
|
||||
Core::sendHeaderLocation(
|
||||
'./index.php'
|
||||
. URL::getCommonRaw($url_params)
|
||||
. Url::getCommonRaw($url_params)
|
||||
);
|
||||
}
|
||||
exit;
|
||||
@ -88,7 +88,7 @@ if (empty($is_table)
|
||||
* only happen if IS_TRANSFORMATION_WRAPPER?
|
||||
*/
|
||||
$_result = $GLOBALS['dbi']->tryQuery(
|
||||
'SELECT COUNT(*) FROM ' . PMA\libraries\Util::backquote($table)
|
||||
'SELECT COUNT(*) FROM ' . PhpMyAdmin\Util::backquote($table)
|
||||
. ';',
|
||||
null,
|
||||
PhpMyAdmin\DatabaseInterface::QUERY_STORE
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PhpMyAdmin\Message;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* Get HTML for the Change password dialog
|
||||
@ -33,7 +33,7 @@ function PMA_getHtmlForChangePassword($mode, $username, $hostname)
|
||||
. 'name="chgPassword" '
|
||||
. 'class="' . ($is_privileges ? 'submenu-item' : '') . '">';
|
||||
|
||||
$html .= URL::getHiddenInputs();
|
||||
$html .= Url::getHiddenInputs();
|
||||
|
||||
if (strpos($GLOBALS['PMA_PHP_SELF'], 'server_privileges') !== false) {
|
||||
$html .= '<input type="hidden" name="username" '
|
||||
@ -79,7 +79,7 @@ function PMA_getHtmlForChangePassword($mode, $username, $hostname)
|
||||
. '</td>'
|
||||
. '</tr>';
|
||||
|
||||
$serverType = PMA\libraries\Util::getServerType();
|
||||
$serverType = PhpMyAdmin\Util::getServerType();
|
||||
$orig_auth_plugin = PMA_getCurrentAuthenticationPlugin(
|
||||
'change',
|
||||
$username,
|
||||
@ -120,7 +120,7 @@ function PMA_getHtmlForChangePassword($mode, $username, $hostname)
|
||||
. 'or an \'<i>unencrypted connection that encrypts the '
|
||||
. 'password using RSA</i>\'; while connecting to the server.'
|
||||
)
|
||||
. PMA\libraries\Util::showMySQLDocu(
|
||||
. PhpMyAdmin\Util::showMySQLDocu(
|
||||
'sha256-authentication-plugin'
|
||||
)
|
||||
)
|
||||
|
||||
@ -42,7 +42,7 @@ require_once './libraries/check_user_privileges.lib.php';
|
||||
*/
|
||||
function PMA_getHtmlForCreateTable($db)
|
||||
{
|
||||
return PMA\libraries\Template::get('database/create_table')->render(
|
||||
return PhpMyAdmin\Template::get('database/create_table')->render(
|
||||
array('db' => $db)
|
||||
);
|
||||
}
|
||||
|
||||
@ -12,9 +12,9 @@ use PhpMyAdmin\Encoding;
|
||||
use PhpMyAdmin\Message;
|
||||
use PMA\libraries\plugins\ExportPlugin;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Table;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* Outputs appropriate checked statement for checkbox.
|
||||
@ -113,11 +113,11 @@ function PMA_getHtmlForHiddenInput(
|
||||
global $cfg;
|
||||
$html = "";
|
||||
if ($export_type == 'server') {
|
||||
$html .= URL::getHiddenInputs('', '', 1);
|
||||
$html .= Url::getHiddenInputs('', '', 1);
|
||||
} elseif ($export_type == 'database') {
|
||||
$html .= URL::getHiddenInputs($db, '', 1);
|
||||
$html .= Url::getHiddenInputs($db, '', 1);
|
||||
} else {
|
||||
$html .= 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
|
||||
@ -171,7 +171,7 @@ function PMA_getHtmlForExportOptionHeader($export_type, $db, $table)
|
||||
{
|
||||
$html = '<div class="exportoptions" id="header">';
|
||||
$html .= '<h2>';
|
||||
$html .= PMA\libraries\Util::getImage('b_export.png', __('Export'));
|
||||
$html .= PhpMyAdmin\Util::getImage('b_export.png', __('Export'));
|
||||
if ($export_type == 'server') {
|
||||
$html .= __('Exporting databases from the current server');
|
||||
} elseif ($export_type == 'database') {
|
||||
@ -252,8 +252,8 @@ function PMA_getOptionsForExportTemplates($export_type)
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
$query = "SELECT `id`, `template_name` FROM "
|
||||
. PMA\libraries\Util::backquote($cfgRelation['db']) . '.'
|
||||
. PMA\libraries\Util::backquote($cfgRelation['export_templates'])
|
||||
. PhpMyAdmin\Util::backquote($cfgRelation['db']) . '.'
|
||||
. PhpMyAdmin\Util::backquote($cfgRelation['export_templates'])
|
||||
. " WHERE `username` = "
|
||||
. "'" . $GLOBALS['dbi']->escapeString($GLOBALS['cfg']['Server']['user'])
|
||||
. "' AND `export_type` = '" . $GLOBALS['dbi']->escapeString($export_type) . "'"
|
||||
@ -397,7 +397,7 @@ function PMA_getHtmlForExportOptionsFormat($export_list)
|
||||
|
||||
$html .= '<div class="exportoptions" id="submit">';
|
||||
|
||||
$html .= PMA\libraries\Util::getExternalBug(
|
||||
$html .= PhpMyAdmin\Util::getExternalBug(
|
||||
__('SQL compatibility mode'), 'mysql', '50027', '14515'
|
||||
);
|
||||
global $cfg;
|
||||
@ -493,7 +493,7 @@ function PMA_getHtmlForExportOptionsQuickExport()
|
||||
$html .= '<label for="checkbox_quick_dump_onserver">';
|
||||
$html .= sprintf(
|
||||
__('Save on server in the directory <b>%s</b>'),
|
||||
htmlspecialchars(PMA\libraries\Util::userDir($cfg['SaveDir']))
|
||||
htmlspecialchars(PhpMyAdmin\Util::userDir($cfg['SaveDir']))
|
||||
);
|
||||
$html .= '</label>';
|
||||
$html .= '</li>';
|
||||
@ -528,7 +528,7 @@ function PMA_getHtmlForExportOptionsOutputSaveDir()
|
||||
$html .= '<label for="checkbox_dump_onserver">';
|
||||
$html .= sprintf(
|
||||
__('Save on server in the directory <b>%s</b>'),
|
||||
htmlspecialchars(PMA\libraries\Util::userDir($cfg['SaveDir']))
|
||||
htmlspecialchars(PhpMyAdmin\Util::userDir($cfg['SaveDir']))
|
||||
);
|
||||
$html .= '</label>';
|
||||
$html .= '</li>';
|
||||
@ -581,13 +581,13 @@ function PMA_getHtmlForExportOptionsOutputFormat($export_type)
|
||||
);
|
||||
$msg->addParamHtml('</a>');
|
||||
$msg->addParam($trans);
|
||||
$doc_url = PMA\libraries\Util::getDocuLink('faq', 'faq6-27');
|
||||
$doc_url = PhpMyAdmin\Util::getDocuLink('faq', 'faq6-27');
|
||||
$msg->addParamHtml(
|
||||
'<a href="' . $doc_url . '" target="documentation">'
|
||||
);
|
||||
$msg->addParamHtml('</a>');
|
||||
|
||||
$html .= PMA\libraries\Util::showHint($msg);
|
||||
$html .= PhpMyAdmin\Util::showHint($msg);
|
||||
$html .= '</label>';
|
||||
$html .= '<input type="text" name="filename_template" id="filename_template" ';
|
||||
$html .= ' value="';
|
||||
@ -1065,8 +1065,8 @@ function PMA_handleExportTemplateActions($cfgRelation)
|
||||
$id = '';
|
||||
}
|
||||
|
||||
$templateTable = PMA\libraries\Util::backquote($cfgRelation['db']) . '.'
|
||||
. PMA\libraries\Util::backquote($cfgRelation['export_templates']);
|
||||
$templateTable = PhpMyAdmin\Util::backquote($cfgRelation['db']) . '.'
|
||||
. PhpMyAdmin\Util::backquote($cfgRelation['export_templates']);
|
||||
$user = $GLOBALS['dbi']->escapeString($GLOBALS['cfg']['Server']['user']);
|
||||
|
||||
switch ($_REQUEST['templateAction']) {
|
||||
|
||||
@ -65,7 +65,7 @@ function PMA_printGitRevision()
|
||||
. $branch . ',<br /> '
|
||||
. sprintf(
|
||||
__('committed on %1$s by %2$s'),
|
||||
PMA\libraries\Util::localisedDate(strtotime($committer['date'])),
|
||||
PhpMyAdmin\Util::localisedDate(strtotime($committer['date'])),
|
||||
'<a href="' . Core::linkURL(
|
||||
'mailto:' . htmlspecialchars($committer['email'])
|
||||
) . '">'
|
||||
@ -75,7 +75,7 @@ function PMA_printGitRevision()
|
||||
? ', <br />'
|
||||
. sprintf(
|
||||
__('authored on %1$s by %2$s'),
|
||||
PMA\libraries\Util::localisedDate(strtotime($author['date'])),
|
||||
PhpMyAdmin\Util::localisedDate(strtotime($author['date'])),
|
||||
'<a href="' . Core::linkURL(
|
||||
'mailto:' . htmlspecialchars($author['email'])
|
||||
) . '">'
|
||||
|
||||
@ -14,7 +14,7 @@ use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Encoding;
|
||||
use PhpMyAdmin\Message;
|
||||
use PMA\libraries\plugins\ImportPlugin;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
|
||||
/**
|
||||
@ -30,11 +30,11 @@ function PMA_getHtmlForHiddenInputs($import_type, $db, $table)
|
||||
{
|
||||
$html = '';
|
||||
if ($import_type == 'server') {
|
||||
$html .= URL::getHiddenInputs('', '', 1);
|
||||
$html .= Url::getHiddenInputs('', '', 1);
|
||||
} elseif ($import_type == 'database') {
|
||||
$html .= URL::getHiddenInputs($db, '', 1);
|
||||
$html .= Url::getHiddenInputs($db, '', 1);
|
||||
} else {
|
||||
$html .= URL::getHiddenInputs($db, $table, 1);
|
||||
$html .= Url::getHiddenInputs($db, $table, 1);
|
||||
}
|
||||
$html .= ' <input type="hidden" name="import_type" value="'
|
||||
. $import_type . '" />' . "\n";
|
||||
@ -76,7 +76,7 @@ function PMA_getHtmlForImportJS($upload_id)
|
||||
. 'Details about the upload are not available.'
|
||||
),
|
||||
false
|
||||
) . PMA\libraries\Util::showDocu('faq', 'faq2-9');
|
||||
) . PhpMyAdmin\Util::showDocu('faq', 'faq2-9');
|
||||
$html .= " $('#upload_form_status_info').html('" . $image_tag . "');";
|
||||
$html .= ' $("#upload_form_status").css("display", "none");';
|
||||
} // else
|
||||
@ -106,7 +106,7 @@ function PMA_getHtmlForImportOptions($import_type, $db, $table)
|
||||
{
|
||||
$html = ' <div class="exportoptions" id="header">';
|
||||
$html .= ' <h2>';
|
||||
$html .= PMA\libraries\Util::getImage('b_import.png', __('Import'));
|
||||
$html .= PhpMyAdmin\Util::getImage('b_import.png', __('Import'));
|
||||
|
||||
if ($import_type == 'server') {
|
||||
$html .= __('Importing into the current server');
|
||||
@ -232,7 +232,7 @@ function PMA_getHtmlForImportOptionsFile(
|
||||
$html .= ' <li>';
|
||||
$html .= ' <input type="radio" name="file_location" '
|
||||
. 'id="radio_import_file" required="required" />';
|
||||
$html .= PMA\libraries\Util::getBrowseUploadFileBlock($max_upload_size);
|
||||
$html .= PhpMyAdmin\Util::getBrowseUploadFileBlock($max_upload_size);
|
||||
$html .= '<br />' . __('You may also drag and drop a file on any page.');
|
||||
$html .= ' </li>';
|
||||
$html .= ' <li>';
|
||||
@ -244,7 +244,7 @@ function PMA_getHtmlForImportOptionsFile(
|
||||
$html .= ' checked="checked"';
|
||||
}
|
||||
$html .= ' />';
|
||||
$html .= PMA\libraries\Util::getSelectUploadFileBlock(
|
||||
$html .= PhpMyAdmin\Util::getSelectUploadFileBlock(
|
||||
$import_list,
|
||||
$cfg['UploadDir']
|
||||
);
|
||||
@ -252,14 +252,14 @@ function PMA_getHtmlForImportOptionsFile(
|
||||
$html .= ' </ul>';
|
||||
|
||||
} elseif ($GLOBALS['is_upload']) {
|
||||
$html .= PMA\libraries\Util::getBrowseUploadFileBlock($max_upload_size);
|
||||
$html .= PhpMyAdmin\Util::getBrowseUploadFileBlock($max_upload_size);
|
||||
$html .= '<br />' . __('You may also drag and drop a file on any page.');
|
||||
} elseif (!$GLOBALS['is_upload']) {
|
||||
$html .= Message::notice(
|
||||
__('File uploads are not allowed on this server.')
|
||||
)->getDisplay();
|
||||
} elseif (!empty($cfg['UploadDir'])) {
|
||||
$html .= PMA\libraries\Util::getSelectUploadFileBlock(
|
||||
$html .= PhpMyAdmin\Util::getSelectUploadFileBlock(
|
||||
$import_list,
|
||||
$cfg['UploadDir']
|
||||
);
|
||||
@ -346,7 +346,7 @@ function PMA_getHtmlForImportOptionsOther()
|
||||
$html = ' <div class="importoptions">';
|
||||
$html .= ' <h3>' . __('Other options:') . '</h3>';
|
||||
$html .= ' <div class="formelementrow">';
|
||||
$html .= PMA\libraries\Util::getFKCheckbox();
|
||||
$html .= PhpMyAdmin\Util::getFKCheckbox();
|
||||
$html .= ' </div>';
|
||||
$html .= ' </div>';
|
||||
|
||||
@ -479,7 +479,7 @@ function PMA_getHtmlForImportWithPlugin($upload_id)
|
||||
{
|
||||
//some variable for javascript
|
||||
$ajax_url = "import_status.php?id=" . $upload_id . "&"
|
||||
. URL::getCommonRaw(array('import_status'=>1));
|
||||
. Url::getCommonRaw(array('import_status'=>1));
|
||||
$promot_str = Sanitize::jsFormat(
|
||||
__(
|
||||
'The file being uploaded is probably larger than '
|
||||
@ -497,7 +497,7 @@ function PMA_getHtmlForImportWithPlugin($upload_id)
|
||||
__('The file is being processed, please be patient.'),
|
||||
false
|
||||
);
|
||||
$import_url = URL::getCommonRaw(array('import_status'=>1));
|
||||
$import_url = Url::getCommonRaw(array('import_status'=>1));
|
||||
|
||||
//start output
|
||||
$html = 'var finished = false; ';
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
namespace PMA\libraries\engines;
|
||||
|
||||
use PhpMyAdmin\StorageEngine;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* The InnoDB storage engine
|
||||
|
||||
@ -7,9 +7,9 @@
|
||||
*/
|
||||
namespace PMA\libraries\engines;
|
||||
|
||||
use PMA;
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\StorageEngine;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* The PBXT storage engine
|
||||
@ -145,14 +145,14 @@ class Pbxt extends StorageEngine
|
||||
public function resolveTypeSize($formatted_size)
|
||||
{
|
||||
if (preg_match('/^[0-9]+[a-zA-Z]+$/', $formatted_size)) {
|
||||
$value = PMA\libraries\Util::extractValueFromFormattedSize(
|
||||
$value = Util::extractValueFromFormattedSize(
|
||||
$formatted_size
|
||||
);
|
||||
} else {
|
||||
$value = $formatted_size;
|
||||
}
|
||||
|
||||
return PMA\libraries\Util::formatByteDown($value);
|
||||
return Util::formatByteDown($value);
|
||||
}
|
||||
|
||||
//--------------------
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -178,7 +178,7 @@ function PMA_sanitizeUrl($url)
|
||||
*/
|
||||
function PMA_sendErrorReport($report)
|
||||
{
|
||||
$response = PMA\libraries\Util::httpRequest(
|
||||
$response = PhpMyAdmin\Util::httpRequest(
|
||||
SUBMISSION_URL,
|
||||
"POST",
|
||||
false,
|
||||
@ -308,15 +308,15 @@ function PMA_getErrorReportForm()
|
||||
{
|
||||
$datas = array(
|
||||
'report_data' => PMA_getPrettyReportData(),
|
||||
'hidden_inputs' => URL::getHiddenInputs(),
|
||||
'hidden_inputs' => Url::getHiddenInputs(),
|
||||
'hidden_fields' => null,
|
||||
);
|
||||
|
||||
$reportData = PMA_getReportData();
|
||||
if (!empty($reportData)) {
|
||||
$datas['hidden_fields'] = URL::getHiddenFields($reportData);
|
||||
$datas['hidden_fields'] = Url::getHiddenFields($reportData);
|
||||
}
|
||||
|
||||
return PMA\libraries\Template::get('error/report_form')
|
||||
return PhpMyAdmin\Template::get('error/report_form')
|
||||
->render($datas);
|
||||
}
|
||||
|
||||
@ -9,9 +9,9 @@
|
||||
use PhpMyAdmin\Encoding;
|
||||
use PhpMyAdmin\Message;
|
||||
use PMA\libraries\plugins\ExportPlugin;
|
||||
use PMA\libraries\Table;
|
||||
use PhpMyAdmin\Table;
|
||||
use PhpMyAdmin\ZipFile;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
|
||||
|
||||
@ -279,7 +279,7 @@ function PMA_getExportFilenameAndMimetype(
|
||||
);
|
||||
}
|
||||
}
|
||||
$filename = PMA\libraries\Util::expandUserString($filename_template);
|
||||
$filename = PhpMyAdmin\Util::expandUserString($filename_template);
|
||||
// remove dots in filename (coming from either the template or already
|
||||
// part of the filename) to avoid a remote code execution vulnerability
|
||||
$filename = Sanitize::sanitizeFilename($filename, $replaceDots = true);
|
||||
@ -324,7 +324,7 @@ function PMA_openExportFile($filename, $quick_export)
|
||||
$file_handle = null;
|
||||
$message = '';
|
||||
|
||||
$save_filename = PMA\libraries\Util::userDir($GLOBALS['cfg']['SaveDir'])
|
||||
$save_filename = PhpMyAdmin\Util::userDir($GLOBALS['cfg']['SaveDir'])
|
||||
. preg_replace('@[/\\\\]@', '_', $filename);
|
||||
|
||||
if (file_exists($save_filename)
|
||||
@ -477,11 +477,11 @@ function PMA_getHtmlForDisplayedExportHeader($export_type, $db, $table)
|
||||
*/
|
||||
$back_button = '<p>[ <a href="';
|
||||
if ($export_type == 'server') {
|
||||
$back_button .= 'server_export.php' . URL::getCommon();
|
||||
$back_button .= 'server_export.php' . Url::getCommon();
|
||||
} elseif ($export_type == 'database') {
|
||||
$back_button .= 'db_export.php' . URL::getCommon(array('db' => $db));
|
||||
$back_button .= 'db_export.php' . Url::getCommon(array('db' => $db));
|
||||
} else {
|
||||
$back_button .= 'tbl_export.php' . URL::getCommon(
|
||||
$back_button .= 'tbl_export.php' . Url::getCommon(
|
||||
array(
|
||||
'db' => $db, 'table' => $table
|
||||
)
|
||||
@ -684,12 +684,12 @@ function PMA_exportDatabase(
|
||||
&& in_array($table, $table_data)
|
||||
&& ! ($is_view)
|
||||
) {
|
||||
$tableObj = new PMA\libraries\Table($table, $db);
|
||||
$tableObj = new PhpMyAdmin\Table($table, $db);
|
||||
$nonGeneratedCols = $tableObj->getNonGeneratedColumns(true);
|
||||
|
||||
$local_query = 'SELECT ' . implode(', ', $nonGeneratedCols)
|
||||
. ' FROM ' . PMA\libraries\Util::backquote($db)
|
||||
. '.' . PMA\libraries\Util::backquote($table);
|
||||
. ' FROM ' . PhpMyAdmin\Util::backquote($db)
|
||||
. '.' . PhpMyAdmin\Util::backquote($table);
|
||||
|
||||
if (! $export_plugin->exportData(
|
||||
$db, $table, $crlf, $err_url, $local_query, $aliases
|
||||
@ -870,12 +870,12 @@ function PMA_exportTable(
|
||||
$GLOBALS['dbi']->selectDb($db);
|
||||
} else {
|
||||
// Data is exported only for Non-generated columns
|
||||
$tableObj = new PMA\libraries\Table($table, $db);
|
||||
$tableObj = new PhpMyAdmin\Table($table, $db);
|
||||
$nonGeneratedCols = $tableObj->getNonGeneratedColumns(true);
|
||||
|
||||
$local_query = 'SELECT ' . implode(', ', $nonGeneratedCols)
|
||||
. ' FROM ' . PMA\libraries\Util::backquote($db)
|
||||
. '.' . PMA\libraries\Util::backquote($table) . $add_query;
|
||||
. ' FROM ' . PhpMyAdmin\Util::backquote($db)
|
||||
. '.' . PhpMyAdmin\Util::backquote($table) . $add_query;
|
||||
}
|
||||
if (! $export_plugin->exportData(
|
||||
$db, $table, $crlf, $err_url, $local_query, $aliases
|
||||
@ -1000,8 +1000,8 @@ function PMA_lockTables($db, $tables, $lockType = "WRITE")
|
||||
{
|
||||
$locks = array();
|
||||
foreach ($tables as $table) {
|
||||
$locks[] = PMA\libraries\Util::backquote($db) . "."
|
||||
. PMA\libraries\Util::backquote($table) . " " . $lockType;
|
||||
$locks[] = PhpMyAdmin\Util::backquote($db) . "."
|
||||
. PhpMyAdmin\Util::backquote($table) . " " . $lockType;
|
||||
}
|
||||
|
||||
$sql = "LOCK TABLES " . implode(", ", $locks);
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
*/
|
||||
namespace PMA\libraries\gis;
|
||||
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
use \TCPDF;
|
||||
|
||||
/**
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
namespace PMA\libraries\gis;
|
||||
|
||||
use PhpMyAdmin\Core;
|
||||
use PMA\libraries\Util;
|
||||
use PhpMyAdmin\Util;
|
||||
use \TCPDF;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
|
||||
|
||||
@ -8,9 +8,9 @@
|
||||
use PhpMyAdmin\Encoding;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Table;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
@ -298,7 +298,7 @@ function PMA_lookForUse($buffer, $db, $reload)
|
||||
// $db must not contain the escape characters generated by backquote()
|
||||
// ( used in PMA_buildSQL() as: backquote($db_name), and then called
|
||||
// in PMA_importRunQuery() which in turn calls PMA_lookForUse() )
|
||||
$db = PMA\libraries\Util::unQuote($db);
|
||||
$db = PhpMyAdmin\Util::unQuote($db);
|
||||
|
||||
$reload = true;
|
||||
}
|
||||
@ -1029,15 +1029,15 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
for ($i = 0; $i < $num_tables; ++$i) {
|
||||
$num_cols = count($tables[$i][COL_NAMES]);
|
||||
$tempSQLStr = "CREATE TABLE IF NOT EXISTS "
|
||||
. PMA\libraries\Util::backquote($db_name)
|
||||
. '.' . PMA\libraries\Util::backquote($tables[$i][TBL_NAME]) . " (";
|
||||
. PhpMyAdmin\Util::backquote($db_name)
|
||||
. '.' . PhpMyAdmin\Util::backquote($tables[$i][TBL_NAME]) . " (";
|
||||
for ($j = 0; $j < $num_cols; ++$j) {
|
||||
$size = $analyses[$i][SIZES][$j];
|
||||
if ((int)$size == 0) {
|
||||
$size = 10;
|
||||
}
|
||||
|
||||
$tempSQLStr .= PMA\libraries\Util::backquote(
|
||||
$tempSQLStr .= PhpMyAdmin\Util::backquote(
|
||||
$tables[$i][COL_NAMES][$j]
|
||||
) . " "
|
||||
. $type_array[$analyses[$i][TYPES][$j]];
|
||||
@ -1073,11 +1073,11 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
$num_cols = count($tables[$i][COL_NAMES]);
|
||||
$num_rows = count($tables[$i][ROWS]);
|
||||
|
||||
$tempSQLStr = "INSERT INTO " . PMA\libraries\Util::backquote($db_name) . '.'
|
||||
. PMA\libraries\Util::backquote($tables[$i][TBL_NAME]) . " (";
|
||||
$tempSQLStr = "INSERT INTO " . PhpMyAdmin\Util::backquote($db_name) . '.'
|
||||
. PhpMyAdmin\Util::backquote($tables[$i][TBL_NAME]) . " (";
|
||||
|
||||
for ($m = 0; $m < $num_cols; ++$m) {
|
||||
$tempSQLStr .= PMA\libraries\Util::backquote($tables[$i][COL_NAMES][$m]);
|
||||
$tempSQLStr .= PhpMyAdmin\Util::backquote($tables[$i][COL_NAMES][$m]);
|
||||
|
||||
if ($m != ($num_cols - 1)) {
|
||||
$tempSQLStr .= ", ";
|
||||
@ -1196,8 +1196,8 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
}
|
||||
|
||||
$params = array('db' => (string)$db_name);
|
||||
$db_url = 'db_structure.php' . URL::getCommon($params);
|
||||
$db_ops_url = 'db_operations.php' . 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>' . __(
|
||||
@ -1217,13 +1217,13 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
$db_url,
|
||||
sprintf(
|
||||
__('Go to database: %s'),
|
||||
htmlspecialchars(PMA\libraries\Util::backquote($db_name))
|
||||
htmlspecialchars(PhpMyAdmin\Util::backquote($db_name))
|
||||
),
|
||||
htmlspecialchars($db_name),
|
||||
$db_ops_url,
|
||||
sprintf(
|
||||
__('Edit settings for %s'),
|
||||
htmlspecialchars(PMA\libraries\Util::backquote($db_name))
|
||||
htmlspecialchars(PhpMyAdmin\Util::backquote($db_name))
|
||||
)
|
||||
);
|
||||
|
||||
@ -1237,9 +1237,9 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
'db' => (string) $db_name,
|
||||
'table' => (string) $tables[$i][TBL_NAME]
|
||||
);
|
||||
$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);
|
||||
$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);
|
||||
|
||||
@ -1253,7 +1253,7 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
sprintf(
|
||||
__('Go to table: %s'),
|
||||
htmlspecialchars(
|
||||
PMA\libraries\Util::backquote($tables[$i][TBL_NAME])
|
||||
PhpMyAdmin\Util::backquote($tables[$i][TBL_NAME])
|
||||
)
|
||||
),
|
||||
htmlspecialchars($tables[$i][TBL_NAME]),
|
||||
@ -1261,14 +1261,14 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
sprintf(
|
||||
__('Structure of %s'),
|
||||
htmlspecialchars(
|
||||
PMA\libraries\Util::backquote($tables[$i][TBL_NAME])
|
||||
PhpMyAdmin\Util::backquote($tables[$i][TBL_NAME])
|
||||
)
|
||||
),
|
||||
$tbl_ops_url,
|
||||
sprintf(
|
||||
__('Edit settings for %s'),
|
||||
htmlspecialchars(
|
||||
PMA\libraries\Util::backquote($tables[$i][TBL_NAME])
|
||||
PhpMyAdmin\Util::backquote($tables[$i][TBL_NAME])
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -1279,7 +1279,7 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
sprintf(
|
||||
__('Go to view: %s'),
|
||||
htmlspecialchars(
|
||||
PMA\libraries\Util::backquote($tables[$i][TBL_NAME])
|
||||
PhpMyAdmin\Util::backquote($tables[$i][TBL_NAME])
|
||||
)
|
||||
),
|
||||
htmlspecialchars($tables[$i][TBL_NAME])
|
||||
@ -1419,10 +1419,10 @@ function PMA_getMatchedRows($analyzed_sql_results = array())
|
||||
'db' => $GLOBALS['db'],
|
||||
'sql_query' => $matched_row_query
|
||||
);
|
||||
$matched_rows_url = 'sql.php' . 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']),
|
||||
'sql_query' => PhpMyAdmin\Util::formatSql($analyzed_sql_results['query']),
|
||||
'matched_rows' => $matched_rows,
|
||||
'matched_rows_url' => $matched_rows_url
|
||||
);
|
||||
@ -1642,16 +1642,16 @@ function PMA_isTableTransactional($table)
|
||||
{
|
||||
$table = explode('.', $table);
|
||||
if (count($table) == 2) {
|
||||
$db = PMA\libraries\Util::unQuote($table[0]);
|
||||
$table = PMA\libraries\Util::unQuote($table[1]);
|
||||
$db = PhpMyAdmin\Util::unQuote($table[0]);
|
||||
$table = PhpMyAdmin\Util::unQuote($table[1]);
|
||||
} else {
|
||||
$db = $GLOBALS['db'];
|
||||
$table = PMA\libraries\Util::unQuote($table[0]);
|
||||
$table = PhpMyAdmin\Util::unQuote($table[0]);
|
||||
}
|
||||
|
||||
// Query to check if table exists.
|
||||
$check_table_query = 'SELECT * FROM ' . PMA\libraries\Util::backquote($db)
|
||||
. '.' . PMA\libraries\Util::backquote($table) . ' '
|
||||
$check_table_query = 'SELECT * FROM ' . PhpMyAdmin\Util::backquote($db)
|
||||
. '.' . PhpMyAdmin\Util::backquote($table) . ' '
|
||||
. 'LIMIT 1';
|
||||
|
||||
$result = $GLOBALS['dbi']->tryQuery($check_table_query);
|
||||
|
||||
@ -9,8 +9,8 @@ use PhpMyAdmin\Message;
|
||||
use PMA\libraries\plugins\TransformationsPlugin;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
use PMA\libraries\Transformations;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Transformations;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* Retrieve form parameters for insert/edit form
|
||||
@ -83,8 +83,8 @@ function PMA_analyzeWhereClauses(
|
||||
foreach ($where_clause_array as $key_id => $where_clause) {
|
||||
|
||||
$local_query = 'SELECT * FROM '
|
||||
. PMA\libraries\Util::backquote($db) . '.'
|
||||
. PMA\libraries\Util::backquote($table)
|
||||
. PhpMyAdmin\Util::backquote($db) . '.'
|
||||
. PhpMyAdmin\Util::backquote($table)
|
||||
. ' WHERE ' . $where_clause . ';';
|
||||
$result[$key_id] = $GLOBALS['dbi']->query(
|
||||
$local_query, null, PhpMyAdmin\DatabaseInterface::QUERY_STORE
|
||||
@ -122,7 +122,7 @@ function PMA_showEmptyResultMessageOrSetUniqueCondition($rows, $key_id,
|
||||
if (! $rows[$key_id]) {
|
||||
unset($rows[$key_id], $where_clause_array[$key_id]);
|
||||
Response::getInstance()->addHtml(
|
||||
PMA\libraries\Util::getMessage(
|
||||
PhpMyAdmin\Util::getMessage(
|
||||
__('MySQL returned an empty result set (i.e. zero rows).'),
|
||||
$local_query
|
||||
)
|
||||
@ -135,7 +135,7 @@ function PMA_showEmptyResultMessageOrSetUniqueCondition($rows, $key_id,
|
||||
$meta = $GLOBALS['dbi']->getFieldsMeta($result[$key_id]);
|
||||
|
||||
list($unique_condition, $tmp_clause_is_unique)
|
||||
= PMA\libraries\Util::getUniqueCondition(
|
||||
= PhpMyAdmin\Util::getUniqueCondition(
|
||||
$result[$key_id], // handle
|
||||
count($meta), // fields_cnt
|
||||
$meta, // fields_meta
|
||||
@ -164,8 +164,8 @@ function PMA_showEmptyResultMessageOrSetUniqueCondition($rows, $key_id,
|
||||
function PMA_loadFirstRow($table, $db)
|
||||
{
|
||||
$result = $GLOBALS['dbi']->query(
|
||||
'SELECT * FROM ' . PMA\libraries\Util::backquote($db)
|
||||
. '.' . PMA\libraries\Util::backquote($table) . ' LIMIT 1;',
|
||||
'SELECT * FROM ' . PhpMyAdmin\Util::backquote($db)
|
||||
. '.' . PhpMyAdmin\Util::backquote($table) . ' LIMIT 1;',
|
||||
null,
|
||||
PhpMyAdmin\DatabaseInterface::QUERY_STORE
|
||||
);
|
||||
@ -226,12 +226,12 @@ function PMA_showTypeOrFunction($which, $url_params, $is_show)
|
||||
|
||||
if (! $is_show) {
|
||||
return ' : <a href="tbl_change.php'
|
||||
. URL::getCommon($this_url_params) . '">'
|
||||
. Url::getCommon($this_url_params) . '">'
|
||||
. PMA_showTypeOrFunctionLabel($which)
|
||||
. '</a>';
|
||||
}
|
||||
return '<th><a href="tbl_change.php'
|
||||
. URL::getCommon($this_url_params)
|
||||
. Url::getCommon($this_url_params)
|
||||
. '" title="' . __('Hide') . '">'
|
||||
. PMA_showTypeOrFunctionLabel($which)
|
||||
. '</a></th>';
|
||||
@ -414,7 +414,7 @@ function PMA_getFunctionColumn($column, $is_upload, $column_name_appendix,
|
||||
. ' ' . $onChangeClause
|
||||
. ' tabindex="' . ($tabindex + $tabindex_for_function) . '"'
|
||||
. ' id="field_' . $idindex . '_1">';
|
||||
$html_output .= PMA\libraries\Util::getFunctionsForField(
|
||||
$html_output .= PhpMyAdmin\Util::getFunctionsForField(
|
||||
$column,
|
||||
$insert_mode,
|
||||
$foreignData
|
||||
@ -685,7 +685,7 @@ function PMA_getForeignLink($column, $backup_field, $column_name_appendix,
|
||||
. 'value="' . htmlspecialchars($data) . '" />';
|
||||
|
||||
$html_output .= '<a class="ajax browse_foreign" href="browse_foreigners.php'
|
||||
. URL::getCommon(
|
||||
. Url::getCommon(
|
||||
array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
@ -779,7 +779,7 @@ function PMA_getTextarea($column, $backup_field, $column_name_appendix,
|
||||
$the_class = 'char';
|
||||
$textAreaRows = $GLOBALS['cfg']['CharTextareaRows'];
|
||||
$textareaCols = $GLOBALS['cfg']['CharTextareaCols'];
|
||||
$extracted_columnspec = PMA\libraries\Util::extractColumnSpec(
|
||||
$extracted_columnspec = PhpMyAdmin\Util::extractColumnSpec(
|
||||
$column['Type']
|
||||
);
|
||||
$maxlength = $extracted_columnspec['spec_in_brackets'];
|
||||
@ -1100,7 +1100,7 @@ function PMA_getBinaryAndBlobColumn(
|
||||
) {
|
||||
$html_output .= __('Binary - do not edit');
|
||||
if (isset($data)) {
|
||||
$data_size = PMA\libraries\Util::formatByteDown(
|
||||
$data_size = PhpMyAdmin\Util::formatByteDown(
|
||||
mb_strlen(stripslashes($data)), 3, 1
|
||||
);
|
||||
$html_output .= ' (' . $data_size[0] . ' ' . $data_size[1] . ')';
|
||||
@ -1189,7 +1189,7 @@ function PMA_getHTMLinput(
|
||||
}
|
||||
$input_min_max = false;
|
||||
if (in_array($column['True_Type'], $GLOBALS['PMA_Types']->getIntegerTypes())) {
|
||||
$extracted_columnspec = PMA\libraries\Util::extractColumnSpec(
|
||||
$extracted_columnspec = PhpMyAdmin\Util::extractColumnSpec(
|
||||
$column['Type']
|
||||
);
|
||||
$is_unsigned = $extracted_columnspec['unsigned'];
|
||||
@ -1226,7 +1226,7 @@ function PMA_getHTMLinput(
|
||||
function PMA_getSelectOptionForUpload($vkey, $column)
|
||||
{
|
||||
$files = PMA_getFileSelectOptions(
|
||||
PMA\libraries\Util::userDir($GLOBALS['cfg']['UploadDir'])
|
||||
PhpMyAdmin\Util::userDir($GLOBALS['cfg']['UploadDir'])
|
||||
);
|
||||
|
||||
if ($files === false) {
|
||||
@ -1274,7 +1274,7 @@ function PMA_getMaxUploadSize($column, $biggest_max_file_size)
|
||||
$this_field_max_size = $max_field_sizes[$column['pma_type']];
|
||||
}
|
||||
$html_output
|
||||
= PMA\libraries\Util::getFormattedMaximumUploadSize(
|
||||
= PhpMyAdmin\Util::getFormattedMaximumUploadSize(
|
||||
$this_field_max_size
|
||||
) . "\n";
|
||||
// do not generate here the MAX_FILE_SIZE, because we should
|
||||
@ -1415,9 +1415,9 @@ function PMA_getColumnSize($column, $extracted_columnspec)
|
||||
*/
|
||||
function PMA_getHTMLforGisDataTypes()
|
||||
{
|
||||
$edit_str = PMA\libraries\Util::getIcon('b_edit.png', __('Edit/Insert'));
|
||||
$edit_str = PhpMyAdmin\Util::getIcon('b_edit.png', __('Edit/Insert'));
|
||||
return '<span class="open_gis_editor">'
|
||||
. PMA\libraries\Util::linkOrButton(
|
||||
. PhpMyAdmin\Util::linkOrButton(
|
||||
'#', $edit_str, array(), false, false, '_blank'
|
||||
)
|
||||
. '</span>';
|
||||
@ -1437,7 +1437,7 @@ function PMA_getContinueInsertionForm($table, $db, $where_clause_array, $err_url
|
||||
{
|
||||
$html_output = '<form id="continueForm" method="post"'
|
||||
. ' action="tbl_replace.php" name="continueForm">'
|
||||
. URL::getHiddenInputs($db, $table)
|
||||
. Url::getHiddenInputs($db, $table)
|
||||
. '<input type="hidden" name="goto"'
|
||||
. ' value="' . htmlspecialchars($GLOBALS['goto']) . '" />'
|
||||
. '<input type="hidden" name="err_url"'
|
||||
@ -1605,7 +1605,7 @@ function PMA_getAfterInsertDropDown($where_clause, $after_insert, $found_unique_
|
||||
function PMA_getSubmitAndResetButtonForActionsPanel($tabindex, $tabindex_for_value)
|
||||
{
|
||||
return '<td>'
|
||||
. PMA\libraries\Util::showHint(
|
||||
. PhpMyAdmin\Util::showHint(
|
||||
__(
|
||||
'Use TAB key to move from value to value,'
|
||||
. ' or CTRL+arrows to move anywhere.'
|
||||
@ -1688,7 +1688,7 @@ function PMA_getSpecialCharsAndBackupFieldForExistingRow(
|
||||
} elseif ($column['True_Type'] == 'bit') {
|
||||
$special_chars = $as_is
|
||||
? $current_row[$column['Field']]
|
||||
: PMA\libraries\Util::printableBitValue(
|
||||
: PhpMyAdmin\Util::printableBitValue(
|
||||
$current_row[$column['Field']],
|
||||
$extracted_columnspec['spec_in_brackets']
|
||||
);
|
||||
@ -1699,7 +1699,7 @@ function PMA_getSpecialCharsAndBackupFieldForExistingRow(
|
||||
) {
|
||||
$current_row[$column['Field']] = $as_is
|
||||
? $current_row[$column['Field']]
|
||||
: PMA\libraries\Util::addMicroseconds(
|
||||
: PhpMyAdmin\Util::addMicroseconds(
|
||||
$current_row[$column['Field']]
|
||||
);
|
||||
$special_chars = htmlspecialchars($current_row[$column['Field']]);
|
||||
@ -1707,7 +1707,7 @@ function PMA_getSpecialCharsAndBackupFieldForExistingRow(
|
||||
// Convert gis data to Well Know Text format
|
||||
$current_row[$column['Field']] = $as_is
|
||||
? $current_row[$column['Field']]
|
||||
: PMA\libraries\Util::asWKT(
|
||||
: PhpMyAdmin\Util::asWKT(
|
||||
$current_row[$column['Field']], true
|
||||
);
|
||||
$special_chars = htmlspecialchars($current_row[$column['Field']]);
|
||||
@ -1727,7 +1727,7 @@ function PMA_getSpecialCharsAndBackupFieldForExistingRow(
|
||||
//We need to duplicate the first \n or otherwise we will lose
|
||||
//the first newline entered in a VARCHAR or TEXT column
|
||||
$special_chars_encoded
|
||||
= PMA\libraries\Util::duplicateFirstNewline($special_chars);
|
||||
= PhpMyAdmin\Util::duplicateFirstNewline($special_chars);
|
||||
|
||||
$data = $current_row[$column['Field']];
|
||||
} // end if... else...
|
||||
@ -1783,21 +1783,21 @@ function PMA_getSpecialCharsAndBackupFieldForInsertingMode(
|
||||
$trueType = $column['True_Type'];
|
||||
|
||||
if ($trueType == 'bit') {
|
||||
$special_chars = PMA\libraries\Util::convertBitDefaultValue(
|
||||
$special_chars = PhpMyAdmin\Util::convertBitDefaultValue(
|
||||
$column['Default']
|
||||
);
|
||||
} elseif (substr($trueType, 0, 9) == 'timestamp'
|
||||
|| $trueType == 'datetime'
|
||||
|| $trueType == 'time'
|
||||
) {
|
||||
$special_chars = PMA\libraries\Util::addMicroseconds($column['Default']);
|
||||
$special_chars = PhpMyAdmin\Util::addMicroseconds($column['Default']);
|
||||
} elseif ($trueType == 'binary' || $trueType == 'varbinary') {
|
||||
$special_chars = bin2hex($column['Default']);
|
||||
} else {
|
||||
$special_chars = htmlspecialchars($column['Default']);
|
||||
}
|
||||
$backup_field = '';
|
||||
$special_chars_encoded = PMA\libraries\Util::duplicateFirstNewline(
|
||||
$special_chars_encoded = PhpMyAdmin\Util::duplicateFirstNewline(
|
||||
$special_chars
|
||||
);
|
||||
return array(
|
||||
@ -1872,8 +1872,8 @@ function PMA_isInsertRow()
|
||||
*/
|
||||
function PMA_setSessionForEditNext($one_where_clause)
|
||||
{
|
||||
$local_query = 'SELECT * FROM ' . PMA\libraries\Util::backquote($GLOBALS['db'])
|
||||
. '.' . PMA\libraries\Util::backquote($GLOBALS['table']) . ' WHERE '
|
||||
$local_query = 'SELECT * FROM ' . PhpMyAdmin\Util::backquote($GLOBALS['db'])
|
||||
. '.' . PhpMyAdmin\Util::backquote($GLOBALS['table']) . ' WHERE '
|
||||
. str_replace('` =', '` >', $one_where_clause) . ' LIMIT 1;';
|
||||
|
||||
$res = $GLOBALS['dbi']->query($local_query);
|
||||
@ -1882,7 +1882,7 @@ function PMA_setSessionForEditNext($one_where_clause)
|
||||
// must find a unique condition based on unique key,
|
||||
// not a combination of all fields
|
||||
list($unique_condition, $clause_is_unique)
|
||||
= PMA\libraries\Util::getUniqueCondition(
|
||||
= PhpMyAdmin\Util::getUniqueCondition(
|
||||
$res, // handle
|
||||
count($meta), // fields_cnt
|
||||
$meta, // fields_meta
|
||||
@ -1948,7 +1948,7 @@ function PMA_getErrorUrl($url_params)
|
||||
if (isset($_REQUEST['err_url'])) {
|
||||
return $_REQUEST['err_url'];
|
||||
} else {
|
||||
return 'tbl_change.php' . URL::getCommon($url_params);
|
||||
return 'tbl_change.php' . Url::getCommon($url_params);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1970,7 +1970,7 @@ function PMA_buildSqlQuery($is_insertignore, $query_fields, $value_sets)
|
||||
}
|
||||
$query = array(
|
||||
$insert_command . 'INTO '
|
||||
. PMA\libraries\Util::backquote($GLOBALS['table'])
|
||||
. PhpMyAdmin\Util::backquote($GLOBALS['table'])
|
||||
. ' (' . implode(', ', $query_fields) . ') VALUES ('
|
||||
. implode('), (', $value_sets) . ')'
|
||||
);
|
||||
@ -2085,10 +2085,10 @@ function PMA_getDisplayValueForForeignTableColumn($where_comparison,
|
||||
);
|
||||
// Field to display from the foreign table?
|
||||
if (isset($display_field) && strlen($display_field) > 0) {
|
||||
$dispsql = 'SELECT ' . PMA\libraries\Util::backquote($display_field)
|
||||
. ' FROM ' . PMA\libraries\Util::backquote($foreigner['foreign_db'])
|
||||
. '.' . PMA\libraries\Util::backquote($foreigner['foreign_table'])
|
||||
. ' WHERE ' . PMA\libraries\Util::backquote($foreigner['foreign_field'])
|
||||
$dispsql = 'SELECT ' . PhpMyAdmin\Util::backquote($display_field)
|
||||
. ' FROM ' . PhpMyAdmin\Util::backquote($foreigner['foreign_db'])
|
||||
. '.' . PhpMyAdmin\Util::backquote($foreigner['foreign_table'])
|
||||
. ' WHERE ' . PhpMyAdmin\Util::backquote($foreigner['foreign_field'])
|
||||
. $where_comparison;
|
||||
$dispresult = $GLOBALS['dbi']->tryQuery(
|
||||
$dispsql, null, PhpMyAdmin\DatabaseInterface::QUERY_STORE
|
||||
@ -2136,13 +2136,13 @@ function PMA_getLinkForRelationalDisplayField($map, $relation_field,
|
||||
'table' => $foreigner['foreign_table'],
|
||||
'pos' => '0',
|
||||
'sql_query' => 'SELECT * FROM '
|
||||
. PMA\libraries\Util::backquote($foreigner['foreign_db'])
|
||||
. '.' . PMA\libraries\Util::backquote($foreigner['foreign_table'])
|
||||
. ' WHERE ' . PMA\libraries\Util::backquote($foreigner['foreign_field'])
|
||||
. PhpMyAdmin\Util::backquote($foreigner['foreign_db'])
|
||||
. '.' . PhpMyAdmin\Util::backquote($foreigner['foreign_table'])
|
||||
. ' WHERE ' . PhpMyAdmin\Util::backquote($foreigner['foreign_field'])
|
||||
. $where_comparison
|
||||
);
|
||||
$output = '<a href="sql.php'
|
||||
. URL::getCommon($_url_params) . '"' . $title . '>';
|
||||
. Url::getCommon($_url_params) . '"' . $title . '>';
|
||||
|
||||
if ('D' == $_SESSION['tmpval']['relational_display']) {
|
||||
// user chose "relational display field" in the
|
||||
@ -2188,7 +2188,7 @@ function PMA_transformEditedValues($db, $table,
|
||||
? $transformation[$type . '_options']
|
||||
: ''
|
||||
);
|
||||
$transform_options['wrapper_link'] = URL::getCommon($_url_params);
|
||||
$transform_options['wrapper_link'] = Url::getCommon($_url_params);
|
||||
$class_name = Transformations::getClassName($include_file);
|
||||
/** @var TransformationsPlugin $transformation_plugin */
|
||||
$transformation_plugin = new $class_name();
|
||||
@ -2296,7 +2296,7 @@ function PMA_getQueryValuesForInsertAndUpdateInMultipleEdit($multi_edit_columns_
|
||||
$query_values[] = $current_value_as_an_array;
|
||||
// first inserted row so prepare the list of fields
|
||||
if (empty($value_sets)) {
|
||||
$query_fields[] = PMA\libraries\Util::backquote(
|
||||
$query_fields[] = PhpMyAdmin\Util::backquote(
|
||||
$multi_edit_columns_name[$key]
|
||||
);
|
||||
}
|
||||
@ -2310,7 +2310,7 @@ function PMA_getQueryValuesForInsertAndUpdateInMultipleEdit($multi_edit_columns_
|
||||
// field had the null checkbox before the update
|
||||
// field no longer has the null checkbox
|
||||
$query_values[]
|
||||
= PMA\libraries\Util::backquote($multi_edit_columns_name[$key])
|
||||
= PhpMyAdmin\Util::backquote($multi_edit_columns_name[$key])
|
||||
. ' = ' . $current_value_as_an_array;
|
||||
} elseif (empty($multi_edit_funcs[$key])
|
||||
&& isset($multi_edit_columns_prev[$key])
|
||||
@ -2326,7 +2326,7 @@ function PMA_getQueryValuesForInsertAndUpdateInMultipleEdit($multi_edit_columns_
|
||||
|| empty($multi_edit_columns_null[$key])
|
||||
) {
|
||||
$query_values[]
|
||||
= PMA\libraries\Util::backquote($multi_edit_columns_name[$key])
|
||||
= PhpMyAdmin\Util::backquote($multi_edit_columns_name[$key])
|
||||
. ' = ' . $current_value_as_an_array;
|
||||
}
|
||||
}
|
||||
@ -2365,7 +2365,7 @@ function PMA_getCurrentValueForDifferentTypes($possibly_uploaded_val, $key,
|
||||
&& is_array($multi_edit_columns_type) && !empty($where_clause)
|
||||
) {
|
||||
$protected_row = $GLOBALS['dbi']->fetchSingleRow(
|
||||
'SELECT * FROM ' . PMA\libraries\Util::backquote($table)
|
||||
'SELECT * FROM ' . PhpMyAdmin\Util::backquote($table)
|
||||
. ' WHERE ' . $where_clause . ';'
|
||||
);
|
||||
}
|
||||
@ -2469,10 +2469,10 @@ function PMA_verifyWhetherValueCanBeTruncatedAndAppendExtraData(
|
||||
|
||||
$extra_data['isNeedToRecheck'] = false;
|
||||
|
||||
$sql_for_real_value = 'SELECT ' . PMA\libraries\Util::backquote($table) . '.'
|
||||
. PMA\libraries\Util::backquote($column_name)
|
||||
. ' FROM ' . PMA\libraries\Util::backquote($db) . '.'
|
||||
. PMA\libraries\Util::backquote($table)
|
||||
$sql_for_real_value = 'SELECT ' . PhpMyAdmin\Util::backquote($table) . '.'
|
||||
. PhpMyAdmin\Util::backquote($column_name)
|
||||
. ' FROM ' . PhpMyAdmin\Util::backquote($db) . '.'
|
||||
. PhpMyAdmin\Util::backquote($table)
|
||||
. ' WHERE ' . $_REQUEST['where_clause'][0];
|
||||
|
||||
$result = $GLOBALS['dbi']->tryQuery($sql_for_real_value);
|
||||
@ -2484,7 +2484,7 @@ function PMA_verifyWhetherValueCanBeTruncatedAndAppendExtraData(
|
||||
|| ($meta->type == 'datetime')
|
||||
|| ($meta->type == 'time')
|
||||
) {
|
||||
$new_value = PMA\libraries\Util::addMicroseconds($new_value);
|
||||
$new_value = PhpMyAdmin\Util::addMicroseconds($new_value);
|
||||
}
|
||||
$extra_data['isNeedToRecheck'] = true;
|
||||
$extra_data['truncatableFieldValue'] = $new_value;
|
||||
@ -2764,7 +2764,7 @@ function PMA_getHtmlForInsertEditFormColumn($table_columns, $column_number,
|
||||
}
|
||||
|
||||
$extracted_columnspec
|
||||
= PMA\libraries\Util::extractColumnSpec($column['Type']);
|
||||
= PhpMyAdmin\Util::extractColumnSpec($column['Type']);
|
||||
|
||||
if (-1 === $column['len']) {
|
||||
$column['len'] = $GLOBALS['dbi']->fieldLen(
|
||||
@ -2803,7 +2803,7 @@ function PMA_getHtmlForInsertEditFormColumn($table_columns, $column_number,
|
||||
} //End if
|
||||
|
||||
// Get a list of GIS data types.
|
||||
$gis_data_types = PMA\libraries\Util::getGISDatatypes();
|
||||
$gis_data_types = PhpMyAdmin\Util::getGISDatatypes();
|
||||
|
||||
// Prepares the field value
|
||||
$real_null_value = false;
|
||||
@ -2838,7 +2838,7 @@ function PMA_getHtmlForInsertEditFormColumn($table_columns, $column_number,
|
||||
$tabindex = $idindex;
|
||||
|
||||
// Get a list of data types that are not yet supported.
|
||||
$no_support_types = PMA\libraries\Util::unsupportedDatatypes();
|
||||
$no_support_types = PhpMyAdmin\Util::unsupportedDatatypes();
|
||||
|
||||
// The function column
|
||||
// -------------------
|
||||
@ -2899,7 +2899,7 @@ function PMA_getHtmlForInsertEditFormColumn($table_columns, $column_number,
|
||||
'where_clause' => $where_clause
|
||||
);
|
||||
$transformation_options['wrapper_link']
|
||||
= URL::getCommon($_url_params);
|
||||
= Url::getCommon($_url_params);
|
||||
$current_value = '';
|
||||
if (isset($current_row[$column['Field']])) {
|
||||
$current_value = $current_row[$column['Field']];
|
||||
|
||||
@ -105,7 +105,7 @@ if (! empty($submit_mult)
|
||||
);
|
||||
exit;
|
||||
case 'show_create':
|
||||
$show_create = PMA\libraries\Template::get(
|
||||
$show_create = PhpMyAdmin\Template::get(
|
||||
'database/structure/show_create'
|
||||
)
|
||||
->render(
|
||||
@ -174,7 +174,7 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
} else {
|
||||
include_once './libraries/server_common.inc.php';
|
||||
@ -224,7 +224,7 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
// Gets table primary key
|
||||
$GLOBALS['dbi']->selectDb($db);
|
||||
$result = $GLOBALS['dbi']->query(
|
||||
'SHOW KEYS FROM ' . PMA\libraries\Util::backquote($table) . ';'
|
||||
'SHOW KEYS FROM ' . PhpMyAdmin\Util::backquote($table) . ';'
|
||||
);
|
||||
$primary = '';
|
||||
while ($row = $GLOBALS['dbi']->fetchAssoc($result)) {
|
||||
@ -240,7 +240,7 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
|| $query_type == 'empty_tbl'
|
||||
|| $query_type == 'row_delete'
|
||||
) {
|
||||
$default_fk_check_value = PMA\libraries\Util::handleDisableFKCheckInit();
|
||||
$default_fk_check_value = PhpMyAdmin\Util::handleDisableFKCheckInit();
|
||||
}
|
||||
|
||||
list(
|
||||
@ -304,7 +304,7 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
|| $query_type == 'empty_tbl'
|
||||
|| $query_type == 'row_delete'
|
||||
) {
|
||||
PMA\libraries\Util::handleDisableFKCheckCleanup($default_fk_check_value);
|
||||
PhpMyAdmin\Util::handleDisableFKCheckCleanup($default_fk_check_value);
|
||||
}
|
||||
if ($rebuild_database_list) {
|
||||
// avoid a problem with the database list navigator
|
||||
|
||||
@ -9,9 +9,9 @@
|
||||
*/
|
||||
|
||||
use PhpMyAdmin\Sql;
|
||||
use PMA\libraries\Table;
|
||||
use PMA\libraries\Transformations;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Table;
|
||||
use PhpMyAdmin\Transformations;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* Gets url params
|
||||
@ -47,7 +47,7 @@ function PMA_getUrlParams(
|
||||
foreach ($selected as $sval) {
|
||||
if ($what == 'row_delete') {
|
||||
$_url_params['selected'][] = 'DELETE FROM '
|
||||
. PMA\libraries\Util::backquote($table)
|
||||
. PhpMyAdmin\Util::backquote($table)
|
||||
. ' WHERE ' . $sval . ' LIMIT 1;';
|
||||
} else {
|
||||
$_url_params['selected'][] = $sval;
|
||||
@ -116,7 +116,7 @@ function PMA_buildOrExecuteQueryForMulti(
|
||||
case 'drop_db':
|
||||
PMA_relationsCleanupDatabase($selected[$i]);
|
||||
$a_query = 'DROP DATABASE '
|
||||
. PMA\libraries\Util::backquote($selected[$i]);
|
||||
. PhpMyAdmin\Util::backquote($selected[$i]);
|
||||
$reload = 1;
|
||||
$run_parts = true;
|
||||
$rebuild_database_list = true;
|
||||
@ -127,104 +127,104 @@ function PMA_buildOrExecuteQueryForMulti(
|
||||
$current = $selected[$i];
|
||||
if (!empty($views) && in_array($current, $views)) {
|
||||
$sql_query_views .= (empty($sql_query_views) ? 'DROP VIEW ' : ', ')
|
||||
. PMA\libraries\Util::backquote($current);
|
||||
. PhpMyAdmin\Util::backquote($current);
|
||||
} else {
|
||||
$sql_query .= (empty($sql_query) ? 'DROP TABLE ' : ', ')
|
||||
. PMA\libraries\Util::backquote($current);
|
||||
. PhpMyAdmin\Util::backquote($current);
|
||||
}
|
||||
$reload = 1;
|
||||
break;
|
||||
|
||||
case 'check_tbl':
|
||||
$sql_query .= (empty($sql_query) ? 'CHECK TABLE ' : ', ')
|
||||
. PMA\libraries\Util::backquote($selected[$i]);
|
||||
. PhpMyAdmin\Util::backquote($selected[$i]);
|
||||
$execute_query_later = true;
|
||||
break;
|
||||
|
||||
case 'optimize_tbl':
|
||||
$sql_query .= (empty($sql_query) ? 'OPTIMIZE TABLE ' : ', ')
|
||||
. PMA\libraries\Util::backquote($selected[$i]);
|
||||
. PhpMyAdmin\Util::backquote($selected[$i]);
|
||||
$execute_query_later = true;
|
||||
break;
|
||||
|
||||
case 'analyze_tbl':
|
||||
$sql_query .= (empty($sql_query) ? 'ANALYZE TABLE ' : ', ')
|
||||
. PMA\libraries\Util::backquote($selected[$i]);
|
||||
. PhpMyAdmin\Util::backquote($selected[$i]);
|
||||
$execute_query_later = true;
|
||||
break;
|
||||
|
||||
case 'checksum_tbl':
|
||||
$sql_query .= (empty($sql_query) ? 'CHECKSUM TABLE ' : ', ')
|
||||
. PMA\libraries\Util::backquote($selected[$i]);
|
||||
. PhpMyAdmin\Util::backquote($selected[$i]);
|
||||
$execute_query_later = true;
|
||||
break;
|
||||
|
||||
case 'repair_tbl':
|
||||
$sql_query .= (empty($sql_query) ? 'REPAIR TABLE ' : ', ')
|
||||
. PMA\libraries\Util::backquote($selected[$i]);
|
||||
. PhpMyAdmin\Util::backquote($selected[$i]);
|
||||
$execute_query_later = true;
|
||||
break;
|
||||
|
||||
case 'empty_tbl':
|
||||
$deletes = true;
|
||||
$a_query = 'TRUNCATE ';
|
||||
$a_query .= PMA\libraries\Util::backquote($selected[$i]);
|
||||
$a_query .= PhpMyAdmin\Util::backquote($selected[$i]);
|
||||
$run_parts = true;
|
||||
break;
|
||||
|
||||
case 'drop_fld':
|
||||
PMA_relationsCleanupColumn($db, $table, $selected[$i]);
|
||||
$sql_query .= (empty($sql_query)
|
||||
? 'ALTER TABLE ' . PMA\libraries\Util::backquote($table)
|
||||
? 'ALTER TABLE ' . PhpMyAdmin\Util::backquote($table)
|
||||
: ',')
|
||||
. ' DROP ' . PMA\libraries\Util::backquote($selected[$i])
|
||||
. ' DROP ' . PhpMyAdmin\Util::backquote($selected[$i])
|
||||
. (($i == $selected_cnt-1) ? ';' : '');
|
||||
break;
|
||||
|
||||
case 'primary_fld':
|
||||
$sql_query .= (empty($sql_query)
|
||||
? 'ALTER TABLE ' . PMA\libraries\Util::backquote($table)
|
||||
? 'ALTER TABLE ' . PhpMyAdmin\Util::backquote($table)
|
||||
. (empty($primary)
|
||||
? ''
|
||||
: ' DROP PRIMARY KEY,') . ' ADD PRIMARY KEY( '
|
||||
: ', ')
|
||||
. PMA\libraries\Util::backquote($selected[$i])
|
||||
. PhpMyAdmin\Util::backquote($selected[$i])
|
||||
. (($i == $selected_cnt-1) ? ');' : '');
|
||||
break;
|
||||
|
||||
case 'index_fld':
|
||||
$sql_query .= (empty($sql_query)
|
||||
? 'ALTER TABLE ' . PMA\libraries\Util::backquote($table)
|
||||
? 'ALTER TABLE ' . PhpMyAdmin\Util::backquote($table)
|
||||
. ' ADD INDEX( '
|
||||
: ', ')
|
||||
. PMA\libraries\Util::backquote($selected[$i])
|
||||
. PhpMyAdmin\Util::backquote($selected[$i])
|
||||
. (($i == $selected_cnt-1) ? ');' : '');
|
||||
break;
|
||||
|
||||
case 'unique_fld':
|
||||
$sql_query .= (empty($sql_query)
|
||||
? 'ALTER TABLE ' . PMA\libraries\Util::backquote($table)
|
||||
? 'ALTER TABLE ' . PhpMyAdmin\Util::backquote($table)
|
||||
. ' ADD UNIQUE( '
|
||||
: ', ')
|
||||
. PMA\libraries\Util::backquote($selected[$i])
|
||||
. PhpMyAdmin\Util::backquote($selected[$i])
|
||||
. (($i == $selected_cnt-1) ? ');' : '');
|
||||
break;
|
||||
|
||||
case 'spatial_fld':
|
||||
$sql_query .= (empty($sql_query)
|
||||
? 'ALTER TABLE ' . PMA\libraries\Util::backquote($table)
|
||||
? 'ALTER TABLE ' . PhpMyAdmin\Util::backquote($table)
|
||||
. ' ADD SPATIAL( '
|
||||
: ', ')
|
||||
. PMA\libraries\Util::backquote($selected[$i])
|
||||
. PhpMyAdmin\Util::backquote($selected[$i])
|
||||
. (($i == $selected_cnt-1) ? ');' : '');
|
||||
break;
|
||||
|
||||
case 'fulltext_fld':
|
||||
$sql_query .= (empty($sql_query)
|
||||
? 'ALTER TABLE ' . PMA\libraries\Util::backquote($table)
|
||||
? 'ALTER TABLE ' . PhpMyAdmin\Util::backquote($table)
|
||||
. ' ADD FULLTEXT( '
|
||||
: ', ')
|
||||
. PMA\libraries\Util::backquote($selected[$i])
|
||||
. PhpMyAdmin\Util::backquote($selected[$i])
|
||||
. (($i == $selected_cnt-1) ? ');' : '');
|
||||
break;
|
||||
|
||||
@ -232,9 +232,9 @@ function PMA_buildOrExecuteQueryForMulti(
|
||||
$newtablename = $_POST['add_prefix'] . $selected[$i];
|
||||
// ADD PREFIX TO TABLE NAME
|
||||
$a_query = 'ALTER TABLE '
|
||||
. PMA\libraries\Util::backquote($selected[$i])
|
||||
. PhpMyAdmin\Util::backquote($selected[$i])
|
||||
. ' RENAME '
|
||||
. PMA\libraries\Util::backquote($newtablename);
|
||||
. PhpMyAdmin\Util::backquote($newtablename);
|
||||
$run_parts = true;
|
||||
break;
|
||||
|
||||
@ -256,9 +256,9 @@ function PMA_buildOrExecuteQueryForMulti(
|
||||
}
|
||||
// CHANGE PREFIX PATTERN
|
||||
$a_query = 'ALTER TABLE '
|
||||
. PMA\libraries\Util::backquote($selected[$i])
|
||||
. PhpMyAdmin\Util::backquote($selected[$i])
|
||||
. ' RENAME '
|
||||
. PMA\libraries\Util::backquote($newtablename);
|
||||
. PhpMyAdmin\Util::backquote($newtablename);
|
||||
$run_parts = true;
|
||||
break;
|
||||
|
||||
@ -330,7 +330,7 @@ function PMA_buildOrExecuteQueryForMulti(
|
||||
function PMA_getHtmlForCopyMultipleTables($action, $_url_params)
|
||||
{
|
||||
$html = '<form id="ajax_form" action="' . $action . '" method="post">';
|
||||
$html .= 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)
|
||||
@ -375,7 +375,7 @@ function PMA_getHtmlForCopyMultipleTables($action, $_url_params)
|
||||
function PMA_getHtmlForReplacePrefixTable($action, $_url_params)
|
||||
{
|
||||
$html = '<form id="ajax_form" action="' . $action . '" method="post">';
|
||||
$html .= URL::getHiddenInputs($_url_params);
|
||||
$html .= Url::getHiddenInputs($_url_params);
|
||||
$html .= '<fieldset class = "input">';
|
||||
$html .= '<table>';
|
||||
$html .= '<tr>';
|
||||
@ -409,7 +409,7 @@ function PMA_getHtmlForReplacePrefixTable($action, $_url_params)
|
||||
function PMA_getHtmlForAddPrefixTable($action, $_url_params)
|
||||
{
|
||||
$html = '<form id="ajax_form" action="' . $action . '" method="post">';
|
||||
$html .= URL::getHiddenInputs($_url_params);
|
||||
$html .= Url::getHiddenInputs($_url_params);
|
||||
$html .= '<fieldset class = "input">';
|
||||
$html .= '<table>';
|
||||
$html .= '<tr>';
|
||||
@ -440,7 +440,7 @@ function PMA_getHtmlForAddPrefixTable($action, $_url_params)
|
||||
function PMA_getHtmlForOtherActions($what, $action, $_url_params, $full_query)
|
||||
{
|
||||
$html = '<form action="' . $action . '" method="post">';
|
||||
$html .= URL::getHiddenInputs($_url_params);
|
||||
$html .= Url::getHiddenInputs($_url_params);
|
||||
$html .= '<fieldset class="confirmation">';
|
||||
$html .= '<legend>';
|
||||
if ($what == 'drop_db') {
|
||||
@ -458,7 +458,7 @@ function PMA_getHtmlForOtherActions($what, $action, $_url_params, $full_query)
|
||||
// Display option to disable foreign key checks while dropping tables
|
||||
if ($what === 'drop_tbl' || $what === 'empty_tbl' || $what === 'row_delete') {
|
||||
$html .= '<div id="foreignkeychk">';
|
||||
$html .= PMA\libraries\Util::getFKCheckbox();
|
||||
$html .= PhpMyAdmin\Util::getFKCheckbox();
|
||||
$html .= '</div>';
|
||||
}
|
||||
$html .= '<input id="buttonYes" type="submit" name="mult_btn" value="'
|
||||
@ -497,7 +497,7 @@ function PMA_getQueryFromSelected($what, $table, $selected, $views)
|
||||
switch ($what) {
|
||||
case 'row_delete':
|
||||
$full_query .= 'DELETE FROM '
|
||||
. PMA\libraries\Util::backquote(htmlspecialchars($table))
|
||||
. PhpMyAdmin\Util::backquote(htmlspecialchars($table))
|
||||
// Do not append a "LIMIT 1" clause here
|
||||
// (it's not binlog friendly).
|
||||
// We don't need the clause because the calling panel permits
|
||||
@ -507,7 +507,7 @@ function PMA_getQueryFromSelected($what, $table, $selected, $views)
|
||||
break;
|
||||
case 'drop_db':
|
||||
$full_query .= 'DROP DATABASE '
|
||||
. PMA\libraries\Util::backquote(htmlspecialchars($sval))
|
||||
. PhpMyAdmin\Util::backquote(htmlspecialchars($sval))
|
||||
. ';<br />';
|
||||
$reload = true;
|
||||
break;
|
||||
@ -516,31 +516,31 @@ function PMA_getQueryFromSelected($what, $table, $selected, $views)
|
||||
$current = $sval;
|
||||
if (!empty($views) && in_array($current, $views)) {
|
||||
$full_query_views .= (empty($full_query_views) ? 'DROP VIEW ' : ', ')
|
||||
. PMA\libraries\Util::backquote(htmlspecialchars($current));
|
||||
. PhpMyAdmin\Util::backquote(htmlspecialchars($current));
|
||||
} else {
|
||||
$full_query .= (empty($full_query) ? 'DROP TABLE ' : ', ')
|
||||
. PMA\libraries\Util::backquote(htmlspecialchars($current));
|
||||
. PhpMyAdmin\Util::backquote(htmlspecialchars($current));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'empty_tbl':
|
||||
$full_query .= 'TRUNCATE ';
|
||||
$full_query .= PMA\libraries\Util::backquote(htmlspecialchars($sval))
|
||||
$full_query .= PhpMyAdmin\Util::backquote(htmlspecialchars($sval))
|
||||
. ';<br />';
|
||||
break;
|
||||
|
||||
case 'primary_fld':
|
||||
if ($full_query == '') {
|
||||
$full_query .= 'ALTER TABLE '
|
||||
. PMA\libraries\Util::backquote(htmlspecialchars($table))
|
||||
. PhpMyAdmin\Util::backquote(htmlspecialchars($table))
|
||||
. '<br /> DROP PRIMARY KEY,'
|
||||
. '<br /> ADD PRIMARY KEY('
|
||||
. '<br /> '
|
||||
. PMA\libraries\Util::backquote(htmlspecialchars($sval))
|
||||
. PhpMyAdmin\Util::backquote(htmlspecialchars($sval))
|
||||
. ',';
|
||||
} else {
|
||||
$full_query .= '<br /> '
|
||||
. PMA\libraries\Util::backquote(htmlspecialchars($sval))
|
||||
. PhpMyAdmin\Util::backquote(htmlspecialchars($sval))
|
||||
. ',';
|
||||
}
|
||||
if ($i == $selected_cnt-1) {
|
||||
@ -551,10 +551,10 @@ function PMA_getQueryFromSelected($what, $table, $selected, $views)
|
||||
case 'drop_fld':
|
||||
if ($full_query == '') {
|
||||
$full_query .= 'ALTER TABLE '
|
||||
. PMA\libraries\Util::backquote(htmlspecialchars($table));
|
||||
. PhpMyAdmin\Util::backquote(htmlspecialchars($table));
|
||||
}
|
||||
$full_query .= '<br /> DROP '
|
||||
. PMA\libraries\Util::backquote(htmlspecialchars($sval))
|
||||
. PhpMyAdmin\Util::backquote(htmlspecialchars($sval))
|
||||
. ',';
|
||||
if ($i == $selected_cnt - 1) {
|
||||
$full_query = preg_replace('@,$@', ';<br />', $full_query);
|
||||
|
||||
@ -11,8 +11,8 @@ namespace PMA\libraries\navigation;
|
||||
use PMA\libraries\config\PageSettings;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Response;
|
||||
use PMA\libraries\Util;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
/**
|
||||
* The navigation panel - displays server, db and table selection tree
|
||||
@ -165,7 +165,7 @@ class Navigation
|
||||
{
|
||||
$html = '<form method="post" action="navigation.php" class="ajax">';
|
||||
$html .= '<fieldset>';
|
||||
$html .= URL::getHiddenInputs($dbName, $tableName);
|
||||
$html .= Url::getHiddenInputs($dbName, $tableName);
|
||||
|
||||
$navTable = Util::backquote($GLOBALS['cfgRelation']['db'])
|
||||
. "." . Util::backquote($GLOBALS['cfgRelation']['navigationhiding']);
|
||||
@ -217,7 +217,7 @@ class Navigation
|
||||
$html .= '<tr>';
|
||||
$html .= '<td>' . htmlspecialchars($hiddenItem) . '</td>';
|
||||
$html .= '<td style="width:80px"><a href="navigation.php'
|
||||
. URL::getCommon($params) . '"'
|
||||
. Url::getCommon($params) . '"'
|
||||
. ' class="unhideNavItem ajax">'
|
||||
. Util::getIcon('show.png', __('Show'))
|
||||
. '</a></td>';
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
*/
|
||||
namespace PMA\libraries\navigation;
|
||||
|
||||
use PMA;
|
||||
use PMA\libraries\Template;
|
||||
use PMA\libraries\URL;
|
||||
use PhpMyAdmin\Sanitize;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* This class renders the logo, links, server selection,
|
||||
@ -28,9 +28,9 @@ class NavigationHeader
|
||||
public function getDisplay()
|
||||
{
|
||||
if (empty($GLOBALS['url_query'])) {
|
||||
$GLOBALS['url_query'] = URL::getCommon();
|
||||
$GLOBALS['url_query'] = Url::getCommon();
|
||||
}
|
||||
$link_url = URL::getCommon(
|
||||
$link_url = Url::getCommon(
|
||||
array(
|
||||
'ajax_request' => true,
|
||||
)
|
||||
@ -55,7 +55,7 @@ class NavigationHeader
|
||||
$buffer .= $this->_logo();
|
||||
$buffer .= $this->_links();
|
||||
$buffer .= $this->_serverChoice();
|
||||
$buffer .= PMA\libraries\Util::getImage(
|
||||
$buffer .= Util::getImage(
|
||||
'ajax_clock_small.gif',
|
||||
__('Loading…'),
|
||||
array(
|
||||
@ -124,7 +124,7 @@ class NavigationHeader
|
||||
PHP_URL_HOST
|
||||
);
|
||||
if (empty($host)) {
|
||||
$logoLink .= URL::getCommon();
|
||||
$logoLink .= Url::getCommon();
|
||||
} else {
|
||||
$linkAttriks = 'target="_blank" rel="noopener noreferrer"';
|
||||
}
|
||||
@ -156,8 +156,8 @@ class NavigationHeader
|
||||
|
||||
$retval = '<!-- LINKS START -->';
|
||||
$retval .= '<div id="navipanellinks">';
|
||||
$retval .= PMA\libraries\Util::getNavigationLink(
|
||||
'index.php' . URL::getCommon(),
|
||||
$retval .= Util::getNavigationLink(
|
||||
'index.php' . Url::getCommon(),
|
||||
$showText,
|
||||
__('Home'),
|
||||
$showIcon,
|
||||
@ -172,7 +172,7 @@ class NavigationHeader
|
||||
$text = __('Empty session data');
|
||||
}
|
||||
$link = 'logout.php' . $GLOBALS['url_query'];
|
||||
$retval .= PMA\libraries\Util::getNavigationLink(
|
||||
$retval .= Util::getNavigationLink(
|
||||
$link,
|
||||
$showText,
|
||||
$text,
|
||||
@ -184,8 +184,8 @@ class NavigationHeader
|
||||
array('logout')
|
||||
);
|
||||
}
|
||||
$retval .= PMA\libraries\Util::getNavigationLink(
|
||||
PMA\libraries\Util::getDocuLink('index'),
|
||||
$retval .= Util::getNavigationLink(
|
||||
Util::getDocuLink('index'),
|
||||
$showText,
|
||||
__('phpMyAdmin documentation'),
|
||||
$showIcon,
|
||||
@ -194,8 +194,8 @@ class NavigationHeader
|
||||
false,
|
||||
'documentation'
|
||||
);
|
||||
$retval .= PMA\libraries\Util::getNavigationLink(
|
||||
PMA\libraries\Util::getMySQLDocuURL('', ''),
|
||||
$retval .= Util::getNavigationLink(
|
||||
Util::getMySQLDocuURL('', ''),
|
||||
$showText,
|
||||
__('Documentation'),
|
||||
$showIcon,
|
||||
@ -204,7 +204,7 @@ class NavigationHeader
|
||||
false,
|
||||
'mysql_doc'
|
||||
);
|
||||
$retval .= PMA\libraries\Util::getNavigationLink(
|
||||
$retval .= Util::getNavigationLink(
|
||||
'#',
|
||||
$showText,
|
||||
__('Navigation panel settings'),
|
||||
@ -215,7 +215,7 @@ class NavigationHeader
|
||||
'',
|
||||
defined('PMA_DISABLE_NAVI_SETTINGS') ? array('hide') : array()
|
||||
);
|
||||
$retval .= PMA\libraries\Util::getNavigationLink(
|
||||
$retval .= Util::getNavigationLink(
|
||||
'#',
|
||||
$showText,
|
||||
__('Reload navigation panel'),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user