diff --git a/ajax.php b/ajax.php index db2a310034..ab60b71260 100644 --- a/ajax.php +++ b/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(); diff --git a/browse_foreigners.php b/browse_foreigners.php index fee84276a2..daba389733 100644 --- a/browse_foreigners.php +++ b/browse_foreigners.php @@ -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(); diff --git a/db_central_columns.php b/db_central_columns.php index 19feb92033..ecb85ad310 100644 --- a/db_central_columns.php +++ b/db_central_columns.php @@ -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 = '
' - . URL::getHiddenInputs( + . Url::getHiddenInputs( $db ) . '' diff --git a/db_datadict.php b/db_datadict.php index 3ca83dbb1c..5cd979e86c 100644 --- a/db_datadict.php +++ b/db_datadict.php @@ -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 ''; echo '' , $type , ''; @@ -210,4 +210,4 @@ foreach ($tables as $table) { /** * Displays the footer */ -echo PMA\libraries\Util::getButton(); +echo PhpMyAdmin\Util::getButton(); diff --git a/db_designer.php b/db_designer.php index 17b7c92690..f95777c57b 100644 --- a/db_designer.php +++ b/db_designer.php @@ -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. diff --git a/db_export.php b/db_export.php index ad5cf43f35..ee496b81be 100644 --- a/db_export.php +++ b/db_export.php @@ -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 diff --git a/db_import.php b/db_import.php index f9c1cf94d7..59dc5f2532 100644 --- a/db_import.php +++ b/db_import.php @@ -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(); diff --git a/db_operations.php b/db_operations.php index 657827ffd8..a65d798aba 100644 --- a/db_operations.php +++ b/db_operations.php @@ -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( diff --git a/db_qbe.php b/db_qbe.php index b31f84ff93..a2b1e4a314 100644 --- a/db_qbe.php +++ b/db_qbe.php @@ -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) diff --git a/db_search.php b/db_search.php index d8ce462f81..01cc70e718 100644 --- a/db_search.php +++ b/db_search.php @@ -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 diff --git a/db_structure.php b/db_structure.php index ce406f8358..6c4147ff3f 100644 --- a/db_structure.php +++ b/db_structure.php @@ -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'; diff --git a/db_tracking.php b/db_tracking.php index 1b7d9bbc5b..9facdd6e91 100644 --- a/db_tracking.php +++ b/db_tracking.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); } diff --git a/export.php b/export.php index 60c91fcac2..1775abf6f3 100644 --- a/export.php +++ b/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 ) diff --git a/gis_data_editor.php b/gis_data_editor.php index 09a9a09eb3..f1d93d1e8b 100644 --- a/gis_data_editor.php +++ b/gis_data_editor.php @@ -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 ''; } -echo URL::getHiddenInputs(); +echo Url::getHiddenInputs(); echo ''; echo '
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); diff --git a/index.php b/index.php index 1759ec0ec0..1dc5932d6f 100644 --- a/index.php +++ b/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 '
  • '; 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 '
  • '; } @@ -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 '
  • '; echo ' ' , "\n" - . URL::getHiddenInputs(null, null, 4, 'collation_connection') + . Url::getHiddenInputs(null, null, 4, 'collation_connection') . ' ' . "\n" @@ -249,7 +249,7 @@ $language_manager = LanguageManager::getInstance(); if (empty($cfg['Lang']) && $language_manager->hasChoice()) { echo '
  • '; - echo PMA\libraries\Util::getImage('s_lang.png') , " " + echo PhpMyAdmin\Util::getImage('s_lang.png') , " " , $language_manager->getSelectorDisplay(); echo '
  • '; } @@ -258,7 +258,7 @@ if (empty($cfg['Lang']) && $language_manager->hasChoice()) { if ($GLOBALS['cfg']['ThemeManager']) { echo '
  • '; - echo PMA\libraries\Util::getImage('s_theme.png') , " " + echo PhpMyAdmin\Util::getImage('s_theme.png') , " " , ThemeManager::getInstance()->getHtmlSelectBox(); echo '
  • '; } @@ -273,7 +273,7 @@ echo ''; if ($server > 0) { echo '
      '; 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, diff --git a/js/functions.js b/js/functions.js index 16a7ad2a60..b00813499e 100644 --- a/js/functions.js +++ b/js/functions.js @@ -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')) { diff --git a/js/messages.php b/js/messages.php index aecf237699..ca3f967d3d 100644 --- a/js/messages.php +++ b/js/messages.php @@ -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. diff --git a/libraries/browse_foreigners.lib.php b/libraries/browse_foreigners.lib.php index 548713bee9..cc24abdced 100644 --- a/libraries/browse_foreigners.lib.php +++ b/libraries/browse_foreigners.lib.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">' . '
      ' - . URL::getHiddenInputs($db, $table) + . Url::getHiddenInputs($db, $table) . '' . '' - . URL::getHiddenInputs( + . Url::getHiddenInputs( $db ) . '' @@ -630,7 +630,7 @@ function PMA_getHTMLforTableNavigation($total_rows, $pos, $db) $table_navigation_html .= ''; $table_navigation_html .= '' - . URL::getHiddenInputs( + . Url::getHiddenInputs( $db ) . ''; @@ -643,7 +643,7 @@ function PMA_getHTMLforTableNavigation($total_rows, $pos, $db) if ($pos + $max_rows < $total_rows) { $table_navigation_html .= '' . '' - . URL::getHiddenInputs( + . Url::getHiddenInputs( $db ) . '' @@ -803,7 +803,7 @@ function PMA_getHTMLforAddCentralColumn($total_rows, $pos, $db) __('Add column') ) . '' - . URL::getHiddenInputs( + . Url::getHiddenInputs( $db ) . '' @@ -834,7 +834,7 @@ function PMA_getHTMLforAddCentralColumn($total_rows, $pos, $db) function PMA_getHTMLforCentralColumnsTableRow($row, $row_num, $db) { $tableHtml = '' - . URL::getHiddenInputs( + . Url::getHiddenInputs( $db ) . '' @@ -858,7 +858,7 @@ function PMA_getHTMLforCentralColumnsTableRow($row, $row_num, $db) . '' . 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 .= '' . htmlspecialchars($row['col_type']) . '' - . 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) '' . '' . ($row['col_length']?htmlspecialchars($row['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, @@ -919,7 +919,7 @@ function PMA_getHTMLforCentralColumnsTableRow($row, $row_num, $db) '' . (isset($row['col_default']) ? htmlspecialchars($row['col_default']) : 'None') . '' - . 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']) : "" ) . '' - . 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) '' . '' . ($row['col_isNull'] ? __('Yes') : __('No')) . '' - . 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 .= '' . htmlspecialchars($row['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, @@ -1006,7 +1006,7 @@ function PMA_getHTMLforCentralColumnsEditTableRow($row, $row_num) . '' . '' - . 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) . ''; $tableHtml .= '' - . 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) . ''; $tableHtml .= '' - . 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 .= '' - . 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) . ''; $tableHtml .= '' - . 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) . ''; $tableHtml .= '' - . 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 .= '' - . 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) . '' - . URL::getHiddenInputs( + . Url::getHiddenInputs( $db ) . '' @@ -1272,7 +1272,7 @@ function PMA_getHTMLforAddNewColumn($db, $total_rows) $addNewColumn .= '' . '' . '' - . 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) ) . '' . '' - . 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) ) . '' . '' - . 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) ) . '' . '' - . 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) ) . '' . '' - . 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) ) . '' . '' - . 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) ) . '' . '' - . PMA\libraries\Template::get('columns_definitions/column_extra')->render( + . PhpMyAdmin\Template::get('columns_definitions/column_extra')->render( array( 'column_number' => 0, 'ci' => 7, diff --git a/libraries/check_user_privileges.lib.php b/libraries/check_user_privileges.lib.php index 127031b232..15847bdc78 100644 --- a/libraries/check_user_privileges.lib.php +++ b/libraries/check_user_privileges.lib.php @@ -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(); diff --git a/libraries/classes/Advisor.php b/libraries/classes/Advisor.php index 7ad674126b..80791aee0c 100644 --- a/libraries/classes/Advisor.php +++ b/libraries/classes/Advisor.php @@ -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', - '\1', $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 * diff --git a/libraries/classes/Bookmark.php b/libraries/classes/Bookmark.php index ccb1aac599..a4168d1a7e 100644 --- a/libraries/classes/Bookmark.php +++ b/libraries/classes/Bookmark.php @@ -8,7 +8,7 @@ namespace PhpMyAdmin; use PhpMyAdmin\DatabaseInterface; -use PMA\libraries\Util; +use PhpMyAdmin\Util; /** * Handles bookmarking SQL queries diff --git a/libraries/classes/Charsets.php b/libraries/classes/Charsets.php index b757ce6cae..0e16fbf880 100644 --- a/libraries/classes/Charsets.php +++ b/libraries/classes/Charsets.php @@ -7,7 +7,7 @@ */ namespace PhpMyAdmin; -use PMA\libraries\Util; +use PhpMyAdmin\Util; /** * Class used to manage MySQL charsets diff --git a/libraries/classes/Config.php b/libraries/classes/Config.php index 15514f8972..6d789aee5e 100644 --- a/libraries/classes/Config.php +++ b/libraries/classes/Config.php @@ -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 '' . "\n" - . URL::getHiddenInputs() . "\n" + . Url::getHiddenInputs() . "\n" . Config::getFontsizeSelection() . "\n" . ''; } diff --git a/libraries/classes/Console.php b/libraries/classes/Console.php index d7419a79b1..d33d968510 100644 --- a/libraries/classes/Console.php +++ b/libraries/classes/Console.php @@ -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; diff --git a/libraries/classes/Core.php b/libraries/classes/Core.php index 87c8c47f95..aa365ef0d1 100644 --- a/libraries/classes/Core.php +++ b/libraries/classes/Core.php @@ -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); diff --git a/libraries/classes/DatabaseInterface.php b/libraries/classes/DatabaseInterface.php index 3feaa45e68..44d95c8031 100644 --- a/libraries/classes/DatabaseInterface.php +++ b/libraries/classes/DatabaseInterface.php @@ -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 . ''; + $error .= $separator . ''; $error .= __('Logout and try as another user.') . ''; } elseif ($error_number == 1005) { if (strpos($error_message, 'errno: 13') !== false) { @@ -2062,7 +2062,7 @@ class DatabaseInterface */ $error .= ' - ' . $error_message . ' (' . __('Details…') . ')'; } diff --git a/libraries/classes/DbQbe.php b/libraries/classes/DbQbe.php index d1dc8e963e..3e6f4fa530 100644 --- a/libraries/classes/DbQbe.php +++ b/libraries/classes/DbQbe.php @@ -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 .= '
      '; // get footers $html_output .= $this->_getTableFooters(); @@ -1839,7 +1839,7 @@ class DbQbe $html_output .= $this->_getTablesList(); $html_output .= ''; $html_output .= '
      '; - $html_output .= URL::getHiddenInputs(array('db' => $this->_db)); + $html_output .= Url::getHiddenInputs(array('db' => $this->_db)); // get SQL query $html_output .= '
      '; $html_output .= '
      '; diff --git a/libraries/classes/DbSearch.php b/libraries/classes/DbSearch.php index 34546618f3..3b97ca771d 100644 --- a/libraries/classes/DbSearch.php +++ b/libraries/classes/DbSearch.php @@ -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 .= ''; - $html_output .= URL::getHiddenInputs($GLOBALS['db']); + $html_output .= Url::getHiddenInputs($GLOBALS['db']); $html_output .= '
      '; // set legend caption $html_output .= '' . __('Search in database') . ''; diff --git a/libraries/classes/DisplayResults.php b/libraries/classes/DisplayResults.php index e4d5a711b9..02952ac5d5 100644 --- a/libraries/classes/DisplayResults.php +++ b/libraries/classes/DisplayResults.php @@ -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 '' . '' - . URL::getHiddenInputs( + . Url::getHiddenInputs( $this->__get('db'), $this->__get('table') ) . ''; - $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" . '' . '' - . URL::getHiddenInputs( + . Url::getHiddenInputs( $this->__get('db'), $this->__get('table') ) . '' . '
      ' - . URL::getHiddenInputs( + . Url::getHiddenInputs( $this->__get('db'), $this->__get('table') ) . '
      '; @@ -1434,11 +1434,11 @@ class DisplayResults $drop_down_html .= '' . "\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') . ': '; @@ -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 = '
      ' . $result . ''; } @@ -5489,7 +5489,7 @@ class DisplayResults ); $result .= ''; if ($transformation_plugin != $default_function) { diff --git a/libraries/classes/ErrorHandler.php b/libraries/classes/ErrorHandler.php index 5507f07692..531802edad 100644 --- a/libraries/classes/ErrorHandler.php +++ b/libraries/classes/ErrorHandler.php @@ -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', )); diff --git a/libraries/classes/File.php b/libraries/classes/File.php index 80b9d9d152..b054d4ddcd 100644 --- a/libraries/classes/File.php +++ b/libraries/classes/File.php @@ -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; /** diff --git a/libraries/classes/Footer.php b/libraries/classes/Footer.php index 5077493223..6416dffa06 100644 --- a/libraries/classes/Footer.php +++ b/libraries/classes/Footer.php @@ -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); } /** diff --git a/libraries/classes/Header.php b/libraries/classes/Header.php index 4eab447e43..3f37183e8b 100644 --- a/libraries/classes/Header.php +++ b/libraries/classes/Header.php @@ -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' ), diff --git a/libraries/classes/Index.php b/libraries/classes/Index.php index c2d6d57170..2a4e7b3f1f 100644 --- a/libraries/classes/Index.php +++ b/libraries/classes/Index.php @@ -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 .= '