Skip to content

Commit

Permalink
Declare globals in some entry points
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 Aug 25, 2019
1 parent 2af3e19 commit aa452ef
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libraries/entry_points/server/export.php
Expand Up @@ -15,7 +15,7 @@
exit;
}

global $db, $table, $sql_query, $num_tables, $unlim_num_rows;
global $db, $table, $sql_query, $num_tables, $unlim_num_rows, $tmp_select, $select_item, $multi_values;

require_once ROOT_PATH . 'libraries/server_common.inc.php';

Expand Down
15 changes: 14 additions & 1 deletion libraries/entry_points/server/privileges.php
Expand Up @@ -23,7 +23,20 @@
exit;
}

global $containerBuilder, $db, $err_url, $message, $pmaThemeImage, $text_dir, $url_query;
global $containerBuilder, $db, $err_url, $message, $pmaThemeImage, $text_dir, $url_query, $post_patterns;
global $username, $hostname, $dbname, $tablename, $routinename, $db_and_table, $dbname_is_wildcard;
global $queries, $password, $ret_message, $ret_queries, $queries_for_display, $sql_query, $_add_user_error;
global $itemType, $tables, $num_tables, $total_num_tables, $sub_part, $is_show_stats, $db_is_system_schema;
global $tooltip_truename, $tooltip_aliasname, $pos, $title, $export, $grants, $one_grant, $url_dbname;
global $strPrivDescAllPrivileges, $strPrivDescAlter, $strPrivDescAlterRoutine, $strPrivDescCreateDb,
$strPrivDescCreateRoutine, $strPrivDescCreateTbl, $strPrivDescCreateTmpTable, $strPrivDescCreateUser,
$strPrivDescCreateView, $strPrivDescDelete, $strPrivDescDeleteHistoricalRows, $strPrivDescDropDb,
$strPrivDescDropTbl, $strPrivDescEvent, $strPrivDescExecute, $strPrivDescFile,
$strPrivDescGrantTbl, $strPrivDescIndex, $strPrivDescInsert, $strPrivDescLockTables,
$strPrivDescMaxConnections, $strPrivDescMaxQuestions, $strPrivDescMaxUpdates, $strPrivDescMaxUserConnections,
$strPrivDescProcess, $strPrivDescReferences, $strPrivDescReload, $strPrivDescReplClient,
$strPrivDescReplSlave, $strPrivDescSelect, $strPrivDescShowDb, $strPrivDescShowView,
$strPrivDescShutdown, $strPrivDescSuper, $strPrivDescTrigger, $strPrivDescUpdate, $strPrivDescUsage;

/** @var Response $response */
$response = $containerBuilder->get(Response::class);
Expand Down
2 changes: 1 addition & 1 deletion libraries/entry_points/table/addfield.php
Expand Up @@ -21,7 +21,7 @@
}

global $containerBuilder, $err_url, $message, $action, $active_page, $num_fields, $sql_query;
global $abort, $num_fields, $regenerate, $result;
global $abort, $num_fields, $regenerate, $result, $db, $table;

/** @var Response $response */
$response = $containerBuilder->get(Response::class);
Expand Down
2 changes: 1 addition & 1 deletion libraries/entry_points/table/create.php
Expand Up @@ -20,7 +20,7 @@
exit;
}

global $containerBuilder, $num_fields, $action, $sql_query, $result;
global $containerBuilder, $num_fields, $action, $sql_query, $result, $db, $table;

/** @var Response $response */
$response = $containerBuilder->get(Response::class);
Expand Down
4 changes: 2 additions & 2 deletions libraries/entry_points/table/export.php
Expand Up @@ -18,8 +18,8 @@
exit;
}

global $containerBuilder, $db, $url_query, $url_params, $table;
global $sql_query, $where_clause, $num_tables, $unlim_num_rows, $multi_values;
global $containerBuilder, $db, $url_query, $url_params, $table, $export_page_title, $replaces;
global $sql_query, $where_clause, $num_tables, $unlim_num_rows, $multi_values, $aliases;

/** @var Response $response */
$response = $containerBuilder->get(Response::class);
Expand Down

0 comments on commit aa452ef

Please sign in to comment.