Replace assignments with null coalesce equal operator
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
5cbb878dda
commit
613678f8f5
@ -65,7 +65,7 @@ class BrowseForeigners
|
||||
int $indexByDescription,
|
||||
string $currentValue
|
||||
): array {
|
||||
$GLOBALS['theme'] = $GLOBALS['theme'] ?? null;
|
||||
$GLOBALS['theme'] ??= null;
|
||||
|
||||
$horizontalCount++;
|
||||
$output = '';
|
||||
|
||||
@ -119,7 +119,7 @@ final class CacheWarmupCommand extends Command
|
||||
string $environment,
|
||||
bool $writeReplacements
|
||||
): int {
|
||||
$GLOBALS['config'] = $GLOBALS['config'] ?? null;
|
||||
$GLOBALS['config'] ??= null;
|
||||
|
||||
$output->writeln('Warming up the twig cache', OutputInterface::VERBOSITY_VERBOSE);
|
||||
$GLOBALS['config'] = new Config();
|
||||
|
||||
@ -89,10 +89,10 @@ final class Common
|
||||
*/
|
||||
public static function run(bool $isSetupPage = false): void
|
||||
{
|
||||
$GLOBALS['lang'] = $GLOBALS['lang'] ?? null;
|
||||
$GLOBALS['theme'] = $GLOBALS['theme'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['token_mismatch'] = $GLOBALS['token_mismatch'] ?? null;
|
||||
$GLOBALS['lang'] ??= null;
|
||||
$GLOBALS['theme'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['token_mismatch'] ??= null;
|
||||
|
||||
$request = self::getRequest();
|
||||
$route = $request->getRoute();
|
||||
@ -454,8 +454,8 @@ final class Common
|
||||
|
||||
private static function setGotoAndBackGlobals(ContainerInterface $container, Config $config): void
|
||||
{
|
||||
$GLOBALS['back'] = $GLOBALS['back'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['back'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
|
||||
// Holds page that should be displayed.
|
||||
$GLOBALS['goto'] = '';
|
||||
@ -535,7 +535,7 @@ final class Common
|
||||
|
||||
private static function setDatabaseAndTableFromRequest(ContainerInterface $container, ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
|
||||
$db = DatabaseName::tryFromValue($request->getParam('db'));
|
||||
$table = TableName::tryFromValue($request->getParam('table'));
|
||||
|
||||
@ -48,8 +48,8 @@ abstract class AbstractController
|
||||
|
||||
protected function hasDatabase(): bool
|
||||
{
|
||||
$GLOBALS['errno'] = $GLOBALS['errno'] ?? null;
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['errno'] ??= null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
|
||||
if (isset($GLOBALS['is_db']) && $GLOBALS['is_db']) {
|
||||
return true;
|
||||
|
||||
@ -35,8 +35,8 @@ class CentralColumnsController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['num_cols'] = $GLOBALS['num_cols'] ?? null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
$GLOBALS['num_cols'] ??= null;
|
||||
|
||||
if ($request->hasBodyParam('edit_save')) {
|
||||
echo $this->editSave([
|
||||
@ -156,7 +156,7 @@ class CentralColumnsController extends AbstractController
|
||||
*/
|
||||
public function main(array $params): void
|
||||
{
|
||||
$GLOBALS['text_dir'] = $GLOBALS['text_dir'] ?? null;
|
||||
$GLOBALS['text_dir'] ??= null;
|
||||
|
||||
if (! empty($params['total_rows']) && is_numeric($params['total_rows'])) {
|
||||
$totalRows = (int) $params['total_rows'];
|
||||
|
||||
@ -37,8 +37,8 @@ class DesignerController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$db = $request->getParsedBodyParam('db');
|
||||
$table = $request->getParsedBodyParam('table');
|
||||
|
||||
@ -34,9 +34,9 @@ final class EventsController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errors'] = $GLOBALS['errors'] ?? null;
|
||||
$GLOBALS['text_dir'] = $GLOBALS['text_dir'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errors'] ??= null;
|
||||
$GLOBALS['text_dir'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$this->addScriptFiles(['database/events.js']);
|
||||
|
||||
|
||||
@ -39,11 +39,11 @@ final class ExportController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['tables'] = $GLOBALS['tables'] ?? null;
|
||||
$GLOBALS['table_select'] = $GLOBALS['table_select'] ?? null;
|
||||
$GLOBALS['unlim_num_rows'] = $GLOBALS['unlim_num_rows'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['tables'] ??= null;
|
||||
$GLOBALS['table_select'] ??= null;
|
||||
$GLOBALS['unlim_num_rows'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$pageSettings = new PageSettings('Export');
|
||||
$pageSettingsErrorHtml = $pageSettings->getErrorHTML();
|
||||
|
||||
@ -36,8 +36,8 @@ final class ImportController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['SESSION_KEY'] = $GLOBALS['SESSION_KEY'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['SESSION_KEY'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$pageSettings = new PageSettings('Import');
|
||||
$pageSettingsErrorHtml = $pageSettings->getErrorHTML();
|
||||
|
||||
@ -35,7 +35,7 @@ final class CollationController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
if (! $this->response->isAjax()) {
|
||||
return;
|
||||
|
||||
@ -61,12 +61,12 @@ class OperationsController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['server'] = $GLOBALS['server'] ?? null;
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['reload'] = $GLOBALS['reload'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['single_table'] = $GLOBALS['single_table'] ?? null;
|
||||
$GLOBALS['server'] ??= null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['reload'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['single_table'] ??= null;
|
||||
|
||||
$this->checkUserPrivileges->getPrivileges();
|
||||
|
||||
|
||||
@ -42,12 +42,12 @@ class QueryByExampleController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['savedSearchList'] = $GLOBALS['savedSearchList'] ?? null;
|
||||
$GLOBALS['savedSearch'] = $GLOBALS['savedSearch'] ?? null;
|
||||
$GLOBALS['currentSearchId'] = $GLOBALS['currentSearchId'] ?? null;
|
||||
$GLOBALS['goto'] = $GLOBALS['goto'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['savedSearchList'] ??= null;
|
||||
$GLOBALS['savedSearch'] ??= null;
|
||||
$GLOBALS['currentSearchId'] ??= null;
|
||||
$GLOBALS['goto'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$savedQbeSearchesFeature = $this->relation->getRelationParameters()->savedQueryByExampleSearchesFeature;
|
||||
|
||||
|
||||
@ -44,9 +44,9 @@ class RoutinesController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errors'] = $GLOBALS['errors'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errors'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
|
||||
$this->addScriptFiles(['database/routines.js']);
|
||||
|
||||
|
||||
@ -29,8 +29,8 @@ class SearchController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
|
||||
$this->addScriptFiles(['database/search.js', 'sql.js', 'makegrid.js']);
|
||||
|
||||
|
||||
@ -30,9 +30,9 @@ class SqlController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['goto'] = $GLOBALS['goto'] ?? null;
|
||||
$GLOBALS['back'] = $GLOBALS['back'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['goto'] ??= null;
|
||||
$GLOBALS['back'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$this->addScriptFiles(['makegrid.js', 'vendor/jquery/jquery.uitablefilter.js', 'sql.js']);
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ final class AddController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
|
||||
$selected = $_POST['selected_tbl'] ?? [];
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ final class MakeConsistentController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
|
||||
$selected = $_POST['selected_tbl'] ?? [];
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ final class RemoveController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
|
||||
$selected = $_POST['selected_tbl'] ?? [];
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ final class FavoriteTableController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$parameters = [
|
||||
'favorite_table' => $_REQUEST['favorite_table'] ?? null,
|
||||
|
||||
@ -29,7 +29,7 @@ final class RealRowCountController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$parameters = [
|
||||
'real_row_count_all' => $_REQUEST['real_row_count_all'] ?? null,
|
||||
|
||||
@ -125,7 +125,7 @@ class StructureController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$parameters = [
|
||||
'sort' => $_REQUEST['sort'] ?? null,
|
||||
|
||||
@ -45,9 +45,9 @@ class TrackingController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['text_dir'] = $GLOBALS['text_dir'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['text_dir'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$this->addScriptFiles(['vendor/jquery/jquery.tablesorter.js', 'database/tracking.js']);
|
||||
|
||||
|
||||
@ -39,9 +39,9 @@ class TriggersController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errors'] = $GLOBALS['errors'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errors'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$this->addScriptFiles(['database/triggers.js']);
|
||||
|
||||
|
||||
@ -48,25 +48,25 @@ final class ExportController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['export_type'] = $GLOBALS['export_type'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['compression'] = $GLOBALS['compression'] ?? null;
|
||||
$GLOBALS['asfile'] = $GLOBALS['asfile'] ?? null;
|
||||
$GLOBALS['buffer_needed'] = $GLOBALS['buffer_needed'] ?? null;
|
||||
$GLOBALS['save_on_server'] = $GLOBALS['save_on_server'] ?? null;
|
||||
$GLOBALS['file_handle'] = $GLOBALS['file_handle'] ?? null;
|
||||
$GLOBALS['output_charset_conversion'] = $GLOBALS['output_charset_conversion'] ?? null;
|
||||
$GLOBALS['output_kanji_conversion'] = $GLOBALS['output_kanji_conversion'] ?? null;
|
||||
$GLOBALS['what'] = $GLOBALS['what'] ?? null;
|
||||
$GLOBALS['single_table'] = $GLOBALS['single_table'] ?? null;
|
||||
$GLOBALS['save_filename'] = $GLOBALS['save_filename'] ?? null;
|
||||
$GLOBALS['tables'] = $GLOBALS['tables'] ?? null;
|
||||
$GLOBALS['table_select'] = $GLOBALS['table_select'] ?? null;
|
||||
$GLOBALS['time_start'] = $GLOBALS['time_start'] ?? null;
|
||||
$GLOBALS['charset'] = $GLOBALS['charset'] ?? null;
|
||||
$GLOBALS['active_page'] = $GLOBALS['active_page'] ?? null;
|
||||
$GLOBALS['table_data'] = $GLOBALS['table_data'] ?? null;
|
||||
$GLOBALS['export_type'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
$GLOBALS['compression'] ??= null;
|
||||
$GLOBALS['asfile'] ??= null;
|
||||
$GLOBALS['buffer_needed'] ??= null;
|
||||
$GLOBALS['save_on_server'] ??= null;
|
||||
$GLOBALS['file_handle'] ??= null;
|
||||
$GLOBALS['output_charset_conversion'] ??= null;
|
||||
$GLOBALS['output_kanji_conversion'] ??= null;
|
||||
$GLOBALS['what'] ??= null;
|
||||
$GLOBALS['single_table'] ??= null;
|
||||
$GLOBALS['save_filename'] ??= null;
|
||||
$GLOBALS['tables'] ??= null;
|
||||
$GLOBALS['table_select'] ??= null;
|
||||
$GLOBALS['time_start'] ??= null;
|
||||
$GLOBALS['charset'] ??= null;
|
||||
$GLOBALS['active_page'] ??= null;
|
||||
$GLOBALS['table_data'] ??= null;
|
||||
|
||||
/** @var array<string, string> $postParams */
|
||||
$postParams = $request->getParsedBody();
|
||||
|
||||
@ -28,17 +28,17 @@ class GisDataEditorController extends AbstractController
|
||||
{
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['gis_data'] = $GLOBALS['gis_data'] ?? null;
|
||||
$GLOBALS['gis_types'] = $GLOBALS['gis_types'] ?? null;
|
||||
$GLOBALS['start'] = $GLOBALS['start'] ?? null;
|
||||
$GLOBALS['geom_type'] = $GLOBALS['geom_type'] ?? null;
|
||||
$GLOBALS['gis_obj'] = $GLOBALS['gis_obj'] ?? null;
|
||||
$GLOBALS['wkt'] = $GLOBALS['wkt'] ?? null;
|
||||
$GLOBALS['result'] = $GLOBALS['result'] ?? null;
|
||||
$GLOBALS['visualizationSettings'] = $GLOBALS['visualizationSettings'] ?? null;
|
||||
$GLOBALS['visualization'] = $GLOBALS['visualization'] ?? null;
|
||||
$GLOBALS['open_layers'] = $GLOBALS['open_layers'] ?? null;
|
||||
$GLOBALS['geom_count'] = $GLOBALS['geom_count'] ?? null;
|
||||
$GLOBALS['gis_data'] ??= null;
|
||||
$GLOBALS['gis_types'] ??= null;
|
||||
$GLOBALS['start'] ??= null;
|
||||
$GLOBALS['geom_type'] ??= null;
|
||||
$GLOBALS['gis_obj'] ??= null;
|
||||
$GLOBALS['wkt'] ??= null;
|
||||
$GLOBALS['result'] ??= null;
|
||||
$GLOBALS['visualizationSettings'] ??= null;
|
||||
$GLOBALS['visualization'] ??= null;
|
||||
$GLOBALS['open_layers'] ??= null;
|
||||
$GLOBALS['geom_count'] ??= null;
|
||||
|
||||
/** @var string|null $field */
|
||||
$field = $request->getParsedBodyParam('field');
|
||||
|
||||
@ -64,11 +64,11 @@ class HomeController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['server'] = $GLOBALS['server'] ?? null;
|
||||
$GLOBALS['collation_connection'] = $GLOBALS['collation_connection'] ?? null;
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['show_query'] = $GLOBALS['show_query'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['server'] ??= null;
|
||||
$GLOBALS['collation_connection'] ??= null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
$GLOBALS['show_query'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
if ($this->response->isAjax() && ! empty($_REQUEST['access_time'])) {
|
||||
return;
|
||||
@ -251,7 +251,7 @@ class HomeController extends AbstractController
|
||||
|
||||
private function checkRequirements(): void
|
||||
{
|
||||
$GLOBALS['server'] = $GLOBALS['server'] ?? null;
|
||||
$GLOBALS['server'] ??= null;
|
||||
|
||||
$this->checkPhpExtensionsRequirements();
|
||||
|
||||
@ -397,7 +397,7 @@ class HomeController extends AbstractController
|
||||
|
||||
private function checkLanguageStats(): void
|
||||
{
|
||||
$GLOBALS['lang'] = $GLOBALS['lang'] ?? null;
|
||||
$GLOBALS['lang'] ??= null;
|
||||
|
||||
/**
|
||||
* Warning about incomplete translations.
|
||||
|
||||
@ -71,40 +71,40 @@ final class ImportController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['collation_connection'] = $GLOBALS['collation_connection'] ?? null;
|
||||
$GLOBALS['goto'] = $GLOBALS['goto'] ?? null;
|
||||
$GLOBALS['display_query'] = $GLOBALS['display_query'] ?? null;
|
||||
$GLOBALS['ajax_reload'] = $GLOBALS['ajax_reload'] ?? null;
|
||||
$GLOBALS['import_text'] = $GLOBALS['import_text'] ?? null;
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['memory_limit'] = $GLOBALS['memory_limit'] ?? null;
|
||||
$GLOBALS['read_limit'] = $GLOBALS['read_limit'] ?? null;
|
||||
$GLOBALS['finished'] = $GLOBALS['finished'] ?? null;
|
||||
$GLOBALS['offset'] = $GLOBALS['offset'] ?? null;
|
||||
$GLOBALS['charset_conversion'] = $GLOBALS['charset_conversion'] ?? null;
|
||||
$GLOBALS['timestamp'] = $GLOBALS['timestamp'] ?? null;
|
||||
$GLOBALS['maximum_time'] = $GLOBALS['maximum_time'] ?? null;
|
||||
$GLOBALS['timeout_passed'] = $GLOBALS['timeout_passed'] ?? null;
|
||||
$GLOBALS['import_file'] = $GLOBALS['import_file'] ?? null;
|
||||
$GLOBALS['go_sql'] = $GLOBALS['go_sql'] ?? null;
|
||||
$GLOBALS['sql_file'] = $GLOBALS['sql_file'] ?? null;
|
||||
$GLOBALS['error'] = $GLOBALS['error'] ?? null;
|
||||
$GLOBALS['max_sql_len'] = $GLOBALS['max_sql_len'] ?? null;
|
||||
$GLOBALS['msg'] = $GLOBALS['msg'] ?? null;
|
||||
$GLOBALS['sql_query_disabled'] = $GLOBALS['sql_query_disabled'] ?? null;
|
||||
$GLOBALS['executed_queries'] = $GLOBALS['executed_queries'] ?? null;
|
||||
$GLOBALS['run_query'] = $GLOBALS['run_query'] ?? null;
|
||||
$GLOBALS['reset_charset'] = $GLOBALS['reset_charset'] ?? null;
|
||||
$GLOBALS['result'] = $GLOBALS['result'] ?? null;
|
||||
$GLOBALS['import_file_name'] = $GLOBALS['import_file_name'] ?? null;
|
||||
$GLOBALS['import_notice'] = $GLOBALS['import_notice'] ?? null;
|
||||
$GLOBALS['read_multiply'] = $GLOBALS['read_multiply'] ?? null;
|
||||
$GLOBALS['my_die'] = $GLOBALS['my_die'] ?? null;
|
||||
$GLOBALS['active_page'] = $GLOBALS['active_page'] ?? null;
|
||||
$GLOBALS['reload'] = $GLOBALS['reload'] ?? null;
|
||||
$GLOBALS['charset_connection'] = $GLOBALS['charset_connection'] ?? null;
|
||||
$GLOBALS['collation_connection'] ??= null;
|
||||
$GLOBALS['goto'] ??= null;
|
||||
$GLOBALS['display_query'] ??= null;
|
||||
$GLOBALS['ajax_reload'] ??= null;
|
||||
$GLOBALS['import_text'] ??= null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['memory_limit'] ??= null;
|
||||
$GLOBALS['read_limit'] ??= null;
|
||||
$GLOBALS['finished'] ??= null;
|
||||
$GLOBALS['offset'] ??= null;
|
||||
$GLOBALS['charset_conversion'] ??= null;
|
||||
$GLOBALS['timestamp'] ??= null;
|
||||
$GLOBALS['maximum_time'] ??= null;
|
||||
$GLOBALS['timeout_passed'] ??= null;
|
||||
$GLOBALS['import_file'] ??= null;
|
||||
$GLOBALS['go_sql'] ??= null;
|
||||
$GLOBALS['sql_file'] ??= null;
|
||||
$GLOBALS['error'] ??= null;
|
||||
$GLOBALS['max_sql_len'] ??= null;
|
||||
$GLOBALS['msg'] ??= null;
|
||||
$GLOBALS['sql_query_disabled'] ??= null;
|
||||
$GLOBALS['executed_queries'] ??= null;
|
||||
$GLOBALS['run_query'] ??= null;
|
||||
$GLOBALS['reset_charset'] ??= null;
|
||||
$GLOBALS['result'] ??= null;
|
||||
$GLOBALS['import_file_name'] ??= null;
|
||||
$GLOBALS['import_notice'] ??= null;
|
||||
$GLOBALS['read_multiply'] ??= null;
|
||||
$GLOBALS['my_die'] ??= null;
|
||||
$GLOBALS['active_page'] ??= null;
|
||||
$GLOBALS['reload'] ??= null;
|
||||
$GLOBALS['charset_connection'] ??= null;
|
||||
|
||||
$GLOBALS['charset_of_file'] = $request->getParsedBodyParam('charset_of_file');
|
||||
$GLOBALS['format'] = $request->getParsedBodyParam('format', '');
|
||||
|
||||
@ -33,10 +33,10 @@ class StatusController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['SESSION_KEY'] = $GLOBALS['SESSION_KEY'] ?? null;
|
||||
$GLOBALS['upload_id'] = $GLOBALS['upload_id'] ?? null;
|
||||
$GLOBALS['plugins'] = $GLOBALS['plugins'] ?? null;
|
||||
$GLOBALS['timestamp'] = $GLOBALS['timestamp'] ?? null;
|
||||
$GLOBALS['SESSION_KEY'] ??= null;
|
||||
$GLOBALS['upload_id'] ??= null;
|
||||
$GLOBALS['plugins'] ??= null;
|
||||
$GLOBALS['timestamp'] ??= null;
|
||||
|
||||
[
|
||||
$GLOBALS['SESSION_KEY'],
|
||||
|
||||
@ -42,11 +42,11 @@ class ExportController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['cf'] = $GLOBALS['cf'] ?? null;
|
||||
$GLOBALS['error'] = $GLOBALS['error'] ?? null;
|
||||
$GLOBALS['tabHash'] = $GLOBALS['tabHash'] ?? null;
|
||||
$GLOBALS['hash'] = $GLOBALS['hash'] ?? null;
|
||||
$GLOBALS['server'] = $GLOBALS['server'] ?? null;
|
||||
$GLOBALS['cf'] ??= null;
|
||||
$GLOBALS['error'] ??= null;
|
||||
$GLOBALS['tabHash'] ??= null;
|
||||
$GLOBALS['hash'] ??= null;
|
||||
$GLOBALS['server'] ??= null;
|
||||
|
||||
$GLOBALS['cf'] = new ConfigFile($this->config->baseSettings);
|
||||
$this->userPreferences->pageInit($GLOBALS['cf']);
|
||||
|
||||
@ -42,11 +42,11 @@ class FeaturesController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['cf'] = $GLOBALS['cf'] ?? null;
|
||||
$GLOBALS['error'] = $GLOBALS['error'] ?? null;
|
||||
$GLOBALS['tabHash'] = $GLOBALS['tabHash'] ?? null;
|
||||
$GLOBALS['hash'] = $GLOBALS['hash'] ?? null;
|
||||
$GLOBALS['server'] = $GLOBALS['server'] ?? null;
|
||||
$GLOBALS['cf'] ??= null;
|
||||
$GLOBALS['error'] ??= null;
|
||||
$GLOBALS['tabHash'] ??= null;
|
||||
$GLOBALS['hash'] ??= null;
|
||||
$GLOBALS['server'] ??= null;
|
||||
|
||||
$GLOBALS['cf'] = new ConfigFile($this->config->baseSettings);
|
||||
$this->userPreferences->pageInit($GLOBALS['cf']);
|
||||
|
||||
@ -42,11 +42,11 @@ class ImportController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['cf'] = $GLOBALS['cf'] ?? null;
|
||||
$GLOBALS['error'] = $GLOBALS['error'] ?? null;
|
||||
$GLOBALS['tabHash'] = $GLOBALS['tabHash'] ?? null;
|
||||
$GLOBALS['hash'] = $GLOBALS['hash'] ?? null;
|
||||
$GLOBALS['server'] = $GLOBALS['server'] ?? null;
|
||||
$GLOBALS['cf'] ??= null;
|
||||
$GLOBALS['error'] ??= null;
|
||||
$GLOBALS['tabHash'] ??= null;
|
||||
$GLOBALS['hash'] ??= null;
|
||||
$GLOBALS['server'] ??= null;
|
||||
|
||||
$GLOBALS['cf'] = new ConfigFile($this->config->baseSettings);
|
||||
$this->userPreferences->pageInit($GLOBALS['cf']);
|
||||
|
||||
@ -42,11 +42,11 @@ class MainPanelController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['cf'] = $GLOBALS['cf'] ?? null;
|
||||
$GLOBALS['error'] = $GLOBALS['error'] ?? null;
|
||||
$GLOBALS['tabHash'] = $GLOBALS['tabHash'] ?? null;
|
||||
$GLOBALS['hash'] = $GLOBALS['hash'] ?? null;
|
||||
$GLOBALS['server'] = $GLOBALS['server'] ?? null;
|
||||
$GLOBALS['cf'] ??= null;
|
||||
$GLOBALS['error'] ??= null;
|
||||
$GLOBALS['tabHash'] ??= null;
|
||||
$GLOBALS['hash'] ??= null;
|
||||
$GLOBALS['server'] ??= null;
|
||||
|
||||
$GLOBALS['cf'] = new ConfigFile($this->config->baseSettings);
|
||||
$this->userPreferences->pageInit($GLOBALS['cf']);
|
||||
|
||||
@ -66,15 +66,15 @@ class ManageController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['cf'] = $GLOBALS['cf'] ?? null;
|
||||
$GLOBALS['error'] = $GLOBALS['error'] ?? null;
|
||||
$GLOBALS['json'] = $GLOBALS['json'] ?? null;
|
||||
$GLOBALS['lang'] = $GLOBALS['lang'] ?? null;
|
||||
$GLOBALS['new_config'] = $GLOBALS['new_config'] ?? null;
|
||||
$GLOBALS['return_url'] = $GLOBALS['return_url'] ?? null;
|
||||
$GLOBALS['form_display'] = $GLOBALS['form_display'] ?? null;
|
||||
$GLOBALS['all_ok'] = $GLOBALS['all_ok'] ?? null;
|
||||
$GLOBALS['query'] = $GLOBALS['query'] ?? null;
|
||||
$GLOBALS['cf'] ??= null;
|
||||
$GLOBALS['error'] ??= null;
|
||||
$GLOBALS['json'] ??= null;
|
||||
$GLOBALS['lang'] ??= null;
|
||||
$GLOBALS['new_config'] ??= null;
|
||||
$GLOBALS['return_url'] ??= null;
|
||||
$GLOBALS['form_display'] ??= null;
|
||||
$GLOBALS['all_ok'] ??= null;
|
||||
$GLOBALS['query'] ??= null;
|
||||
|
||||
$route = $request->getRoute();
|
||||
|
||||
|
||||
@ -42,11 +42,11 @@ class NavigationController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['cf'] = $GLOBALS['cf'] ?? null;
|
||||
$GLOBALS['error'] = $GLOBALS['error'] ?? null;
|
||||
$GLOBALS['tabHash'] = $GLOBALS['tabHash'] ?? null;
|
||||
$GLOBALS['hash'] = $GLOBALS['hash'] ?? null;
|
||||
$GLOBALS['server'] = $GLOBALS['server'] ?? null;
|
||||
$GLOBALS['cf'] ??= null;
|
||||
$GLOBALS['error'] ??= null;
|
||||
$GLOBALS['tabHash'] ??= null;
|
||||
$GLOBALS['hash'] ??= null;
|
||||
$GLOBALS['server'] ??= null;
|
||||
|
||||
$GLOBALS['cf'] = new ConfigFile($this->config->baseSettings);
|
||||
$this->userPreferences->pageInit($GLOBALS['cf']);
|
||||
|
||||
@ -42,11 +42,11 @@ class SqlController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['cf'] = $GLOBALS['cf'] ?? null;
|
||||
$GLOBALS['error'] = $GLOBALS['error'] ?? null;
|
||||
$GLOBALS['tabHash'] = $GLOBALS['tabHash'] ?? null;
|
||||
$GLOBALS['hash'] = $GLOBALS['hash'] ?? null;
|
||||
$GLOBALS['server'] = $GLOBALS['server'] ?? null;
|
||||
$GLOBALS['cf'] ??= null;
|
||||
$GLOBALS['error'] ??= null;
|
||||
$GLOBALS['tabHash'] ??= null;
|
||||
$GLOBALS['hash'] ??= null;
|
||||
$GLOBALS['server'] ??= null;
|
||||
|
||||
$GLOBALS['cf'] = new ConfigFile($this->config->baseSettings);
|
||||
$this->userPreferences->pageInit($GLOBALS['cf']);
|
||||
|
||||
@ -43,9 +43,9 @@ final class DestroyController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['selected'] = $GLOBALS['selected'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['reload'] = $GLOBALS['reload'] ?? null;
|
||||
$GLOBALS['selected'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['reload'] ??= null;
|
||||
|
||||
$selected_dbs = $request->getParsedBodyParam('selected_dbs');
|
||||
|
||||
|
||||
@ -62,11 +62,11 @@ class DatabasesController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['server'] = $GLOBALS['server'] ?? null;
|
||||
$GLOBALS['is_create_db_priv'] = $GLOBALS['is_create_db_priv'] ?? null;
|
||||
$GLOBALS['db_to_create'] = $GLOBALS['db_to_create'] ?? null;
|
||||
$GLOBALS['text_dir'] = $GLOBALS['text_dir'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['server'] ??= null;
|
||||
$GLOBALS['is_create_db_priv'] ??= null;
|
||||
$GLOBALS['db_to_create'] ??= null;
|
||||
$GLOBALS['text_dir'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$params = [
|
||||
'statistics' => $_REQUEST['statistics'] ?? null,
|
||||
|
||||
@ -33,10 +33,10 @@ final class ExportController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['unlim_num_rows'] = $GLOBALS['unlim_num_rows'] ?? null;
|
||||
$GLOBALS['unlim_num_rows'] ??= null;
|
||||
$GLOBALS['errorUrl'] = Url::getFromRoute('/');
|
||||
$GLOBALS['tmp_select'] = $GLOBALS['tmp_select'] ?? null;
|
||||
$GLOBALS['select_item'] = $GLOBALS['select_item'] ?? null;
|
||||
$GLOBALS['tmp_select'] ??= null;
|
||||
$GLOBALS['select_item'] ??= null;
|
||||
|
||||
if ($this->dbi->isSuperUser()) {
|
||||
$this->dbi->selectDb('mysql');
|
||||
|
||||
@ -36,8 +36,8 @@ final class ImportController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['SESSION_KEY'] = $GLOBALS['SESSION_KEY'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['SESSION_KEY'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$pageSettings = new PageSettings('Import');
|
||||
$pageSettingsErrorHtml = $pageSettings->getErrorHTML();
|
||||
|
||||
@ -50,12 +50,12 @@ class PrivilegesController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['text_dir'] = $GLOBALS['text_dir'] ?? null;
|
||||
$GLOBALS['username'] = $GLOBALS['username'] ?? null;
|
||||
$GLOBALS['hostname'] = $GLOBALS['hostname'] ?? null;
|
||||
$GLOBALS['dbname'] = $GLOBALS['dbname'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
$GLOBALS['text_dir'] ??= null;
|
||||
$GLOBALS['username'] ??= null;
|
||||
$GLOBALS['hostname'] ??= null;
|
||||
$GLOBALS['dbname'] ??= null;
|
||||
|
||||
$checkUserPrivileges = new CheckUserPrivileges($this->dbi);
|
||||
$checkUserPrivileges->getPrivileges();
|
||||
|
||||
@ -40,8 +40,8 @@ class ReplicationController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$hasReplicaClearScreen = (bool) $request->getParsedBodyParam('replica_clear_screen');
|
||||
$replicaConfigure = $request->getParsedBodyParam('replica_configure');
|
||||
|
||||
@ -35,7 +35,7 @@ class SqlController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$this->addScriptFiles(['makegrid.js', 'vendor/jquery/jquery.uitablefilter.js', 'sql.js']);
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ final class ChartingDataController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$requiredData = $request->getParsedBodyParam('requiredData', '');
|
||||
$GLOBALS['errorUrl'] = Url::getFromRoute('/');
|
||||
|
||||
@ -33,7 +33,7 @@ final class GeneralLogController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$GLOBALS['errorUrl'] = Url::getFromRoute('/');
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ final class LogVarsController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$GLOBALS['errorUrl'] = Url::getFromRoute('/');
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ final class QueryAnalyzerController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$GLOBALS['errorUrl'] = Url::getFromRoute('/');
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ final class SlowLogController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$GLOBALS['errorUrl'] = Url::getFromRoute('/');
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ class VariablesController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$filterAlert = $request->getParsedBodyParam('filterAlert');
|
||||
$filterText = $request->getParsedBodyParam('filterText');
|
||||
|
||||
@ -49,21 +49,21 @@ class SqlController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['display_query'] = $GLOBALS['display_query'] ?? null;
|
||||
$GLOBALS['ajax_reload'] = $GLOBALS['ajax_reload'] ?? null;
|
||||
$GLOBALS['goto'] = $GLOBALS['goto'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['find_real_end'] = $GLOBALS['find_real_end'] ?? null;
|
||||
$GLOBALS['unlim_num_rows'] = $GLOBALS['unlim_num_rows'] ?? null;
|
||||
$GLOBALS['import_text'] = $GLOBALS['import_text'] ?? null;
|
||||
$GLOBALS['disp_query'] = $GLOBALS['disp_query'] ?? null;
|
||||
$GLOBALS['extra_data'] = $GLOBALS['extra_data'] ?? null;
|
||||
$GLOBALS['message_to_show'] = $GLOBALS['message_to_show'] ?? null;
|
||||
$GLOBALS['disp_message'] = $GLOBALS['disp_message'] ?? null;
|
||||
$GLOBALS['complete_query'] = $GLOBALS['complete_query'] ?? null;
|
||||
$GLOBALS['is_gotofile'] = $GLOBALS['is_gotofile'] ?? null;
|
||||
$GLOBALS['back'] = $GLOBALS['back'] ?? null;
|
||||
$GLOBALS['table_from_sql'] = $GLOBALS['table_from_sql'] ?? null;
|
||||
$GLOBALS['display_query'] ??= null;
|
||||
$GLOBALS['ajax_reload'] ??= null;
|
||||
$GLOBALS['goto'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['find_real_end'] ??= null;
|
||||
$GLOBALS['unlim_num_rows'] ??= null;
|
||||
$GLOBALS['import_text'] ??= null;
|
||||
$GLOBALS['disp_query'] ??= null;
|
||||
$GLOBALS['extra_data'] ??= null;
|
||||
$GLOBALS['message_to_show'] ??= null;
|
||||
$GLOBALS['disp_message'] ??= null;
|
||||
$GLOBALS['complete_query'] ??= null;
|
||||
$GLOBALS['is_gotofile'] ??= null;
|
||||
$GLOBALS['back'] ??= null;
|
||||
$GLOBALS['table_from_sql'] ??= null;
|
||||
|
||||
$this->checkUserPrivileges->getPrivileges();
|
||||
|
||||
|
||||
@ -58,12 +58,12 @@ class AddFieldController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['active_page'] = $GLOBALS['active_page'] ?? null;
|
||||
$GLOBALS['num_fields'] = $GLOBALS['num_fields'] ?? null;
|
||||
$GLOBALS['regenerate'] = $GLOBALS['regenerate'] ?? null;
|
||||
$GLOBALS['result'] = $GLOBALS['result'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
$GLOBALS['active_page'] ??= null;
|
||||
$GLOBALS['num_fields'] ??= null;
|
||||
$GLOBALS['regenerate'] ??= null;
|
||||
$GLOBALS['result'] ??= null;
|
||||
|
||||
/** @var string|null $numberOfFields */
|
||||
$numberOfFields = $request->getParsedBodyParam('num_fields');
|
||||
|
||||
@ -47,33 +47,33 @@ class ChangeController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['text_dir'] = $GLOBALS['text_dir'] ?? null;
|
||||
$GLOBALS['disp_message'] = $GLOBALS['disp_message'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['where_clause'] = $GLOBALS['where_clause'] ?? null;
|
||||
$GLOBALS['unsaved_values'] = $GLOBALS['unsaved_values'] ?? null;
|
||||
$GLOBALS['insert_mode'] = $GLOBALS['insert_mode'] ?? null;
|
||||
$GLOBALS['where_clause_array'] = $GLOBALS['where_clause_array'] ?? null;
|
||||
$GLOBALS['where_clauses'] = $GLOBALS['where_clauses'] ?? null;
|
||||
$GLOBALS['result'] = $GLOBALS['result'] ?? null;
|
||||
$GLOBALS['rows'] = $GLOBALS['rows'] ?? null;
|
||||
$GLOBALS['found_unique_key'] = $GLOBALS['found_unique_key'] ?? null;
|
||||
$GLOBALS['after_insert'] = $GLOBALS['after_insert'] ?? null;
|
||||
$GLOBALS['comments_map'] = $GLOBALS['comments_map'] ?? null;
|
||||
$GLOBALS['table_columns'] = $GLOBALS['table_columns'] ?? null;
|
||||
$GLOBALS['timestamp_seen'] = $GLOBALS['timestamp_seen'] ?? null;
|
||||
$GLOBALS['columns_cnt'] = $GLOBALS['columns_cnt'] ?? null;
|
||||
$GLOBALS['tabindex'] = $GLOBALS['tabindex'] ?? null;
|
||||
$GLOBALS['tabindex_for_value'] = $GLOBALS['tabindex_for_value'] ?? null;
|
||||
$GLOBALS['o_rows'] = $GLOBALS['o_rows'] ?? null;
|
||||
$GLOBALS['biggest_max_file_size'] = $GLOBALS['biggest_max_file_size'] ?? null;
|
||||
$GLOBALS['has_blob_field'] = $GLOBALS['has_blob_field'] ?? null;
|
||||
$GLOBALS['jsvkey'] = $GLOBALS['jsvkey'] ?? null;
|
||||
$GLOBALS['vkey'] = $GLOBALS['vkey'] ?? null;
|
||||
$GLOBALS['current_result'] = $GLOBALS['current_result'] ?? null;
|
||||
$GLOBALS['repopulate'] = $GLOBALS['repopulate'] ?? null;
|
||||
$GLOBALS['checked'] = $GLOBALS['checked'] ?? null;
|
||||
$GLOBALS['text_dir'] ??= null;
|
||||
$GLOBALS['disp_message'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['where_clause'] ??= null;
|
||||
$GLOBALS['unsaved_values'] ??= null;
|
||||
$GLOBALS['insert_mode'] ??= null;
|
||||
$GLOBALS['where_clause_array'] ??= null;
|
||||
$GLOBALS['where_clauses'] ??= null;
|
||||
$GLOBALS['result'] ??= null;
|
||||
$GLOBALS['rows'] ??= null;
|
||||
$GLOBALS['found_unique_key'] ??= null;
|
||||
$GLOBALS['after_insert'] ??= null;
|
||||
$GLOBALS['comments_map'] ??= null;
|
||||
$GLOBALS['table_columns'] ??= null;
|
||||
$GLOBALS['timestamp_seen'] ??= null;
|
||||
$GLOBALS['columns_cnt'] ??= null;
|
||||
$GLOBALS['tabindex'] ??= null;
|
||||
$GLOBALS['tabindex_for_value'] ??= null;
|
||||
$GLOBALS['o_rows'] ??= null;
|
||||
$GLOBALS['biggest_max_file_size'] ??= null;
|
||||
$GLOBALS['has_blob_field'] ??= null;
|
||||
$GLOBALS['jsvkey'] ??= null;
|
||||
$GLOBALS['vkey'] ??= null;
|
||||
$GLOBALS['current_result'] ??= null;
|
||||
$GLOBALS['repopulate'] ??= null;
|
||||
$GLOBALS['checked'] ??= null;
|
||||
|
||||
$pageSettings = new PageSettings('Edit');
|
||||
$this->response->addHTML($pageSettings->getErrorHTML());
|
||||
|
||||
@ -28,8 +28,8 @@ final class ChangeRowsController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['active_page'] = $GLOBALS['active_page'] ?? null;
|
||||
$GLOBALS['where_clause'] = $GLOBALS['where_clause'] ?? null;
|
||||
$GLOBALS['active_page'] ??= null;
|
||||
$GLOBALS['where_clause'] ??= null;
|
||||
|
||||
if (isset($_POST['goto']) && (! isset($_POST['rows_to_delete']) || ! is_array($_POST['rows_to_delete']))) {
|
||||
$this->response->setRequestStatus(false);
|
||||
|
||||
@ -44,7 +44,7 @@ class ChartController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
if (isset($_REQUEST['pos'], $_REQUEST['session_max_rows']) && $this->response->isAjax()) {
|
||||
$this->ajax();
|
||||
@ -169,8 +169,8 @@ class ChartController extends AbstractController
|
||||
*/
|
||||
public function ajax(): void
|
||||
{
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
if (strlen($GLOBALS['table']) > 0 && strlen($GLOBALS['db']) > 0) {
|
||||
$this->checkParameters(['db', 'table']);
|
||||
|
||||
|
||||
@ -18,8 +18,8 @@ final class DeleteConfirmController extends AbstractController
|
||||
{
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$selected = $_POST['rows_to_delete'] ?? null;
|
||||
|
||||
|
||||
@ -36,10 +36,10 @@ final class DeleteRowsController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['goto'] = $GLOBALS['goto'] ?? null;
|
||||
$GLOBALS['disp_message'] = $GLOBALS['disp_message'] ?? null;
|
||||
$GLOBALS['disp_query'] = $GLOBALS['disp_query'] ?? null;
|
||||
$GLOBALS['active_page'] = $GLOBALS['active_page'] ?? null;
|
||||
$GLOBALS['goto'] ??= null;
|
||||
$GLOBALS['disp_message'] ??= null;
|
||||
$GLOBALS['disp_query'] ??= null;
|
||||
$GLOBALS['active_page'] ??= null;
|
||||
|
||||
$mult_btn = $_POST['mult_btn'] ?? '';
|
||||
$selected = $_POST['selected'] ?? [];
|
||||
|
||||
@ -38,11 +38,11 @@ class ExportController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['replaces'] = $GLOBALS['replaces'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['where_clause'] = $GLOBALS['where_clause'] ?? null;
|
||||
$GLOBALS['unlim_num_rows'] = $GLOBALS['unlim_num_rows'] ?? null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['replaces'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['where_clause'] ??= null;
|
||||
$GLOBALS['unlim_num_rows'] ??= null;
|
||||
|
||||
$pageSettings = new PageSettings('Export');
|
||||
$pageSettingsErrorHtml = $pageSettings->getErrorHTML();
|
||||
|
||||
@ -28,9 +28,9 @@ final class ExportRowsController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['active_page'] = $GLOBALS['active_page'] ?? null;
|
||||
$GLOBALS['single_table'] = $GLOBALS['single_table'] ?? null;
|
||||
$GLOBALS['where_clause'] = $GLOBALS['where_clause'] ?? null;
|
||||
$GLOBALS['active_page'] ??= null;
|
||||
$GLOBALS['single_table'] ??= null;
|
||||
$GLOBALS['where_clause'] ??= null;
|
||||
|
||||
if (isset($_POST['goto']) && (! isset($_POST['rows_to_delete']) || ! is_array($_POST['rows_to_delete']))) {
|
||||
$this->response->setRequestStatus(false);
|
||||
|
||||
@ -59,8 +59,8 @@ class FindReplaceController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$this->checkParameters(['db', 'table']);
|
||||
|
||||
$GLOBALS['urlParams'] = ['db' => $GLOBALS['db'], 'table' => $GLOBALS['table']];
|
||||
|
||||
@ -41,8 +41,8 @@ final class GisVisualizationController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$this->checkParameters(['db']);
|
||||
|
||||
$GLOBALS['errorUrl'] = Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database');
|
||||
|
||||
@ -40,9 +40,9 @@ final class ImportController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['SESSION_KEY'] = $GLOBALS['SESSION_KEY'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['SESSION_KEY'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$pageSettings = new PageSettings('Import');
|
||||
$pageSettingsErrorHtml = $pageSettings->getErrorHTML();
|
||||
|
||||
@ -36,8 +36,8 @@ final class IndexRenameController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
if (! isset($_POST['create_edit_table'])) {
|
||||
$this->checkParameters(['db', 'table']);
|
||||
|
||||
@ -43,8 +43,8 @@ class IndexesController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
if (! isset($_POST['create_edit_table'])) {
|
||||
$this->checkParameters(['db', 'table']);
|
||||
|
||||
@ -63,28 +63,28 @@ class OperationsController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['reread_info'] = $GLOBALS['reread_info'] ?? null;
|
||||
$GLOBALS['tbl_is_view'] = $GLOBALS['tbl_is_view'] ?? null;
|
||||
$GLOBALS['tbl_storage_engine'] = $GLOBALS['tbl_storage_engine'] ?? null;
|
||||
$GLOBALS['show_comment'] = $GLOBALS['show_comment'] ?? null;
|
||||
$GLOBALS['tbl_collation'] = $GLOBALS['tbl_collation'] ?? null;
|
||||
$GLOBALS['table_info_num_rows'] = $GLOBALS['table_info_num_rows'] ?? null;
|
||||
$GLOBALS['row_format'] = $GLOBALS['row_format'] ?? null;
|
||||
$GLOBALS['auto_increment'] = $GLOBALS['auto_increment'] ?? null;
|
||||
$GLOBALS['create_options'] = $GLOBALS['create_options'] ?? null;
|
||||
$GLOBALS['table_alters'] = $GLOBALS['table_alters'] ?? null;
|
||||
$GLOBALS['warning_messages'] = $GLOBALS['warning_messages'] ?? null;
|
||||
$GLOBALS['reload'] = $GLOBALS['reload'] ?? null;
|
||||
$GLOBALS['result'] = $GLOBALS['result'] ?? null;
|
||||
$GLOBALS['new_tbl_storage_engine'] = $GLOBALS['new_tbl_storage_engine'] ?? null;
|
||||
$GLOBALS['message_to_show'] = $GLOBALS['message_to_show'] ?? null;
|
||||
$GLOBALS['columns'] = $GLOBALS['columns'] ?? null;
|
||||
$GLOBALS['hideOrderTable'] = $GLOBALS['hideOrderTable'] ?? null;
|
||||
$GLOBALS['indexes'] = $GLOBALS['indexes'] ?? null;
|
||||
$GLOBALS['notNull'] = $GLOBALS['notNull'] ?? null;
|
||||
$GLOBALS['comment'] = $GLOBALS['comment'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['reread_info'] ??= null;
|
||||
$GLOBALS['tbl_is_view'] ??= null;
|
||||
$GLOBALS['tbl_storage_engine'] ??= null;
|
||||
$GLOBALS['show_comment'] ??= null;
|
||||
$GLOBALS['tbl_collation'] ??= null;
|
||||
$GLOBALS['table_info_num_rows'] ??= null;
|
||||
$GLOBALS['row_format'] ??= null;
|
||||
$GLOBALS['auto_increment'] ??= null;
|
||||
$GLOBALS['create_options'] ??= null;
|
||||
$GLOBALS['table_alters'] ??= null;
|
||||
$GLOBALS['warning_messages'] ??= null;
|
||||
$GLOBALS['reload'] ??= null;
|
||||
$GLOBALS['result'] ??= null;
|
||||
$GLOBALS['new_tbl_storage_engine'] ??= null;
|
||||
$GLOBALS['message_to_show'] ??= null;
|
||||
$GLOBALS['columns'] ??= null;
|
||||
$GLOBALS['hideOrderTable'] ??= null;
|
||||
$GLOBALS['indexes'] ??= null;
|
||||
$GLOBALS['notNull'] ??= null;
|
||||
$GLOBALS['comment'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$this->checkUserPrivileges->getPrivileges();
|
||||
|
||||
@ -145,7 +145,7 @@ class OperationsController extends AbstractController
|
||||
$GLOBALS['create_options']['transactional'] = ($GLOBALS['create_options']['transactional'] ?? '') == '0'
|
||||
? '0'
|
||||
: '1';
|
||||
$GLOBALS['create_options']['page_checksum'] = $GLOBALS['create_options']['page_checksum'] ?? '';
|
||||
$GLOBALS['create_options']['page_checksum'] ??= '';
|
||||
}
|
||||
|
||||
$pma_table = $this->dbi->getTable($GLOBALS['db'], $GLOBALS['table']);
|
||||
@ -236,7 +236,7 @@ class OperationsController extends AbstractController
|
||||
if ($pma_table->isEngine('ARIA')) {
|
||||
$GLOBALS['create_options']['transactional'] = ($GLOBALS['create_options']['transactional'] ?? '')
|
||||
== '0' ? '0' : '1';
|
||||
$GLOBALS['create_options']['page_checksum'] = $GLOBALS['create_options']['page_checksum'] ?? '';
|
||||
$GLOBALS['create_options']['page_checksum'] ??= '';
|
||||
}
|
||||
} else {
|
||||
$GLOBALS['new_tbl_storage_engine'] = '';
|
||||
|
||||
@ -66,16 +66,16 @@ final class ReplaceController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
$this->checkParameters(['db', 'table', 'goto']);
|
||||
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['unsaved_values'] = $GLOBALS['unsaved_values'] ?? null;
|
||||
$GLOBALS['active_page'] = $GLOBALS['active_page'] ?? null;
|
||||
$GLOBALS['disp_query'] = $GLOBALS['disp_query'] ?? null;
|
||||
$GLOBALS['disp_message'] = $GLOBALS['disp_message'] ?? null;
|
||||
$GLOBALS['query'] = $GLOBALS['query'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['unsaved_values'] ??= null;
|
||||
$GLOBALS['active_page'] ??= null;
|
||||
$GLOBALS['disp_query'] ??= null;
|
||||
$GLOBALS['disp_message'] ??= null;
|
||||
$GLOBALS['query'] ??= null;
|
||||
|
||||
$this->dbi->selectDb($GLOBALS['db']);
|
||||
|
||||
@ -171,7 +171,7 @@ final class ReplaceController extends AbstractController
|
||||
// available in $multi_edit_columns_name[$key]
|
||||
|
||||
// When a select field is nullified, it's not present in $_POST so initialize it
|
||||
$multi_edit_columns[$key] = $multi_edit_columns[$key] ?? '';
|
||||
$multi_edit_columns[$key] ??= '';
|
||||
|
||||
/** @var string[]|string $current_value */
|
||||
$current_value = $multi_edit_columns[$key];
|
||||
|
||||
@ -34,9 +34,9 @@ final class SqlController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['goto'] = $GLOBALS['goto'] ?? null;
|
||||
$GLOBALS['back'] = $GLOBALS['back'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['goto'] ??= null;
|
||||
$GLOBALS['back'] ??= null;
|
||||
|
||||
$this->addScriptFiles(['makegrid.js', 'vendor/jquery/jquery.uitablefilter.js', 'sql.js']);
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ abstract class AbstractIndexController extends AbstractController
|
||||
|
||||
public function handleIndexCreation(ServerRequest $request, string $indexType): void
|
||||
{
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
|
||||
$selected = $request->getParsedBodyParam('selected_fld', []);
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ final class AddKeyController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['reload'] = $GLOBALS['reload'] ?? null;
|
||||
$GLOBALS['reload'] ??= null;
|
||||
|
||||
($this->sqlController)($request);
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ final class CentralColumnsAddController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
|
||||
$selected = $request->getParsedBodyParam('selected_fld', []);
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ final class CentralColumnsRemoveController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
|
||||
$selected = $request->getParsedBodyParam('selected_fld', []);
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ final class ChangeController extends AbstractController
|
||||
*/
|
||||
private function displayHtmlForColumnChange(array $selected): void
|
||||
{
|
||||
$GLOBALS['num_fields'] = $GLOBALS['num_fields'] ?? null;
|
||||
$GLOBALS['num_fields'] ??= null;
|
||||
|
||||
/**
|
||||
* @todo optimize in case of multiple fields to modify
|
||||
|
||||
@ -38,9 +38,9 @@ final class PrimaryController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
/** @var string[]|null $selected */
|
||||
$selected = $request->getParsedBodyParam('selected_fld', $request->getParsedBodyParam('selected'));
|
||||
|
||||
@ -66,13 +66,13 @@ class StructureController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['reread_info'] = $GLOBALS['reread_info'] ?? null;
|
||||
$GLOBALS['showtable'] = $GLOBALS['showtable'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['tbl_is_view'] = $GLOBALS['tbl_is_view'] ?? null;
|
||||
$GLOBALS['tbl_storage_engine'] = $GLOBALS['tbl_storage_engine'] ?? null;
|
||||
$GLOBALS['tbl_collation'] = $GLOBALS['tbl_collation'] ?? null;
|
||||
$GLOBALS['table_info_num_rows'] = $GLOBALS['table_info_num_rows'] ?? null;
|
||||
$GLOBALS['reread_info'] ??= null;
|
||||
$GLOBALS['showtable'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['tbl_is_view'] ??= null;
|
||||
$GLOBALS['tbl_storage_engine'] ??= null;
|
||||
$GLOBALS['tbl_collation'] ??= null;
|
||||
$GLOBALS['table_info_num_rows'] ??= null;
|
||||
|
||||
$this->dbi->selectDb($GLOBALS['db']);
|
||||
$GLOBALS['reread_info'] = $this->tableObj->getStatusInfo(null, true);
|
||||
@ -152,8 +152,8 @@ class StructureController extends AbstractController
|
||||
bool $isSystemSchema,
|
||||
string $route
|
||||
) {
|
||||
$GLOBALS['tbl_is_view'] = $GLOBALS['tbl_is_view'] ?? null;
|
||||
$GLOBALS['tbl_storage_engine'] = $GLOBALS['tbl_storage_engine'] ?? null;
|
||||
$GLOBALS['tbl_is_view'] ??= null;
|
||||
$GLOBALS['tbl_storage_engine'] ??= null;
|
||||
|
||||
// prepare comments
|
||||
$comments_map = [];
|
||||
@ -283,10 +283,10 @@ class StructureController extends AbstractController
|
||||
*/
|
||||
protected function getTableStats(bool $isSystemSchema)
|
||||
{
|
||||
$GLOBALS['tbl_is_view'] = $GLOBALS['tbl_is_view'] ?? null;
|
||||
$GLOBALS['tbl_storage_engine'] = $GLOBALS['tbl_storage_engine'] ?? null;
|
||||
$GLOBALS['table_info_num_rows'] = $GLOBALS['table_info_num_rows'] ?? null;
|
||||
$GLOBALS['tbl_collation'] = $GLOBALS['tbl_collation'] ?? null;
|
||||
$GLOBALS['tbl_is_view'] ??= null;
|
||||
$GLOBALS['tbl_storage_engine'] ??= null;
|
||||
$GLOBALS['table_info_num_rows'] ??= null;
|
||||
$GLOBALS['tbl_collation'] ??= null;
|
||||
|
||||
if (empty($GLOBALS['showtable'])) {
|
||||
$GLOBALS['showtable'] = $this->dbi->getTable($GLOBALS['db'], $GLOBALS['table'])->getStatusInfo(null, true);
|
||||
|
||||
@ -44,12 +44,12 @@ final class TrackingController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['text_dir'] = $GLOBALS['text_dir'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['msg'] = $GLOBALS['msg'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['entries'] = $GLOBALS['entries'] ?? null;
|
||||
$GLOBALS['filter_users'] = $GLOBALS['filter_users'] ?? null;
|
||||
$GLOBALS['text_dir'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['msg'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$GLOBALS['entries'] ??= null;
|
||||
$GLOBALS['filter_users'] ??= null;
|
||||
|
||||
$this->addScriptFiles(['vendor/jquery/jquery.tablesorter.js', 'table/tracking.js']);
|
||||
|
||||
@ -120,8 +120,8 @@ final class TrackingController extends AbstractController
|
||||
$GLOBALS['filter_users'] = array_map('trim', explode(',', $users));
|
||||
}
|
||||
|
||||
$dateFrom = $dateFrom ?? new DateTimeImmutable();
|
||||
$dateTo = $dateTo ?? new DateTimeImmutable();
|
||||
$dateFrom ??= new DateTimeImmutable();
|
||||
$dateTo ??= new DateTimeImmutable();
|
||||
|
||||
// Prepare export
|
||||
if ($reportExport !== null) {
|
||||
|
||||
@ -39,9 +39,9 @@ class TriggersController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['errors'] = $GLOBALS['errors'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errors'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
|
||||
$this->addScriptFiles(['database/triggers.js']);
|
||||
|
||||
|
||||
@ -93,9 +93,9 @@ class ZoomSearchController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['goto'] = $GLOBALS['goto'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['goto'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$this->checkParameters(['db', 'table']);
|
||||
|
||||
$GLOBALS['urlParams'] = ['db' => $GLOBALS['db'], 'table' => $GLOBALS['table']];
|
||||
|
||||
@ -36,10 +36,10 @@ class UserPasswordController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['hostname'] = $GLOBALS['hostname'] ?? null;
|
||||
$GLOBALS['username'] = $GLOBALS['username'] ?? null;
|
||||
$GLOBALS['change_password_message'] = $GLOBALS['change_password_message'] ?? null;
|
||||
$GLOBALS['msg'] = $GLOBALS['msg'] ?? null;
|
||||
$GLOBALS['hostname'] ??= null;
|
||||
$GLOBALS['username'] ??= null;
|
||||
$GLOBALS['change_password_message'] ??= null;
|
||||
$GLOBALS['msg'] ??= null;
|
||||
|
||||
$this->addScriptFiles(['server/privileges.js', 'vendor/zxcvbn-ts.js']);
|
||||
|
||||
|
||||
@ -61,9 +61,9 @@ class CreateController extends AbstractController
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$this->checkParameters(['db']);
|
||||
$GLOBALS['text_dir'] = $GLOBALS['text_dir'] ?? null;
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['text_dir'] ??= null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
|
||||
$GLOBALS['errorUrl'] = Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database');
|
||||
$GLOBALS['errorUrl'] .= Url::getCommon(['db' => $GLOBALS['db']], '&');
|
||||
|
||||
@ -41,13 +41,13 @@ class OperationsController extends AbstractController
|
||||
|
||||
public function __invoke(ServerRequest $request): void
|
||||
{
|
||||
$GLOBALS['urlParams'] = $GLOBALS['urlParams'] ?? null;
|
||||
$GLOBALS['reload'] = $GLOBALS['reload'] ?? null;
|
||||
$GLOBALS['result'] = $GLOBALS['result'] ?? null;
|
||||
$GLOBALS['warning_messages'] = $GLOBALS['warning_messages'] ?? null;
|
||||
$GLOBALS['urlParams'] ??= null;
|
||||
$GLOBALS['reload'] ??= null;
|
||||
$GLOBALS['result'] ??= null;
|
||||
$GLOBALS['warning_messages'] ??= null;
|
||||
$tableObject = $this->dbi->getTable($GLOBALS['db'], $GLOBALS['table']);
|
||||
|
||||
$GLOBALS['errorUrl'] = $GLOBALS['errorUrl'] ?? null;
|
||||
$GLOBALS['errorUrl'] ??= null;
|
||||
$this->addScriptFiles(['table/operations.js']);
|
||||
|
||||
$this->checkParameters(['db', 'table']);
|
||||
|
||||
@ -118,7 +118,7 @@ class Core
|
||||
bool $fatal = false,
|
||||
string $extra = ''
|
||||
): void {
|
||||
$GLOBALS['errorHandler'] = $GLOBALS['errorHandler'] ?? null;
|
||||
$GLOBALS['errorHandler'] ??= null;
|
||||
|
||||
$message = 'The %s extension is missing. Please check your PHP configuration.';
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ final class Crypto
|
||||
{
|
||||
private function getEncryptionKey(): string
|
||||
{
|
||||
$GLOBALS['config'] = $GLOBALS['config'] ?? null;
|
||||
$GLOBALS['config'] ??= null;
|
||||
|
||||
$key = $GLOBALS['config']->get('URLQueryEncryptionSecretKey');
|
||||
if (is_string($key) && mb_strlen($key, '8bit') === SODIUM_CRYPTO_SECRETBOX_KEYBYTES) {
|
||||
|
||||
@ -247,7 +247,7 @@ class Designer
|
||||
array $tables_all_keys,
|
||||
array $tables_pk_or_unique_keys
|
||||
) {
|
||||
$GLOBALS['text_dir'] = $GLOBALS['text_dir'] ?? null;
|
||||
$GLOBALS['text_dir'] ??= null;
|
||||
|
||||
$columns_type = [];
|
||||
foreach ($designerTables as $designerTable) {
|
||||
@ -333,7 +333,7 @@ class Designer
|
||||
array $tablesAllKeys,
|
||||
array $tablesPkOrUniqueKeys
|
||||
): string {
|
||||
$GLOBALS['text_dir'] = $GLOBALS['text_dir'] ?? null;
|
||||
$GLOBALS['text_dir'] ??= null;
|
||||
|
||||
$relationParameters = $this->relation->getRelationParameters();
|
||||
$columnsType = [];
|
||||
|
||||
@ -57,7 +57,7 @@ class Common
|
||||
public function getTablesInfo(?string $db = null, ?string $table = null): array
|
||||
{
|
||||
$designerTables = [];
|
||||
$db = $db ?? $GLOBALS['db'];
|
||||
$db ??= $GLOBALS['db'];
|
||||
// seems to be needed later
|
||||
$this->dbi->selectDb($db);
|
||||
if ($table === null) {
|
||||
|
||||
@ -86,8 +86,8 @@ class Events
|
||||
*/
|
||||
public function handleEditor(): void
|
||||
{
|
||||
$GLOBALS['errors'] = $GLOBALS['errors'] ?? null;
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['errors'] ??= null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
|
||||
if (! empty($_POST['editor_process_add']) || ! empty($_POST['editor_process_edit'])) {
|
||||
$sql_query = '';
|
||||
@ -393,7 +393,7 @@ class Events
|
||||
*/
|
||||
public function getQueryFromRequest()
|
||||
{
|
||||
$GLOBALS['errors'] = $GLOBALS['errors'] ?? null;
|
||||
$GLOBALS['errors'] ??= null;
|
||||
|
||||
$query = 'CREATE ';
|
||||
if (! empty($_POST['item_definer'])) {
|
||||
|
||||
@ -81,7 +81,7 @@ class Routines
|
||||
*/
|
||||
public function handleEditor(): void
|
||||
{
|
||||
$GLOBALS['errors'] = $GLOBALS['errors'] ?? null;
|
||||
$GLOBALS['errors'] ??= null;
|
||||
$GLOBALS['errors'] = $this->handleRequestCreateOrEdit($GLOBALS['errors'], $GLOBALS['db']);
|
||||
|
||||
/**
|
||||
@ -181,7 +181,7 @@ class Routines
|
||||
*/
|
||||
public function handleRequestCreateOrEdit(array $errors, $db)
|
||||
{
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
|
||||
if (empty($_POST['editor_process_add']) && empty($_POST['editor_process_edit'])) {
|
||||
return $errors;
|
||||
@ -736,7 +736,7 @@ class Routines
|
||||
*/
|
||||
public function getEditorForm($mode, $operation, array $routine)
|
||||
{
|
||||
$GLOBALS['errors'] = $GLOBALS['errors'] ?? null;
|
||||
$GLOBALS['errors'] ??= null;
|
||||
|
||||
for ($i = 0; $i < $routine['item_num_params']; $i++) {
|
||||
$routine['item_param_name'][$i] = htmlentities($routine['item_param_name'][$i], ENT_QUOTES);
|
||||
@ -817,7 +817,7 @@ class Routines
|
||||
string $itemType,
|
||||
bool &$warnedAboutLength
|
||||
): string {
|
||||
$GLOBALS['errors'] = $GLOBALS['errors'] ?? null;
|
||||
$GLOBALS['errors'] ??= null;
|
||||
|
||||
$params = '';
|
||||
$warnedAboutDir = false;
|
||||
@ -904,7 +904,7 @@ class Routines
|
||||
string $query,
|
||||
bool $warnedAboutLength
|
||||
): string {
|
||||
$GLOBALS['errors'] = $GLOBALS['errors'] ?? null;
|
||||
$GLOBALS['errors'] ??= null;
|
||||
|
||||
$itemReturnType = $_POST['item_returntype'] ?? null;
|
||||
|
||||
@ -958,7 +958,7 @@ class Routines
|
||||
*/
|
||||
public function getQueryFromRequest(): string
|
||||
{
|
||||
$GLOBALS['errors'] = $GLOBALS['errors'] ?? null;
|
||||
$GLOBALS['errors'] ??= null;
|
||||
|
||||
$itemType = $_POST['item_type'] ?? '';
|
||||
$itemDefiner = $_POST['item_definer'] ?? '';
|
||||
|
||||
@ -97,8 +97,8 @@ class Triggers
|
||||
*/
|
||||
public function handleEditor(): void
|
||||
{
|
||||
$GLOBALS['errors'] = $GLOBALS['errors'] ?? null;
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['errors'] ??= null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
|
||||
if (! empty($_POST['editor_process_add']) || ! empty($_POST['editor_process_edit'])) {
|
||||
$sql_query = '';
|
||||
@ -373,7 +373,7 @@ class Triggers
|
||||
*/
|
||||
public function getQueryFromRequest()
|
||||
{
|
||||
$GLOBALS['errors'] = $GLOBALS['errors'] ?? null;
|
||||
$GLOBALS['errors'] ??= null;
|
||||
|
||||
$query = 'CREATE ';
|
||||
if (! empty($_POST['item_definer'])) {
|
||||
|
||||
@ -22,8 +22,8 @@ final class DbTableExists
|
||||
|
||||
private static function checkDatabase(string $db, bool $isTransformationWrapper): void
|
||||
{
|
||||
$GLOBALS['message'] = $GLOBALS['message'] ?? null;
|
||||
$GLOBALS['show_as_php'] = $GLOBALS['show_as_php'] ?? null;
|
||||
$GLOBALS['message'] ??= null;
|
||||
$GLOBALS['show_as_php'] ??= null;
|
||||
|
||||
if (! empty($GLOBALS['is_db'])) {
|
||||
return;
|
||||
|
||||
@ -1247,7 +1247,7 @@ class Results
|
||||
*/
|
||||
private function getFullOrPartialTextButtonOrLink(): string
|
||||
{
|
||||
$GLOBALS['theme'] = $GLOBALS['theme'] ?? null;
|
||||
$GLOBALS['theme'] ??= null;
|
||||
|
||||
$urlParamsFullText = [
|
||||
'db' => $this->properties['db'],
|
||||
@ -1945,7 +1945,7 @@ class Results
|
||||
) {
|
||||
// Mostly because of browser transformations, to make the row-data accessible in a plugin.
|
||||
|
||||
$GLOBALS['row'] = $GLOBALS['row'] ?? null;
|
||||
$GLOBALS['row'] ??= null;
|
||||
|
||||
$tableBodyHtml = '';
|
||||
|
||||
|
||||
@ -130,8 +130,8 @@ class Export
|
||||
*/
|
||||
public function outputHandler(string $line): bool
|
||||
{
|
||||
$GLOBALS['time_start'] = $GLOBALS['time_start'] ?? null;
|
||||
$GLOBALS['save_filename'] = $GLOBALS['save_filename'] ?? null;
|
||||
$GLOBALS['time_start'] ??= null;
|
||||
$GLOBALS['save_filename'] ??= null;
|
||||
|
||||
// Kanji encoding convert feature
|
||||
if ($GLOBALS['output_kanji_conversion']) {
|
||||
@ -1079,7 +1079,7 @@ class Export
|
||||
*/
|
||||
public function showPage(string $exportType): void
|
||||
{
|
||||
$GLOBALS['active_page'] = $GLOBALS['active_page'] ?? null;
|
||||
$GLOBALS['active_page'] ??= null;
|
||||
$request = Common::getRequest();
|
||||
$container = Core::getContainerBuilder();
|
||||
if ($exportType === 'server') {
|
||||
|
||||
@ -213,7 +213,7 @@ final class Options
|
||||
|
||||
private function getFileNameTemplate(string $exportType, ?string $filename = null): string
|
||||
{
|
||||
$GLOBALS['config'] = $GLOBALS['config'] ?? null;
|
||||
$GLOBALS['config'] ??= null;
|
||||
|
||||
if ($filename !== null) {
|
||||
return $filename;
|
||||
|
||||
@ -130,7 +130,7 @@ class Footer
|
||||
*/
|
||||
public function getSelfUrl(): string
|
||||
{
|
||||
$GLOBALS['server'] = $GLOBALS['server'] ?? null;
|
||||
$GLOBALS['server'] ??= null;
|
||||
|
||||
$params = [];
|
||||
$params['route'] = Common::getRequest()->getRoute();
|
||||
|
||||
@ -260,7 +260,7 @@ class Header
|
||||
*/
|
||||
public function getDisplay(): string
|
||||
{
|
||||
$GLOBALS['theme'] = $GLOBALS['theme'] ?? null;
|
||||
$GLOBALS['theme'] ??= null;
|
||||
|
||||
if ($this->headerIsSent || ! $this->isEnabled) {
|
||||
return '';
|
||||
|
||||
@ -81,9 +81,9 @@ class Import
|
||||
*/
|
||||
public function checkTimeout(): bool
|
||||
{
|
||||
$GLOBALS['timestamp'] = $GLOBALS['timestamp'] ?? null;
|
||||
$GLOBALS['maximum_time'] = $GLOBALS['maximum_time'] ?? null;
|
||||
$GLOBALS['timeout_passed'] = $GLOBALS['timeout_passed'] ?? null;
|
||||
$GLOBALS['timestamp'] ??= null;
|
||||
$GLOBALS['maximum_time'] ??= null;
|
||||
$GLOBALS['timeout_passed'] ??= null;
|
||||
|
||||
if ($GLOBALS['maximum_time'] == 0) {
|
||||
return false;
|
||||
@ -113,11 +113,11 @@ class Import
|
||||
*/
|
||||
public function executeQuery(string $sql, array &$sqlData): void
|
||||
{
|
||||
$GLOBALS['my_die'] = $GLOBALS['my_die'] ?? null;
|
||||
$GLOBALS['error'] = $GLOBALS['error'] ?? null;
|
||||
$GLOBALS['reload'] = $GLOBALS['reload'] ?? null;
|
||||
$GLOBALS['msg'] = $GLOBALS['msg'] ?? null;
|
||||
$GLOBALS['sql_query_disabled'] = $GLOBALS['sql_query_disabled'] ?? null;
|
||||
$GLOBALS['my_die'] ??= null;
|
||||
$GLOBALS['error'] ??= null;
|
||||
$GLOBALS['reload'] ??= null;
|
||||
$GLOBALS['msg'] ??= null;
|
||||
$GLOBALS['sql_query_disabled'] ??= null;
|
||||
$GLOBALS['result'] = $GLOBALS['dbi']->tryQuery($sql);
|
||||
|
||||
// USE query changes the database, son need to track
|
||||
@ -186,15 +186,15 @@ class Import
|
||||
*/
|
||||
public function runQuery(string $sql, array &$sqlData): void
|
||||
{
|
||||
$GLOBALS['go_sql'] = $GLOBALS['go_sql'] ?? null;
|
||||
$GLOBALS['complete_query'] = $GLOBALS['complete_query'] ?? null;
|
||||
$GLOBALS['display_query'] = $GLOBALS['display_query'] ?? null;
|
||||
$GLOBALS['msg'] = $GLOBALS['msg'] ?? null;
|
||||
$GLOBALS['skip_queries'] = $GLOBALS['skip_queries'] ?? null;
|
||||
$GLOBALS['executed_queries'] = $GLOBALS['executed_queries'] ?? null;
|
||||
$GLOBALS['max_sql_len'] = $GLOBALS['max_sql_len'] ?? null;
|
||||
$GLOBALS['sql_query_disabled'] = $GLOBALS['sql_query_disabled'] ?? null;
|
||||
$GLOBALS['run_query'] = $GLOBALS['run_query'] ?? null;
|
||||
$GLOBALS['go_sql'] ??= null;
|
||||
$GLOBALS['complete_query'] ??= null;
|
||||
$GLOBALS['display_query'] ??= null;
|
||||
$GLOBALS['msg'] ??= null;
|
||||
$GLOBALS['skip_queries'] ??= null;
|
||||
$GLOBALS['executed_queries'] ??= null;
|
||||
$GLOBALS['max_sql_len'] ??= null;
|
||||
$GLOBALS['sql_query_disabled'] ??= null;
|
||||
$GLOBALS['run_query'] ??= null;
|
||||
|
||||
$GLOBALS['read_multiply'] = 1;
|
||||
if ($this->importRunBuffer === null) {
|
||||
@ -314,9 +314,9 @@ class Import
|
||||
*/
|
||||
public function getNextChunk(?File $importHandle = null, int $size = 32768): string|bool
|
||||
{
|
||||
$GLOBALS['charset_conversion'] = $GLOBALS['charset_conversion'] ?? null;
|
||||
$GLOBALS['charset_of_file'] = $GLOBALS['charset_of_file'] ?? null;
|
||||
$GLOBALS['read_multiply'] = $GLOBALS['read_multiply'] ?? null;
|
||||
$GLOBALS['charset_conversion'] ??= null;
|
||||
$GLOBALS['charset_of_file'] ??= null;
|
||||
$GLOBALS['read_multiply'] ??= null;
|
||||
|
||||
// Add some progression while reading large amount of data
|
||||
if ($GLOBALS['read_multiply'] <= 8) {
|
||||
@ -956,7 +956,7 @@ class Import
|
||||
?array $options = null,
|
||||
array &$sqlData = []
|
||||
): void {
|
||||
$GLOBALS['import_notice'] = $GLOBALS['import_notice'] ?? null;
|
||||
$GLOBALS['import_notice'] ??= null;
|
||||
|
||||
/* Needed to quell the beast that is Message */
|
||||
$GLOBALS['import_notice'] = null;
|
||||
|
||||
@ -285,7 +285,7 @@ class Navigation
|
||||
*/
|
||||
private function getLogoSource(): string
|
||||
{
|
||||
$GLOBALS['theme'] = $GLOBALS['theme'] ?? null;
|
||||
$GLOBALS['theme'] ??= null;
|
||||
|
||||
if ($GLOBALS['theme'] instanceof Theme) {
|
||||
if (@file_exists($GLOBALS['theme']->getFsPath() . 'img/logo_left.png')) {
|
||||
|
||||
@ -656,7 +656,7 @@ class Operations
|
||||
$transactional,
|
||||
$tableCollation
|
||||
) {
|
||||
$GLOBALS['auto_increment'] = $GLOBALS['auto_increment'] ?? null;
|
||||
$GLOBALS['auto_increment'] ??= null;
|
||||
|
||||
$tableAlters = [];
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
*/
|
||||
public function showLoginForm(): bool
|
||||
{
|
||||
$GLOBALS['conn_error'] = $GLOBALS['conn_error'] ?? null;
|
||||
$GLOBALS['conn_error'] ??= null;
|
||||
|
||||
$response = ResponseRenderer::getInstance();
|
||||
|
||||
@ -228,7 +228,7 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
*/
|
||||
public function readCredentials(): bool
|
||||
{
|
||||
$GLOBALS['conn_error'] = $GLOBALS['conn_error'] ?? null;
|
||||
$GLOBALS['conn_error'] ??= null;
|
||||
|
||||
// Initialization
|
||||
/**
|
||||
@ -581,7 +581,7 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
*/
|
||||
public function showFailure($failure): void
|
||||
{
|
||||
$GLOBALS['conn_error'] = $GLOBALS['conn_error'] ?? null;
|
||||
$GLOBALS['conn_error'] ??= null;
|
||||
|
||||
parent::showFailure($failure);
|
||||
|
||||
@ -684,7 +684,7 @@ class AuthenticationCookie extends AuthenticationPlugin
|
||||
*/
|
||||
public function logOut(): void
|
||||
{
|
||||
$GLOBALS['config'] = $GLOBALS['config'] ?? null;
|
||||
$GLOBALS['config'] ??= null;
|
||||
|
||||
// -> delete password cookie(s)
|
||||
if ($GLOBALS['cfg']['LoginCookieDeleteAll']) {
|
||||
|
||||
@ -108,7 +108,7 @@ abstract class AuthenticationPlugin
|
||||
*/
|
||||
public function logOut(): void
|
||||
{
|
||||
$GLOBALS['config'] = $GLOBALS['config'] ?? null;
|
||||
$GLOBALS['config'] ??= null;
|
||||
|
||||
/* Obtain redirect URL (before doing logout) */
|
||||
if (! empty($GLOBALS['cfg']['Server']['LogoutURL'])) {
|
||||
|
||||
@ -106,11 +106,11 @@ class ExportCsv extends ExportPlugin
|
||||
*/
|
||||
public function exportHeader(): bool
|
||||
{
|
||||
$GLOBALS['what'] = $GLOBALS['what'] ?? null;
|
||||
$GLOBALS['csv_terminated'] = $GLOBALS['csv_terminated'] ?? null;
|
||||
$GLOBALS['csv_separator'] = $GLOBALS['csv_separator'] ?? null;
|
||||
$GLOBALS['csv_enclosed'] = $GLOBALS['csv_enclosed'] ?? null;
|
||||
$GLOBALS['csv_escaped'] = $GLOBALS['csv_escaped'] ?? null;
|
||||
$GLOBALS['what'] ??= null;
|
||||
$GLOBALS['csv_terminated'] ??= null;
|
||||
$GLOBALS['csv_separator'] ??= null;
|
||||
$GLOBALS['csv_enclosed'] ??= null;
|
||||
$GLOBALS['csv_escaped'] ??= null;
|
||||
|
||||
// Here we just prepare some values for export
|
||||
if ($GLOBALS['what'] === 'excel') {
|
||||
@ -212,11 +212,11 @@ class ExportCsv extends ExportPlugin
|
||||
$sqlQuery,
|
||||
array $aliases = []
|
||||
): bool {
|
||||
$GLOBALS['what'] = $GLOBALS['what'] ?? null;
|
||||
$GLOBALS['csv_terminated'] = $GLOBALS['csv_terminated'] ?? null;
|
||||
$GLOBALS['csv_separator'] = $GLOBALS['csv_separator'] ?? '';
|
||||
$GLOBALS['csv_enclosed'] = $GLOBALS['csv_enclosed'] ?? null;
|
||||
$GLOBALS['csv_escaped'] = $GLOBALS['csv_escaped'] ?? null;
|
||||
$GLOBALS['what'] ??= null;
|
||||
$GLOBALS['csv_terminated'] ??= null;
|
||||
$GLOBALS['csv_separator'] ??= '';
|
||||
$GLOBALS['csv_enclosed'] ??= null;
|
||||
$GLOBALS['csv_escaped'] ??= null;
|
||||
|
||||
$db_alias = $db;
|
||||
$table_alias = $table;
|
||||
|
||||
@ -101,7 +101,7 @@ class ExportHtmlword extends ExportPlugin
|
||||
*/
|
||||
public function exportHeader(): bool
|
||||
{
|
||||
$GLOBALS['charset'] = $GLOBALS['charset'] ?? null;
|
||||
$GLOBALS['charset'] ??= null;
|
||||
|
||||
return $this->export->outputHandler(
|
||||
'<html xmlns:o="urn:schemas-microsoft-com:office:office"
|
||||
@ -182,7 +182,7 @@ class ExportHtmlword extends ExportPlugin
|
||||
$sqlQuery,
|
||||
array $aliases = []
|
||||
): bool {
|
||||
$GLOBALS['what'] = $GLOBALS['what'] ?? null;
|
||||
$GLOBALS['what'] ??= null;
|
||||
|
||||
$db_alias = $db;
|
||||
$table_alias = $table;
|
||||
|
||||
@ -56,7 +56,7 @@ class ExportLatex extends ExportPlugin
|
||||
|
||||
protected function setProperties(): ExportPluginProperties
|
||||
{
|
||||
$GLOBALS['plugin_param'] = $GLOBALS['plugin_param'] ?? null;
|
||||
$GLOBALS['plugin_param'] ??= null;
|
||||
|
||||
$hide_structure = false;
|
||||
if ($GLOBALS['plugin_param']['export_type'] === 'table' && ! $GLOBALS['plugin_param']['single_table']) {
|
||||
|
||||
@ -199,7 +199,7 @@ class ExportOds extends ExportPlugin
|
||||
$sqlQuery,
|
||||
array $aliases = []
|
||||
): bool {
|
||||
$GLOBALS['what'] = $GLOBALS['what'] ?? null;
|
||||
$GLOBALS['what'] ??= null;
|
||||
|
||||
$db_alias = $db;
|
||||
$table_alias = $table;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user