Skip to content

Commit

Permalink
Rename $url_params global to $urlParams
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Mar 25, 2021
1 parent 91bd0df commit 44bdd1d
Show file tree
Hide file tree
Showing 35 changed files with 145 additions and 145 deletions.
4 changes: 2 additions & 2 deletions libraries/classes/Controllers/Database/ExportController.php
Expand Up @@ -38,7 +38,7 @@ public function __construct($response, Template $template, $db, Export $export,

public function index(): void
{
global $db, $table, $sub_part, $url_params, $sql_query;
global $db, $table, $sub_part, $urlParams, $sql_query;
global $tables, $num_tables, $total_num_tables, $tooltip_truename;
global $tooltip_aliasname, $pos, $table_select, $unlim_num_rows, $cfg, $errorUrl;

Expand All @@ -61,7 +61,7 @@ public function index(): void
return;
}

$url_params['goto'] = Url::getFromRoute('/database/export');
$urlParams['goto'] = Url::getFromRoute('/database/export');

[
$tables,
Expand Down
Expand Up @@ -70,7 +70,7 @@ public function __construct(
public function index(): void
{
global $cfg, $db, $server, $sql_query, $move, $message, $tables_full, $errorUrl;
global $export_sql_plugin, $views, $sqlConstratints, $local_query, $reload, $url_params, $tables;
global $export_sql_plugin, $views, $sqlConstratints, $local_query, $reload, $urlParams, $tables;
global $total_num_tables, $sub_part, $tooltip_truename;
global $db_collation, $tooltip_aliasname, $pos, $is_information_schema, $single_table, $num_tables;

Expand Down Expand Up @@ -279,7 +279,7 @@ public function index(): void
return;
}

$url_params['goto'] = Url::getFromRoute('/database/operations');
$urlParams['goto'] = Url::getFromRoute('/database/operations');

// Gets the database structure
$sub_part = '_structure';
Expand Down
Expand Up @@ -43,7 +43,7 @@ public function index(): void
{
global $db, $savedSearchList, $savedSearch, $currentSearchId;
global $sql_query, $goto, $sub_part, $tables, $num_tables, $total_num_tables;
global $tooltip_truename, $tooltip_aliasname, $pos, $url_params, $cfg, $errorUrl;
global $tooltip_truename, $tooltip_aliasname, $pos, $urlParams, $cfg, $errorUrl;

// Gets the relation settings
$cfgRelation = $this->relation->getRelationsParam();
Expand Down Expand Up @@ -146,7 +146,7 @@ public function index(): void
return;
}

$url_params['goto'] = Url::getFromRoute('/database/qbe');
$urlParams['goto'] = Url::getFromRoute('/database/qbe');

[
$tables,
Expand All @@ -161,7 +161,7 @@ public function index(): void
$databaseQbe = new Qbe($this->relation, $this->template, $this->dbi, $db, $savedSearchList, $savedSearch);

$this->render('database/qbe/index', [
'url_params' => $url_params,
'url_params' => $urlParams,
'has_message_to_display' => $hasMessageToDisplay,
'selection_form_html' => $databaseQbe->getSelectionForm(),
]);
Expand Down
6 changes: 3 additions & 3 deletions libraries/classes/Controllers/Database/RoutinesController.php
Expand Up @@ -44,7 +44,7 @@ public function index(): void
{
global $db, $table, $tables, $num_tables, $total_num_tables, $sub_part;
global $tooltip_truename, $tooltip_aliasname, $pos;
global $errors, $errorUrl, $url_params, $cfg;
global $errors, $errorUrl, $urlParams, $cfg;

$this->addScriptFiles(['database/routines.js']);

Expand All @@ -59,9 +59,9 @@ public function index(): void
if (! empty($table) && in_array($table, $this->dbi->getTables($db))) {
Util::checkParameters(['db', 'table']);

$url_params = ['db' => $db, 'table' => $table];
$urlParams = ['db' => $db, 'table' => $table];
$errorUrl = Util::getScriptNameForOption($cfg['DefaultTabTable'], 'table');
$errorUrl .= Url::getCommon($url_params, '&');
$errorUrl .= Url::getCommon($urlParams, '&');

DbTableExists::check();
} else {
Expand Down
4 changes: 2 additions & 2 deletions libraries/classes/Controllers/Database/SearchController.php
Expand Up @@ -30,7 +30,7 @@ public function __construct($response, Template $template, $db, $dbi)

public function index(): void
{
global $cfg, $db, $errorUrl, $url_params, $tables, $num_tables, $total_num_tables, $sub_part;
global $cfg, $db, $errorUrl, $urlParams, $tables, $num_tables, $total_num_tables, $sub_part;
global $tooltip_truename, $tooltip_aliasname, $pos;

$this->addScriptFiles([
Expand Down Expand Up @@ -59,7 +59,7 @@ public function index(): void
);
}

$url_params['goto'] = Url::getFromRoute('/database/search');
$urlParams['goto'] = Url::getFromRoute('/database/search');

// Create a database search instance
$databaseSearch = new Search($this->dbi, $db, $this->template);
Expand Down
10 changes: 5 additions & 5 deletions libraries/classes/Controllers/Database/TrackingController.php
Expand Up @@ -44,7 +44,7 @@ public function __construct($response, Template $template, $db, Tracking $tracki

public function index(): void
{
global $db, $text_dir, $url_params, $tables, $num_tables;
global $db, $text_dir, $urlParams, $tables, $num_tables;
global $total_num_tables, $sub_part, $pos, $data, $cfg;
global $tooltip_truename, $tooltip_aliasname, $errorUrl;

Expand All @@ -59,8 +59,8 @@ public function index(): void
return;
}

$url_params['goto'] = Url::getFromRoute('/table/tracking');
$url_params['back'] = Url::getFromRoute('/database/tracking');
$urlParams['goto'] = Url::getFromRoute('/table/tracking');
$urlParams['back'] = Url::getFromRoute('/database/tracking');

// Get the database structure
$sub_part = '_structure';
Expand Down Expand Up @@ -105,7 +105,7 @@ public function index(): void
} elseif ($_POST['submit_mult'] === 'track') {
echo $this->template->render('create_tracking_version', [
'route' => '/database/tracking',
'url_params' => $url_params,
'url_params' => $urlParams,
'last_version' => 0,
'db' => $db,
'selected' => $_POST['selected_tbl'],
Expand Down Expand Up @@ -141,7 +141,7 @@ public function index(): void

echo $this->tracking->getHtmlForDbTrackingTables(
$db,
$url_params,
$urlParams,
$text_dir
);

Expand Down
6 changes: 3 additions & 3 deletions libraries/classes/Controllers/Database/TriggersController.php
Expand Up @@ -38,7 +38,7 @@ public function index(): void
{
global $db, $table, $tables, $num_tables, $total_num_tables, $sub_part;
global $tooltip_truename, $tooltip_aliasname, $pos;
global $errors, $url_params, $errorUrl, $cfg;
global $errors, $urlParams, $errorUrl, $cfg;

$this->addScriptFiles(['database/triggers.js']);

Expand All @@ -49,9 +49,9 @@ public function index(): void
if (! empty($table) && in_array($table, $this->dbi->getTables($db))) {
Util::checkParameters(['db', 'table']);

$url_params = ['db' => $db, 'table' => $table];
$urlParams = ['db' => $db, 'table' => $table];
$errorUrl = Util::getScriptNameForOption($cfg['DefaultTabTable'], 'table');
$errorUrl .= Url::getCommon($url_params, '&');
$errorUrl .= Url::getCommon($urlParams, '&');

DbTableExists::check();
} else {
Expand Down
18 changes: 9 additions & 9 deletions libraries/classes/Controllers/ImportController.php
Expand Up @@ -70,7 +70,7 @@ public function __construct($response, Template $template, Import $import, Sql $
public function index(): void
{
global $cfg, $collation_connection, $db, $import_type, $table, $goto, $display_query;
global $format, $local_import_file, $ajax_reload, $import_text, $sql_query, $message, $errorUrl, $url_params;
global $format, $local_import_file, $ajax_reload, $import_text, $sql_query, $message, $errorUrl, $urlParams;
global $memory_limit, $read_limit, $finished, $offset, $charset_conversion, $charset_of_file;
global $timestamp, $maximum_time, $timeout_passed, $import_file, $go_sql, $sql_file, $error, $max_sql_len, $msg;
global $sql_query_disabled, $executed_queries, $run_query, $reset_charset, $bookmark_created;
Expand Down Expand Up @@ -310,14 +310,14 @@ public function index(): void
$format = Core::securePath($format);

if (strlen($table) > 0 && strlen($db) > 0) {
$url_params = [
$urlParams = [
'db' => $db,
'table' => $table,
];
} elseif (strlen($db) > 0) {
$url_params = ['db' => $db];
$urlParams = ['db' => $db];
} else {
$url_params = [];
$urlParams = [];
}

// Create error and goto url
Expand All @@ -337,7 +337,7 @@ public function index(): void
}
}

$errorUrl = $goto . Url::getCommon($url_params, '&');
$errorUrl = $goto . Url::getCommon($urlParams, '&');
$_SESSION['Import_message']['go_back_url'] = $errorUrl;

if (strlen($db) > 0) {
Expand Down Expand Up @@ -713,13 +713,13 @@ public function index(): void

// Did we hit timeout? Tell it user.
if ($timeout_passed) {
$url_params['timeout_passed'] = '1';
$url_params['offset'] = $offset;
$urlParams['timeout_passed'] = '1';
$urlParams['offset'] = $offset;
if (isset($local_import_file)) {
$url_params['local_import_file'] = $local_import_file;
$urlParams['local_import_file'] = $local_import_file;
}

$importUrl = $errorUrl = $goto . Url::getCommon($url_params, '&');
$importUrl = $errorUrl = $goto . Url::getCommon($urlParams, '&');

$message = Message::error(
__(
Expand Down
Expand Up @@ -41,7 +41,7 @@ public function __construct($response, Template $template, ReplicationGui $repli

public function index(): void
{
global $url_params, $errorUrl;
global $urlParams, $errorUrl;

$params = [
'url_params' => $_POST['url_params'] ?? null,
Expand All @@ -64,7 +64,7 @@ public function index(): void
$this->addScriptFiles(['server/privileges.js', 'replication.js', 'vendor/zxcvbn.js']);

if (isset($params['url_params']) && is_array($params['url_params'])) {
$url_params = $params['url_params'];
$urlParams = $params['url_params'];
}

if ($this->dbi->isSuperUser()) {
Expand Down Expand Up @@ -93,7 +93,7 @@ public function index(): void
}

$this->render('server/replication/index', [
'url_params' => $url_params,
'url_params' => $urlParams,
'is_super_user' => $this->dbi->isSuperUser(),
'error_messages' => $errorMessages,
'is_master' => $primaryInfo['status'],
Expand Down
16 changes: 8 additions & 8 deletions libraries/classes/Controllers/Table/ChangeController.php
Expand Up @@ -50,7 +50,7 @@ public function __construct(

public function index(): void
{
global $cfg, $is_upload, $db, $table, $text_dir, $disp_message, $url_params;
global $cfg, $is_upload, $db, $table, $text_dir, $disp_message, $urlParams;
global $errorUrl, $where_clause, $unsaved_values, $insert_mode, $where_clause_array, $where_clauses;
global $result, $rows, $found_unique_key, $after_insert, $comments_map, $table_columns;
global $chg_evt_handler, $timestamp_seen, $columns_cnt, $tabindex, $tabindex_for_function;
Expand Down Expand Up @@ -164,10 +164,10 @@ public function index(): void
$o_rows = 0;
$biggest_max_file_size = 0;

$url_params['db'] = $db;
$url_params['table'] = $table;
$url_params = $this->insertEdit->urlParamsInEditMode(
$url_params,
$urlParams['db'] = $db;
$urlParams['table'] = $table;
$urlParams = $this->insertEdit->urlParamsInEditMode(
$urlParams,
$where_clause_array
);

Expand Down Expand Up @@ -202,11 +202,11 @@ public function index(): void
}

if (! $cfg['ShowFunctionFields']) {
$html_output .= $this->insertEdit->showTypeOrFunction('function', $url_params, false);
$html_output .= $this->insertEdit->showTypeOrFunction('function', $urlParams, false);
}

if (! $cfg['ShowFieldTypesInDataEditView']) {
$html_output .= $this->insertEdit->showTypeOrFunction('type', $url_params, false);
$html_output .= $this->insertEdit->showTypeOrFunction('type', $urlParams, false);
}

$GLOBALS['plugin_scripts'] = [];
Expand All @@ -233,7 +233,7 @@ public function index(): void
}

$html_output .= $this->insertEdit->getHtmlForInsertEditRow(
$url_params,
$urlParams,
$table_columns,
$comments_map,
$timestamp_seen,
Expand Down
6 changes: 3 additions & 3 deletions libraries/classes/Controllers/Table/ChartController.php
Expand Up @@ -176,14 +176,14 @@ public function index(): void
*/
public function ajax(): void
{
global $db, $table, $sql_query, $url_params, $errorUrl, $cfg;
global $db, $table, $sql_query, $urlParams, $errorUrl, $cfg;

if (strlen($table) > 0 && strlen($db) > 0) {
Util::checkParameters(['db', 'table']);

$url_params = ['db' => $db, 'table' => $table];
$urlParams = ['db' => $db, 'table' => $table];
$errorUrl = Util::getScriptNameForOption($cfg['DefaultTabTable'], 'table');
$errorUrl .= Url::getCommon($url_params, '&');
$errorUrl .= Url::getCommon($urlParams, '&');

DbTableExists::check();
}
Expand Down
8 changes: 4 additions & 4 deletions libraries/classes/Controllers/Table/DeleteController.php
Expand Up @@ -84,7 +84,7 @@ public function rows(): void
$disp_query = $sql_query;
}

$_url_params = $GLOBALS['url_params'];
$_url_params = $GLOBALS['urlParams'];
$_url_params['goto'] = Url::getFromRoute('/table/sql');

if (isset($original_sql_query)) {
Expand Down Expand Up @@ -113,7 +113,7 @@ public function rows(): void

public function confirm(): void
{
global $db, $table, $sql_query, $url_params, $errorUrl, $cfg;
global $db, $table, $sql_query, $urlParams, $errorUrl, $cfg;

$selected = $_POST['rows_to_delete'] ?? null;

Expand All @@ -126,9 +126,9 @@ public function confirm(): void

Util::checkParameters(['db', 'table']);

$url_params = ['db' => $db, 'table' => $table];
$urlParams = ['db' => $db, 'table' => $table];
$errorUrl = Util::getScriptNameForOption($cfg['DefaultTabTable'], 'table');
$errorUrl .= Url::getCommon($url_params, '&');
$errorUrl .= Url::getCommon($urlParams, '&');

DbTableExists::check();

Expand Down
10 changes: 5 additions & 5 deletions libraries/classes/Controllers/Table/ExportController.php
Expand Up @@ -44,7 +44,7 @@ public function __construct(

public function index(): void
{
global $db, $url_params, $table, $replaces, $cfg, $errorUrl;
global $db, $urlParams, $table, $replaces, $cfg, $errorUrl;
global $sql_query, $where_clause, $num_tables, $unlim_num_rows;

$pageSettings = new PageSettings('Export');
Expand All @@ -55,12 +55,12 @@ public function index(): void

Util::checkParameters(['db', 'table']);

$url_params = ['db' => $db, 'table' => $table];
$urlParams = ['db' => $db, 'table' => $table];
$errorUrl = Util::getScriptNameForOption($cfg['DefaultTabTable'], 'table');
$errorUrl .= Url::getCommon($url_params, '&');
$errorUrl .= Url::getCommon($urlParams, '&');

$url_params['goto'] = Url::getFromRoute('/table/export');
$url_params['back'] = Url::getFromRoute('/table/export');
$urlParams['goto'] = Url::getFromRoute('/table/export');
$urlParams['back'] = Url::getFromRoute('/table/export');

$message = '';

Expand Down
6 changes: 3 additions & 3 deletions libraries/classes/Controllers/Table/FindReplaceController.php
Expand Up @@ -63,13 +63,13 @@ public function __construct($response, Template $template, $db, $table, $dbi)

public function index(): void
{
global $db, $table, $url_params, $cfg, $errorUrl;
global $db, $table, $urlParams, $cfg, $errorUrl;

Util::checkParameters(['db', 'table']);

$url_params = ['db' => $db, 'table' => $table];
$urlParams = ['db' => $db, 'table' => $table];
$errorUrl = Util::getScriptNameForOption($cfg['DefaultTabTable'], 'table');
$errorUrl .= Url::getCommon($url_params, '&');
$errorUrl .= Url::getCommon($urlParams, '&');

DbTableExists::check();

Expand Down

0 comments on commit 44bdd1d

Please sign in to comment.