1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace PhpMyAdmin\Config; |
6
|
|
|
|
7
|
|
|
use PhpMyAdmin\Config\Settings\Console; |
8
|
|
|
use PhpMyAdmin\Config\Settings\Debug; |
9
|
|
|
use PhpMyAdmin\Config\Settings\Export; |
10
|
|
|
use PhpMyAdmin\Config\Settings\Import; |
11
|
|
|
use PhpMyAdmin\Config\Settings\Schema; |
12
|
|
|
use PhpMyAdmin\Config\Settings\Server; |
13
|
|
|
use PhpMyAdmin\Config\Settings\SqlQueryBox; |
14
|
|
|
use PhpMyAdmin\Config\Settings\Transformations; |
15
|
|
|
|
16
|
|
|
use function __; |
17
|
|
|
use function array_map; |
18
|
|
|
use function defined; |
19
|
|
|
use function in_array; |
20
|
|
|
use function is_array; |
21
|
|
|
use function is_int; |
22
|
|
|
use function is_string; |
23
|
|
|
use function min; |
24
|
|
|
use function sprintf; |
25
|
|
|
|
26
|
|
|
use const DIRECTORY_SEPARATOR; |
27
|
|
|
use const ROOT_PATH; |
28
|
|
|
use const TEMP_DIR; |
29
|
|
|
use const VERSION_CHECK_DEFAULT; |
30
|
|
|
|
31
|
|
|
// phpcs:disable Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @psalm-immutable |
35
|
|
|
* @psalm-import-type ConsoleSettingsType from Console |
36
|
|
|
* @psalm-import-type DebugSettingsType from Debug |
37
|
|
|
* @psalm-import-type ExportSettingsType from Export |
38
|
|
|
* @psalm-import-type ImportSettingsType from Import |
39
|
|
|
* @psalm-import-type SchemaSettingsType from Schema |
40
|
|
|
* @psalm-import-type ServerSettingsType from Server |
41
|
|
|
* @psalm-import-type SqlQueryBoxSettingsType from SqlQueryBox |
42
|
|
|
* @psalm-import-type TransformationsSettingsType from Transformations |
43
|
|
|
* @psalm-type SettingsType = array{ |
44
|
|
|
* PmaAbsoluteUri: string, |
45
|
|
|
* AuthLog: string, |
46
|
|
|
* AuthLogSuccess: bool, |
47
|
|
|
* PmaNoRelation_DisableWarning: bool, |
48
|
|
|
* SuhosinDisableWarning: bool, |
49
|
|
|
* LoginCookieValidityDisableWarning: bool, |
50
|
|
|
* ReservedWordDisableWarning: bool, |
51
|
|
|
* TranslationWarningThreshold: int, |
52
|
|
|
* AllowThirdPartyFraming: 'sameorigin'|bool, |
53
|
|
|
* blowfish_secret: string, |
54
|
|
|
* Servers: array<int<1, max>, ServerSettingsType>, |
55
|
|
|
* ServerDefault: int<0, max>, |
56
|
|
|
* VersionCheck: bool, |
57
|
|
|
* ProxyUrl: string, |
58
|
|
|
* ProxyUser: string, |
59
|
|
|
* ProxyPass: string, |
60
|
|
|
* MaxDbList: int<1, max>, |
61
|
|
|
* MaxTableList: int<1, max>, |
62
|
|
|
* ShowHint: bool, |
63
|
|
|
* MaxCharactersInDisplayedSQL: int<1, max>, |
64
|
|
|
* OBGzip: 'auto'|bool, |
65
|
|
|
* PersistentConnections: bool, |
66
|
|
|
* ExecTimeLimit: int<0, max>, |
67
|
|
|
* SessionSavePath: string, |
68
|
|
|
* MysqlSslWarningSafeHosts: array<string>, |
69
|
|
|
* MemoryLimit: string, |
70
|
|
|
* SkipLockedTables: bool, |
71
|
|
|
* ShowSQL: bool, |
72
|
|
|
* RetainQueryBox: bool, |
73
|
|
|
* CodemirrorEnable: bool, |
74
|
|
|
* LintEnable: bool, |
75
|
|
|
* AllowUserDropDatabase: bool, |
76
|
|
|
* Confirm: bool, |
77
|
|
|
* CookieSameSite: 'Lax'|'None'|'Strict', |
78
|
|
|
* LoginCookieRecall: bool, |
79
|
|
|
* LoginCookieValidity: int<1, max>, |
80
|
|
|
* LoginCookieStore: int<0, max>, |
81
|
|
|
* LoginCookieDeleteAll: bool, |
82
|
|
|
* UseDbSearch: bool, |
83
|
|
|
* IgnoreMultiSubmitErrors: bool, |
84
|
|
|
* URLQueryEncryption: bool, |
85
|
|
|
* URLQueryEncryptionSecretKey: string, |
86
|
|
|
* AllowArbitraryServer: bool, |
87
|
|
|
* ArbitraryServerRegexp: string, |
88
|
|
|
* CaptchaMethod: 'checkbox'|'invisible', |
89
|
|
|
* CaptchaApi: string, |
90
|
|
|
* CaptchaCsp: string, |
91
|
|
|
* CaptchaRequestParam: string, |
92
|
|
|
* CaptchaResponseParam: string, |
93
|
|
|
* CaptchaLoginPublicKey: string, |
94
|
|
|
* CaptchaLoginPrivateKey: string, |
95
|
|
|
* CaptchaSiteVerifyURL: string, |
96
|
|
|
* enable_drag_drop_import: bool, |
97
|
|
|
* ShowDatabasesNavigationAsTree: bool, |
98
|
|
|
* FirstLevelNavigationItems: int<1, max>, |
99
|
|
|
* MaxNavigationItems: int<1, max>, |
100
|
|
|
* NavigationTreeEnableGrouping: bool, |
101
|
|
|
* NavigationTreeDbSeparator: string, |
102
|
|
|
* NavigationTreeTableSeparator: array<string>|false|string, |
103
|
|
|
* NavigationTreeTableLevel: int<1, max>, |
104
|
|
|
* NavigationLinkWithMainPanel: bool, |
105
|
|
|
* NavigationDisplayLogo: bool, |
106
|
|
|
* NavigationLogoLink: string, |
107
|
|
|
* NavigationLogoLinkWindow: 'main'|'new', |
108
|
|
|
* NumRecentTables: int<0, max>, |
109
|
|
|
* NumFavoriteTables: int<0, max>, |
110
|
|
|
* NavigationTreeDisplayItemFilterMinimum: int<1, max>, |
111
|
|
|
* NavigationDisplayServers: bool, |
112
|
|
|
* DisplayServersList: bool, |
113
|
|
|
* NavigationTreeDisplayDbFilterMinimum: int<1, max>, |
114
|
|
|
* NavigationTreeDefaultTabTable: string, |
115
|
|
|
* NavigationTreeDefaultTabTable2: string, |
116
|
|
|
* NavigationTreeEnableExpansion: bool, |
117
|
|
|
* NavigationTreeShowTables: bool, |
118
|
|
|
* NavigationTreeShowViews: bool, |
119
|
|
|
* NavigationTreeShowFunctions: bool, |
120
|
|
|
* NavigationTreeShowProcedures: bool, |
121
|
|
|
* NavigationTreeShowEvents: bool, |
122
|
|
|
* NavigationWidth: int<0, max>, |
123
|
|
|
* NavigationTreeAutoexpandSingleDb: bool, |
124
|
|
|
* ShowStats: bool, |
125
|
|
|
* ShowPhpInfo: bool, |
126
|
|
|
* ShowServerInfo: 'database-server'|'web-server'|bool, |
127
|
|
|
* ShowChgPassword: bool, |
128
|
|
|
* ShowCreateDb: bool, |
129
|
|
|
* ShowDbStructureCharset: bool, |
130
|
|
|
* ShowDbStructureComment: bool, |
131
|
|
|
* ShowDbStructureCreation: bool, |
132
|
|
|
* ShowDbStructureLastUpdate: bool, |
133
|
|
|
* ShowDbStructureLastCheck: bool, |
134
|
|
|
* HideStructureActions: bool, |
135
|
|
|
* ShowColumnComments: bool, |
136
|
|
|
* TableNavigationLinksMode: 'both'|'icons'|'text', |
137
|
|
|
* ShowAll: bool, |
138
|
|
|
* MaxRows: int<1, max>, |
139
|
|
|
* Order: 'ASC'|'DESC'|'SMART', |
140
|
|
|
* SaveCellsAtOnce: bool, |
141
|
|
|
* GridEditing: 'click'|'disabled'|'double-click', |
142
|
|
|
* RelationalDisplay: 'D'|'K', |
143
|
|
|
* ProtectBinary: 'all'|'blob'|'noblob'|false, |
144
|
|
|
* ShowFunctionFields: bool, |
145
|
|
|
* ShowFieldTypesInDataEditView: bool, |
146
|
|
|
* CharEditing: 'input'|'textarea', |
147
|
|
|
* MinSizeForInputField: int<0, max>, |
148
|
|
|
* MaxSizeForInputField: int<1, max>, |
149
|
|
|
* InsertRows: int<1, max>, |
150
|
|
|
* ForeignKeyDropdownOrder: array{0: 'content-id'|'id-content', 1?: 'content-id'|'id-content'}, |
151
|
|
|
* ForeignKeyMaxLimit: int<1, max>, |
152
|
|
|
* DefaultForeignKeyChecks: 'default'|'disable'|'enable', |
153
|
|
|
* ZipDump: bool, |
154
|
|
|
* GZipDump: bool, |
155
|
|
|
* BZipDump: bool, |
156
|
|
|
* CompressOnFly: bool, |
157
|
|
|
* TabsMode: 'both'|'icons'|'text', |
158
|
|
|
* ActionLinksMode: 'both'|'icons'|'text', |
159
|
|
|
* PropertiesNumColumns: int<1, max>, |
160
|
|
|
* DefaultTabServer: string, |
161
|
|
|
* DefaultTabDatabase: string, |
162
|
|
|
* DefaultTabTable: string, |
163
|
|
|
* RowActionType: 'both'|'icons'|'text', |
164
|
|
|
* Export: ExportSettingsType, |
165
|
|
|
* Import: ImportSettingsType, |
166
|
|
|
* Schema: SchemaSettingsType, |
167
|
|
|
* PDFPageSizes: array<string>, |
168
|
|
|
* PDFDefaultPageSize: string, |
169
|
|
|
* DefaultLang: string, |
170
|
|
|
* DefaultConnectionCollation: string, |
171
|
|
|
* Lang: string, |
172
|
|
|
* FilterLanguages: string, |
173
|
|
|
* RecodingEngine: string, |
174
|
|
|
* IconvExtraParams: string, |
175
|
|
|
* AvailableCharsets: array<string>, |
176
|
|
|
* NavigationTreePointerEnable: bool, |
177
|
|
|
* BrowsePointerEnable: bool, |
178
|
|
|
* BrowseMarkerEnable: bool, |
179
|
|
|
* TextareaCols: int<1, max>, |
180
|
|
|
* TextareaRows: int<1, max>, |
181
|
|
|
* LongtextDoubleTextarea: bool, |
182
|
|
|
* TextareaAutoSelect: bool, |
183
|
|
|
* CharTextareaCols: int<1, max>, |
184
|
|
|
* CharTextareaRows: int<1, max>, |
185
|
|
|
* LimitChars: int<1, max>, |
186
|
|
|
* RowActionLinks: string, |
187
|
|
|
* RowActionLinksWithoutUnique: bool, |
188
|
|
|
* TablePrimaryKeyOrder: 'ASC'|'DESC'|'NONE', |
189
|
|
|
* RememberSorting: bool, |
190
|
|
|
* ShowBrowseComments: bool, |
191
|
|
|
* ShowPropertyComments: bool, |
192
|
|
|
* RepeatCells: int<0, max>, |
193
|
|
|
* QueryHistoryDB: bool, |
194
|
|
|
* QueryHistoryMax: int<1, max>, |
195
|
|
|
* AllowSharedBookmarks: bool, |
196
|
|
|
* BrowseMIME: bool, |
197
|
|
|
* MaxExactCount: int<1, max>, |
198
|
|
|
* MaxExactCountViews: int<0, max>, |
199
|
|
|
* NaturalOrder: bool, |
200
|
|
|
* InitialSlidersState: 'closed'|'disabled'|'open', |
201
|
|
|
* UserprefsDisallow: array<string>, |
202
|
|
|
* UserprefsDeveloperTab: bool, |
203
|
|
|
* TitleTable: string, |
204
|
|
|
* TitleDatabase: string, |
205
|
|
|
* TitleServer: string, |
206
|
|
|
* TitleDefault: string, |
207
|
|
|
* ThemeManager: bool, |
208
|
|
|
* ThemeDefault: string, |
209
|
|
|
* ThemePerServer: bool, |
210
|
|
|
* DefaultQueryTable: string, |
211
|
|
|
* DefaultQueryDatabase: string, |
212
|
|
|
* SQLQuery: SqlQueryBoxSettingsType, |
213
|
|
|
* EnableAutocompleteForTablesAndColumns: bool, |
214
|
|
|
* UploadDir: string, |
215
|
|
|
* SaveDir: string, |
216
|
|
|
* TempDir: string, |
217
|
|
|
* GD2Available: 'auto'|'no'|'yes', |
218
|
|
|
* TrustedProxies: array<string, string>, |
219
|
|
|
* CheckConfigurationPermissions: bool, |
220
|
|
|
* LinkLengthLimit: int<1, max>, |
221
|
|
|
* CSPAllow: string, |
222
|
|
|
* DisableMultiTableMaintenance: bool, |
223
|
|
|
* SendErrorReports: 'always'|'ask'|'never', |
224
|
|
|
* ConsoleEnterExecutes: bool, |
225
|
|
|
* ZeroConf: bool, |
226
|
|
|
* DBG: DebugSettingsType, |
227
|
|
|
* environment: 'development'|'production', |
228
|
|
|
* DefaultFunctions: array<string, string>, |
229
|
|
|
* maxRowPlotLimit: int<1, max>, |
230
|
|
|
* ShowGitRevision: bool, |
231
|
|
|
* MysqlMinVersion: array{internal: int, human: string}, |
232
|
|
|
* DisableShortcutKeys: bool, |
233
|
|
|
* Console: ConsoleSettingsType, |
234
|
|
|
* DefaultTransformations: TransformationsSettingsType, |
235
|
|
|
* FirstDayOfCalendar: int<0, max>, |
236
|
|
|
* } |
237
|
|
|
*/ |
238
|
|
|
final class Settings |
239
|
|
|
{ |
240
|
|
|
/** |
241
|
|
|
* Your phpMyAdmin URL. |
242
|
|
|
* |
243
|
|
|
* Complete the variable below with the full URL ie |
244
|
|
|
* https://example.com/path_to_your_phpMyAdmin_directory/ |
245
|
|
|
* |
246
|
|
|
* It must contain characters that are valid for a URL, and the path is |
247
|
|
|
* case-sensitive on some Web servers, for example Unix-based servers. |
248
|
|
|
* |
249
|
|
|
* In most cases you can leave this variable empty, as the correct value |
250
|
|
|
* will be detected automatically. However, we recommend that you do |
251
|
|
|
* test to see that the auto-detection code works in your system. A good |
252
|
|
|
* test is to browse a table, then edit a row and save it. There will be |
253
|
|
|
* an error message if phpMyAdmin cannot auto-detect the correct value. |
254
|
|
|
* |
255
|
|
|
* ```php |
256
|
|
|
* $cfg['PmaAbsoluteUri'] = ''; |
257
|
|
|
* ``` |
258
|
|
|
* |
259
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_PmaAbsoluteUri |
260
|
|
|
*/ |
261
|
|
|
public string $PmaAbsoluteUri; |
262
|
|
|
|
263
|
|
|
/** |
264
|
|
|
* Configure authentication logging destination |
265
|
|
|
* |
266
|
|
|
* ```php |
267
|
|
|
* $cfg['AuthLog'] = 'auto'; |
268
|
|
|
* ``` |
269
|
|
|
* |
270
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_AuthLog |
271
|
|
|
*/ |
272
|
|
|
public string $authLog; |
273
|
|
|
|
274
|
|
|
/** |
275
|
|
|
* Whether to log successful authentication attempts |
276
|
|
|
* |
277
|
|
|
* ```php |
278
|
|
|
* $cfg['AuthLogSuccess'] = false; |
279
|
|
|
* ``` |
280
|
|
|
* |
281
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_AuthLogSuccess |
282
|
|
|
*/ |
283
|
|
|
public bool $authLogSuccess; |
284
|
|
|
|
285
|
|
|
/** |
286
|
|
|
* Disable the default warning that is displayed on the DB Details Structure page if |
287
|
|
|
* any of the required Tables for the configuration storage could not be found |
288
|
|
|
* |
289
|
|
|
* ```php |
290
|
|
|
* $cfg['PmaNoRelation_DisableWarning'] = false; |
291
|
|
|
* ``` |
292
|
|
|
* |
293
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_PmaNoRelation_DisableWarning |
294
|
|
|
*/ |
295
|
|
|
public bool $PmaNoRelation_DisableWarning; |
296
|
|
|
|
297
|
|
|
/** |
298
|
|
|
* Disable the default warning that is displayed if Suhosin is detected |
299
|
|
|
* |
300
|
|
|
* ```php |
301
|
|
|
* $cfg['SuhosinDisableWarning'] = false; |
302
|
|
|
* ``` |
303
|
|
|
* |
304
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_SuhosinDisableWarning |
305
|
|
|
*/ |
306
|
|
|
public bool $SuhosinDisableWarning; |
307
|
|
|
|
308
|
|
|
/** |
309
|
|
|
* Disable the default warning that is displayed if session.gc_maxlifetime |
310
|
|
|
* is less than `LoginCookieValidity` |
311
|
|
|
* |
312
|
|
|
* ```php |
313
|
|
|
* $cfg['LoginCookieValidityDisableWarning'] = false; |
314
|
|
|
* ``` |
315
|
|
|
* |
316
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_LoginCookieValidityDisableWarning |
317
|
|
|
*/ |
318
|
|
|
public bool $LoginCookieValidityDisableWarning; |
319
|
|
|
|
320
|
|
|
/** |
321
|
|
|
* Disable the default warning about MySQL reserved words in column names |
322
|
|
|
* |
323
|
|
|
* ```php |
324
|
|
|
* $cfg['ReservedWordDisableWarning'] = false; |
325
|
|
|
* ``` |
326
|
|
|
* |
327
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ReservedWordDisableWarning |
328
|
|
|
*/ |
329
|
|
|
public bool $ReservedWordDisableWarning; |
330
|
|
|
|
331
|
|
|
/** |
332
|
|
|
* Show warning about incomplete translations on certain threshold. |
333
|
|
|
* |
334
|
|
|
* ```php |
335
|
|
|
* $cfg['TranslationWarningThreshold'] = 80; |
336
|
|
|
* ``` |
337
|
|
|
* |
338
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_TranslationWarningThreshold |
339
|
|
|
*/ |
340
|
|
|
public int $TranslationWarningThreshold; |
341
|
|
|
|
342
|
|
|
/** |
343
|
|
|
* Allows phpMyAdmin to be included from a other document in a frame; |
344
|
|
|
* setting this to true is a potential security hole. Setting this to |
345
|
|
|
* 'sameorigin' prevents phpMyAdmin to be included from another document |
346
|
|
|
* in a frame, unless that document belongs to the same domain. |
347
|
|
|
* |
348
|
|
|
* ```php |
349
|
|
|
* $cfg['AllowThirdPartyFraming'] = false; |
350
|
|
|
* ``` |
351
|
|
|
* |
352
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_AllowThirdPartyFraming |
353
|
|
|
* |
354
|
|
|
* @psalm-var bool|'sameorigin' |
355
|
|
|
*/ |
356
|
|
|
public bool|string $AllowThirdPartyFraming; |
357
|
|
|
|
358
|
|
|
/** |
359
|
|
|
* The 'cookie' auth_type uses the Sodium extension to encrypt the cookies. If at least one server configuration |
360
|
|
|
* uses 'cookie' auth_type, enter here a generated string of random bytes to be used as an encryption key. The |
361
|
|
|
* encryption key must be 32 bytes long. |
362
|
|
|
* |
363
|
|
|
* ```php |
364
|
|
|
* $cfg['blowfish_secret'] = ''; |
365
|
|
|
* ``` |
366
|
|
|
* |
367
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_blowfish_secret |
368
|
|
|
*/ |
369
|
|
|
public string $blowfish_secret; |
370
|
|
|
|
371
|
|
|
/** |
372
|
|
|
* Server(s) configuration |
373
|
|
|
* |
374
|
|
|
* The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use |
375
|
|
|
* $cfg['Servers'][0]. You can disable a server configuration entry by setting host |
376
|
|
|
* to ''. If you want more than one server, just copy following section |
377
|
|
|
* (including $i incrementation) several times. There is no need to define |
378
|
|
|
* full server array, just define values you need to change. |
379
|
|
|
* |
380
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_Servers |
381
|
|
|
* |
382
|
|
|
* @var array<int, Server> |
383
|
|
|
* @psalm-var array<int<1, max>, Server> |
384
|
|
|
*/ |
385
|
|
|
public array $Servers; |
386
|
|
|
|
387
|
|
|
/** |
388
|
|
|
* Default server (0 = no default server) |
389
|
|
|
* |
390
|
|
|
* If you have more than one server configured, you can set $cfg['ServerDefault'] |
391
|
|
|
* to any one of them to auto-connect to that server when phpMyAdmin is started, |
392
|
|
|
* or set it to 0 to be given a list of servers without logging in |
393
|
|
|
* If you have only one server configured, $cfg['ServerDefault'] *MUST* be |
394
|
|
|
* set to that server. |
395
|
|
|
* |
396
|
|
|
* ```php |
397
|
|
|
* $cfg['ServerDefault'] = 1; |
398
|
|
|
* ``` |
399
|
|
|
* |
400
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ServerDefault |
401
|
|
|
* |
402
|
|
|
* @psalm-var 0|positive-int |
403
|
|
|
*/ |
404
|
|
|
public int $ServerDefault; |
405
|
|
|
|
406
|
|
|
/** |
407
|
|
|
* whether version check is active |
408
|
|
|
* |
409
|
|
|
* ```php |
410
|
|
|
* $cfg['VersionCheck'] = true; |
411
|
|
|
* ``` |
412
|
|
|
* |
413
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_VersionCheck |
414
|
|
|
*/ |
415
|
|
|
public bool $VersionCheck; |
416
|
|
|
|
417
|
|
|
/** |
418
|
|
|
* The url of the proxy to be used when retrieving the information about |
419
|
|
|
* the latest version of phpMyAdmin or error reporting. You need this if |
420
|
|
|
* the server where phpMyAdmin is installed does not have direct access to |
421
|
|
|
* the internet. |
422
|
|
|
* The format is: "hostname:portnumber" |
423
|
|
|
* |
424
|
|
|
* ```php |
425
|
|
|
* $cfg['ProxyUrl'] = ''; |
426
|
|
|
* ``` |
427
|
|
|
* |
428
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ProxyUrl |
429
|
|
|
*/ |
430
|
|
|
public string $ProxyUrl; |
431
|
|
|
|
432
|
|
|
/** |
433
|
|
|
* The username for authenticating with the proxy. By default, no |
434
|
|
|
* authentication is performed. If a username is supplied, Basic |
435
|
|
|
* Authentication will be performed. No other types of authentication |
436
|
|
|
* are currently supported. |
437
|
|
|
* |
438
|
|
|
* ```php |
439
|
|
|
* $cfg['ProxyUser'] = ''; |
440
|
|
|
* ``` |
441
|
|
|
* |
442
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ProxyUser |
443
|
|
|
*/ |
444
|
|
|
public string $ProxyUser; |
445
|
|
|
|
446
|
|
|
/** |
447
|
|
|
* The password for authenticating with the proxy. |
448
|
|
|
* |
449
|
|
|
* ```php |
450
|
|
|
* $cfg['ProxyPass'] = ''; |
451
|
|
|
* ``` |
452
|
|
|
* |
453
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ProxyPass |
454
|
|
|
*/ |
455
|
|
|
public string $ProxyPass; |
456
|
|
|
|
457
|
|
|
/** |
458
|
|
|
* maximum number of db's displayed in database list |
459
|
|
|
* |
460
|
|
|
* ```php |
461
|
|
|
* $cfg['MaxDbList'] = 100; |
462
|
|
|
* ``` |
463
|
|
|
* |
464
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_MaxDbList |
465
|
|
|
* |
466
|
|
|
* @psalm-var positive-int |
467
|
|
|
*/ |
468
|
|
|
public int $MaxDbList; |
469
|
|
|
|
470
|
|
|
/** |
471
|
|
|
* maximum number of tables displayed in table list |
472
|
|
|
* |
473
|
|
|
* ```php |
474
|
|
|
* $cfg['MaxTableList'] = 250; |
475
|
|
|
* ``` |
476
|
|
|
* |
477
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_MaxTableList |
478
|
|
|
* |
479
|
|
|
* @psalm-var positive-int |
480
|
|
|
*/ |
481
|
|
|
public int $MaxTableList; |
482
|
|
|
|
483
|
|
|
/** |
484
|
|
|
* whether to show hint or not |
485
|
|
|
* |
486
|
|
|
* ```php |
487
|
|
|
* $cfg['ShowHint'] = true; |
488
|
|
|
* ``` |
489
|
|
|
* |
490
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowHint |
491
|
|
|
*/ |
492
|
|
|
public bool $ShowHint; |
493
|
|
|
|
494
|
|
|
/** |
495
|
|
|
* maximum number of characters when a SQL query is displayed |
496
|
|
|
* |
497
|
|
|
* ```php |
498
|
|
|
* $cfg['MaxCharactersInDisplayedSQL'] = 1000; |
499
|
|
|
* ``` |
500
|
|
|
* |
501
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_MaxCharactersInDisplayedSQL |
502
|
|
|
* |
503
|
|
|
* @psalm-var positive-int |
504
|
|
|
*/ |
505
|
|
|
public int $MaxCharactersInDisplayedSQL; |
506
|
|
|
|
507
|
|
|
/** |
508
|
|
|
* use GZIP output buffering if possible (true|false|'auto') |
509
|
|
|
* |
510
|
|
|
* ```php |
511
|
|
|
* $cfg['OBGzip'] = 'auto'; |
512
|
|
|
* ``` |
513
|
|
|
* |
514
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_OBGzip |
515
|
|
|
* |
516
|
|
|
* @psalm-var 'auto'|bool |
517
|
|
|
*/ |
518
|
|
|
public string|bool $OBGzip; |
519
|
|
|
|
520
|
|
|
/** |
521
|
|
|
* use persistent connections to MySQL database |
522
|
|
|
* |
523
|
|
|
* ```php |
524
|
|
|
* $cfg['PersistentConnections'] = false; |
525
|
|
|
* ``` |
526
|
|
|
* |
527
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_PersistentConnections |
528
|
|
|
*/ |
529
|
|
|
public bool $PersistentConnections; |
530
|
|
|
|
531
|
|
|
/** |
532
|
|
|
* maximum execution time in seconds (0 for no limit) |
533
|
|
|
* |
534
|
|
|
* ```php |
535
|
|
|
* $cfg['ExecTimeLimit'] = 300; |
536
|
|
|
* ``` |
537
|
|
|
* |
538
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ExecTimeLimit |
539
|
|
|
* |
540
|
|
|
* @psalm-var 0|positive-int |
541
|
|
|
*/ |
542
|
|
|
public int $ExecTimeLimit; |
543
|
|
|
|
544
|
|
|
/** |
545
|
|
|
* Path for storing session data (session_save_path PHP parameter). |
546
|
|
|
* |
547
|
|
|
* ```php |
548
|
|
|
* $cfg['SessionSavePath'] = ''; |
549
|
|
|
* ``` |
550
|
|
|
* |
551
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_SessionSavePath |
552
|
|
|
*/ |
553
|
|
|
public string $SessionSavePath; |
554
|
|
|
|
555
|
|
|
/** |
556
|
|
|
* Hosts or IPs to consider safe when checking if SSL is used or not |
557
|
|
|
* |
558
|
|
|
* ```php |
559
|
|
|
* $cfg['MysqlSslWarningSafeHosts'] = ['127.0.0.1', 'localhost']; |
560
|
|
|
* ``` |
561
|
|
|
* |
562
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_MysqlSslWarningSafeHosts |
563
|
|
|
* |
564
|
|
|
* @var string[] |
565
|
|
|
*/ |
566
|
|
|
public array $MysqlSslWarningSafeHosts; |
567
|
|
|
|
568
|
|
|
/** |
569
|
|
|
* maximum allocated bytes ('-1' for no limit, '0' for no change) |
570
|
|
|
* this is a string because '16M' is a valid value; we must put here |
571
|
|
|
* a string as the default value so that /setup accepts strings |
572
|
|
|
* |
573
|
|
|
* ```php |
574
|
|
|
* $cfg['MemoryLimit'] = '-1'; |
575
|
|
|
* ``` |
576
|
|
|
* |
577
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_MemoryLimit |
578
|
|
|
*/ |
579
|
|
|
public string $MemoryLimit; |
580
|
|
|
|
581
|
|
|
/** |
582
|
|
|
* mark used tables, make possible to show locked tables (since MySQL 3.23.30) |
583
|
|
|
* |
584
|
|
|
* ```php |
585
|
|
|
* $cfg['SkipLockedTables'] = false; |
586
|
|
|
* ``` |
587
|
|
|
* |
588
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_SkipLockedTables |
589
|
|
|
*/ |
590
|
|
|
public bool $SkipLockedTables; |
591
|
|
|
|
592
|
|
|
/** |
593
|
|
|
* show SQL queries as run |
594
|
|
|
* |
595
|
|
|
* ```php |
596
|
|
|
* $cfg['ShowSQL'] = true; |
597
|
|
|
* ``` |
598
|
|
|
* |
599
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowSQL |
600
|
|
|
*/ |
601
|
|
|
public bool $ShowSQL; |
602
|
|
|
|
603
|
|
|
/** |
604
|
|
|
* retain SQL input on Ajax execute |
605
|
|
|
* |
606
|
|
|
* ```php |
607
|
|
|
* $cfg['RetainQueryBox'] = false; |
608
|
|
|
* ``` |
609
|
|
|
* |
610
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_RetainQueryBox |
611
|
|
|
*/ |
612
|
|
|
public bool $RetainQueryBox; |
613
|
|
|
|
614
|
|
|
/** |
615
|
|
|
* use CodeMirror syntax highlighting for editing SQL |
616
|
|
|
* |
617
|
|
|
* ```php |
618
|
|
|
* $cfg['CodemirrorEnable'] = true; |
619
|
|
|
* ``` |
620
|
|
|
* |
621
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CodemirrorEnable |
622
|
|
|
*/ |
623
|
|
|
public bool $CodemirrorEnable; |
624
|
|
|
|
625
|
|
|
/** |
626
|
|
|
* use the parser to find any errors in the query before executing |
627
|
|
|
* |
628
|
|
|
* ```php |
629
|
|
|
* $cfg['LintEnable'] = true; |
630
|
|
|
* ``` |
631
|
|
|
* |
632
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_LintEnable |
633
|
|
|
*/ |
634
|
|
|
public bool $LintEnable; |
635
|
|
|
|
636
|
|
|
/** |
637
|
|
|
* show a 'Drop database' link to normal users |
638
|
|
|
* |
639
|
|
|
* ```php |
640
|
|
|
* $cfg['AllowUserDropDatabase'] = false; |
641
|
|
|
* ``` |
642
|
|
|
* |
643
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_AllowUserDropDatabase |
644
|
|
|
*/ |
645
|
|
|
public bool $AllowUserDropDatabase; |
646
|
|
|
|
647
|
|
|
/** |
648
|
|
|
* confirm some commands that can result in loss of data |
649
|
|
|
* |
650
|
|
|
* ```php |
651
|
|
|
* $cfg['Confirm'] = true; |
652
|
|
|
* ``` |
653
|
|
|
* |
654
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_Confirm |
655
|
|
|
*/ |
656
|
|
|
public bool $Confirm; |
657
|
|
|
|
658
|
|
|
/** |
659
|
|
|
* sets SameSite attribute of the Set-Cookie HTTP response header |
660
|
|
|
* |
661
|
|
|
* ```php |
662
|
|
|
* $cfg['CookieSameSite'] = 'Strict'; |
663
|
|
|
* ``` |
664
|
|
|
* |
665
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CookieSameSite |
666
|
|
|
* |
667
|
|
|
* @psalm-var 'Lax'|'Strict'|'None' |
668
|
|
|
*/ |
669
|
|
|
public string $CookieSameSite; |
670
|
|
|
|
671
|
|
|
/** |
672
|
|
|
* recall previous login in cookie authentication mode or not |
673
|
|
|
* |
674
|
|
|
* ```php |
675
|
|
|
* $cfg['LoginCookieRecall'] = true; |
676
|
|
|
* ``` |
677
|
|
|
* |
678
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_LoginCookieRecall |
679
|
|
|
*/ |
680
|
|
|
public bool $LoginCookieRecall; |
681
|
|
|
|
682
|
|
|
/** |
683
|
|
|
* validity of cookie login (in seconds; 1440 matches php.ini's |
684
|
|
|
* session.gc_maxlifetime) |
685
|
|
|
* |
686
|
|
|
* ```php |
687
|
|
|
* $cfg['LoginCookieValidity'] = 1440; |
688
|
|
|
* ``` |
689
|
|
|
* |
690
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_LoginCookieValidity |
691
|
|
|
* |
692
|
|
|
* @psalm-var positive-int |
693
|
|
|
*/ |
694
|
|
|
public int $LoginCookieValidity; |
695
|
|
|
|
696
|
|
|
/** |
697
|
|
|
* how long login cookie should be stored (in seconds) |
698
|
|
|
* |
699
|
|
|
* ```php |
700
|
|
|
* $cfg['LoginCookieStore'] = 0; |
701
|
|
|
* ``` |
702
|
|
|
* |
703
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_LoginCookieStore |
704
|
|
|
* |
705
|
|
|
* @psalm-var 0|positive-int |
706
|
|
|
*/ |
707
|
|
|
public int $LoginCookieStore; |
708
|
|
|
|
709
|
|
|
/** |
710
|
|
|
* whether to delete all login cookies on logout |
711
|
|
|
* |
712
|
|
|
* ```php |
713
|
|
|
* $cfg['LoginCookieDeleteAll'] = true; |
714
|
|
|
* ``` |
715
|
|
|
* |
716
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_LoginCookieDeleteAll |
717
|
|
|
*/ |
718
|
|
|
public bool $LoginCookieDeleteAll; |
719
|
|
|
|
720
|
|
|
/** |
721
|
|
|
* whether to enable the "database search" feature or not |
722
|
|
|
* |
723
|
|
|
* ```php |
724
|
|
|
* $cfg['UseDbSearch'] = true; |
725
|
|
|
* ``` |
726
|
|
|
* |
727
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_UseDbSearch |
728
|
|
|
*/ |
729
|
|
|
public bool $UseDbSearch; |
730
|
|
|
|
731
|
|
|
/** |
732
|
|
|
* if set to true, PMA continues computing multiple-statement queries |
733
|
|
|
* even if one of the queries failed |
734
|
|
|
* |
735
|
|
|
* ```php |
736
|
|
|
* $cfg['IgnoreMultiSubmitErrors'] = false; |
737
|
|
|
* ``` |
738
|
|
|
* |
739
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_IgnoreMultiSubmitErrors |
740
|
|
|
*/ |
741
|
|
|
public bool $IgnoreMultiSubmitErrors; |
742
|
|
|
|
743
|
|
|
/** |
744
|
|
|
* Define whether phpMyAdmin will encrypt sensitive data from the URL query string. |
745
|
|
|
* |
746
|
|
|
* ```php |
747
|
|
|
* $cfg['URLQueryEncryption'] = false; |
748
|
|
|
* ``` |
749
|
|
|
* |
750
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_URLQueryEncryption |
751
|
|
|
*/ |
752
|
|
|
public bool $URLQueryEncryption; |
753
|
|
|
|
754
|
|
|
/** |
755
|
|
|
* A secret key used to encrypt/decrypt the URL query string. Should be 32 bytes long. |
756
|
|
|
* |
757
|
|
|
* ```php |
758
|
|
|
* $cfg['URLQueryEncryptionSecretKey'] = ''; |
759
|
|
|
* ``` |
760
|
|
|
* |
761
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_URLQueryEncryptionSecretKey |
762
|
|
|
*/ |
763
|
|
|
public string $URLQueryEncryptionSecretKey; |
764
|
|
|
|
765
|
|
|
/** |
766
|
|
|
* allow login to any user entered server in cookie based authentication |
767
|
|
|
* |
768
|
|
|
* ```php |
769
|
|
|
* $cfg['AllowArbitraryServer'] = false; |
770
|
|
|
* ``` |
771
|
|
|
* |
772
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_AllowArbitraryServer |
773
|
|
|
*/ |
774
|
|
|
public bool $AllowArbitraryServer; |
775
|
|
|
|
776
|
|
|
/** |
777
|
|
|
* restrict by IP (with regular expression) the MySQL servers the user can enter |
778
|
|
|
* when $cfg['AllowArbitraryServer'] = true |
779
|
|
|
* |
780
|
|
|
* ```php |
781
|
|
|
* $cfg['ArbitraryServerRegexp'] = ''; |
782
|
|
|
* ``` |
783
|
|
|
* |
784
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ArbitraryServerRegexp |
785
|
|
|
*/ |
786
|
|
|
public string $ArbitraryServerRegexp; |
787
|
|
|
|
788
|
|
|
/** |
789
|
|
|
* To enable reCaptcha v2 checkbox mode if necessary |
790
|
|
|
* |
791
|
|
|
* ```php |
792
|
|
|
* $cfg['CaptchaMethod'] = 'invisible'; |
793
|
|
|
* ``` |
794
|
|
|
* |
795
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CaptchaMethod |
796
|
|
|
* |
797
|
|
|
* @psalm-var 'invisible'|'checkbox' |
798
|
|
|
*/ |
799
|
|
|
public string $CaptchaMethod; |
800
|
|
|
|
801
|
|
|
/** |
802
|
|
|
* URL for the reCaptcha v2 compatible API to use |
803
|
|
|
* |
804
|
|
|
* ```php |
805
|
|
|
* $cfg['CaptchaApi'] = 'https://www.google.com/recaptcha/api.js'; |
806
|
|
|
* ``` |
807
|
|
|
* |
808
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CaptchaApi |
809
|
|
|
*/ |
810
|
|
|
public string $CaptchaApi; |
811
|
|
|
|
812
|
|
|
/** |
813
|
|
|
* Content-Security-Policy snippet for the reCaptcha v2 compatible API |
814
|
|
|
* |
815
|
|
|
* ```php |
816
|
|
|
* $cfg['CaptchaCsp'] = 'https://apis.google.com https://www.google.com/recaptcha/' |
817
|
|
|
* . ' https://www.gstatic.com/recaptcha/ https://ssl.gstatic.com/'; |
818
|
|
|
* ``` |
819
|
|
|
* |
820
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CaptchaCsp |
821
|
|
|
*/ |
822
|
|
|
public string $CaptchaCsp; |
823
|
|
|
|
824
|
|
|
/** |
825
|
|
|
* reCaptcha API's request parameter name |
826
|
|
|
* |
827
|
|
|
* ```php |
828
|
|
|
* $cfg['CaptchaRequestParam'] = 'g-recaptcha'; |
829
|
|
|
* ``` |
830
|
|
|
* |
831
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CaptchaRequestParam |
832
|
|
|
*/ |
833
|
|
|
public string $CaptchaRequestParam; |
834
|
|
|
|
835
|
|
|
/** |
836
|
|
|
* reCaptcha API's response parameter name |
837
|
|
|
* |
838
|
|
|
* ```php |
839
|
|
|
* $cfg['CaptchaResponseParam'] = 'g-recaptcha-response'; |
840
|
|
|
* ``` |
841
|
|
|
* |
842
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CaptchaResponseParam |
843
|
|
|
*/ |
844
|
|
|
public string $CaptchaResponseParam; |
845
|
|
|
|
846
|
|
|
/** |
847
|
|
|
* if reCaptcha is enabled it needs public key to connect with the service |
848
|
|
|
* |
849
|
|
|
* ```php |
850
|
|
|
* $cfg['CaptchaLoginPublicKey'] = ''; |
851
|
|
|
* ``` |
852
|
|
|
* |
853
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CaptchaLoginPublicKey |
854
|
|
|
*/ |
855
|
|
|
public string $CaptchaLoginPublicKey; |
856
|
|
|
|
857
|
|
|
/** |
858
|
|
|
* if reCaptcha is enabled it needs private key to connect with the service |
859
|
|
|
* |
860
|
|
|
* ```php |
861
|
|
|
* $cfg['CaptchaLoginPrivateKey'] = ''; |
862
|
|
|
* ``` |
863
|
|
|
* |
864
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CaptchaLoginPrivateKey |
865
|
|
|
*/ |
866
|
|
|
public string $CaptchaLoginPrivateKey; |
867
|
|
|
|
868
|
|
|
/** |
869
|
|
|
* if reCaptcha is enabled may need an URL for site verify |
870
|
|
|
* |
871
|
|
|
* ```php |
872
|
|
|
* $cfg['CaptchaSiteVerifyURL'] = ''; |
873
|
|
|
* ``` |
874
|
|
|
* |
875
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CaptchaSiteVerifyURL |
876
|
|
|
*/ |
877
|
|
|
public string $CaptchaSiteVerifyURL; |
878
|
|
|
|
879
|
|
|
/** |
880
|
|
|
* Enable drag and drop import |
881
|
|
|
* |
882
|
|
|
* ```php |
883
|
|
|
* $cfg['enable_drag_drop_import'] = true; |
884
|
|
|
* ``` |
885
|
|
|
* |
886
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_enable_drag_drop_import |
887
|
|
|
* @see https://github.com/phpmyadmin/phpmyadmin/issues/13155 |
888
|
|
|
*/ |
889
|
|
|
public bool $enable_drag_drop_import; |
890
|
|
|
|
891
|
|
|
/** |
892
|
|
|
* In the navigation panel, replaces the database tree with a selector |
893
|
|
|
* |
894
|
|
|
* ```php |
895
|
|
|
* $cfg['ShowDatabasesNavigationAsTree'] = true; |
896
|
|
|
* ``` |
897
|
|
|
* |
898
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowDatabasesNavigationAsTree |
899
|
|
|
*/ |
900
|
|
|
public bool $ShowDatabasesNavigationAsTree; |
901
|
|
|
|
902
|
|
|
/** |
903
|
|
|
* maximum number of first level databases displayed in navigation panel |
904
|
|
|
* |
905
|
|
|
* ```php |
906
|
|
|
* $cfg['FirstLevelNavigationItems'] = 100; |
907
|
|
|
* ``` |
908
|
|
|
* |
909
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_FirstLevelNavigationItems |
910
|
|
|
* |
911
|
|
|
* @psalm-var positive-int |
912
|
|
|
*/ |
913
|
|
|
public int $FirstLevelNavigationItems; |
914
|
|
|
|
915
|
|
|
/** |
916
|
|
|
* maximum number of items displayed in navigation panel |
917
|
|
|
* |
918
|
|
|
* ```php |
919
|
|
|
* $cfg['MaxNavigationItems'] = 50; |
920
|
|
|
* ``` |
921
|
|
|
* |
922
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_MaxNavigationItems |
923
|
|
|
* |
924
|
|
|
* @psalm-var positive-int |
925
|
|
|
*/ |
926
|
|
|
public int $MaxNavigationItems; |
927
|
|
|
|
928
|
|
|
/** |
929
|
|
|
* turn the select-based light menu into a tree |
930
|
|
|
* |
931
|
|
|
* ```php |
932
|
|
|
* $cfg['NavigationTreeEnableGrouping'] = true; |
933
|
|
|
* ``` |
934
|
|
|
* |
935
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeEnableGrouping |
936
|
|
|
*/ |
937
|
|
|
public bool $NavigationTreeEnableGrouping; |
938
|
|
|
|
939
|
|
|
/** |
940
|
|
|
* the separator to sub-tree the select-based light menu tree |
941
|
|
|
* |
942
|
|
|
* ```php |
943
|
|
|
* $cfg['NavigationTreeDbSeparator'] = '_'; |
944
|
|
|
* ``` |
945
|
|
|
* |
946
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeDbSeparator |
947
|
|
|
*/ |
948
|
|
|
public string $NavigationTreeDbSeparator; |
949
|
|
|
|
950
|
|
|
/** |
951
|
|
|
* Which string will be used to generate table prefixes |
952
|
|
|
* to split/nest tables into multiple categories |
953
|
|
|
* |
954
|
|
|
* ```php |
955
|
|
|
* $cfg['NavigationTreeTableSeparator'] = '__'; |
956
|
|
|
* ``` |
957
|
|
|
* |
958
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeTableSeparator |
959
|
|
|
* |
960
|
|
|
* @var string|string[]|false |
961
|
|
|
*/ |
962
|
|
|
public string|array|false $NavigationTreeTableSeparator; |
963
|
|
|
|
964
|
|
|
/** |
965
|
|
|
* How many sublevels should be displayed when splitting up tables |
966
|
|
|
* by the above Separator |
967
|
|
|
* |
968
|
|
|
* ```php |
969
|
|
|
* $cfg['NavigationTreeTableLevel'] = 1; |
970
|
|
|
* ``` |
971
|
|
|
* |
972
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeTableLevel |
973
|
|
|
* |
974
|
|
|
* @psalm-var positive-int |
975
|
|
|
*/ |
976
|
|
|
public int $NavigationTreeTableLevel; |
977
|
|
|
|
978
|
|
|
/** |
979
|
|
|
* link with main panel by highlighting the current db/table |
980
|
|
|
* |
981
|
|
|
* ```php |
982
|
|
|
* $cfg['NavigationLinkWithMainPanel'] = true; |
983
|
|
|
* ``` |
984
|
|
|
* |
985
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationLinkWithMainPanel |
986
|
|
|
*/ |
987
|
|
|
public bool $NavigationLinkWithMainPanel; |
988
|
|
|
|
989
|
|
|
/** |
990
|
|
|
* display logo at top of navigation panel |
991
|
|
|
* |
992
|
|
|
* ```php |
993
|
|
|
* $cfg['NavigationDisplayLogo'] = true; |
994
|
|
|
* ``` |
995
|
|
|
* |
996
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationDisplayLogo |
997
|
|
|
*/ |
998
|
|
|
public bool $NavigationDisplayLogo; |
999
|
|
|
|
1000
|
|
|
/** |
1001
|
|
|
* where should logo link point to (can also contain an external URL) |
1002
|
|
|
* |
1003
|
|
|
* ```php |
1004
|
|
|
* $cfg['NavigationLogoLink'] = 'index.php'; |
1005
|
|
|
* ``` |
1006
|
|
|
* |
1007
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationLogoLink |
1008
|
|
|
*/ |
1009
|
|
|
public string $NavigationLogoLink; |
1010
|
|
|
|
1011
|
|
|
/** |
1012
|
|
|
* whether to open the linked page in the main window ('main') or |
1013
|
|
|
* in a new window ('new') |
1014
|
|
|
* |
1015
|
|
|
* ```php |
1016
|
|
|
* $cfg['NavigationLogoLinkWindow'] = 'main'; |
1017
|
|
|
* ``` |
1018
|
|
|
* |
1019
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationLogoLinkWindow |
1020
|
|
|
* |
1021
|
|
|
* @psalm-var 'main'|'new' |
1022
|
|
|
*/ |
1023
|
|
|
public string $NavigationLogoLinkWindow; |
1024
|
|
|
|
1025
|
|
|
/** |
1026
|
|
|
* number of recently used tables displayed in the navigation panel |
1027
|
|
|
* |
1028
|
|
|
* ```php |
1029
|
|
|
* $cfg['NumRecentTables'] = 10; |
1030
|
|
|
* ``` |
1031
|
|
|
* |
1032
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NumRecentTables |
1033
|
|
|
* |
1034
|
|
|
* @psalm-var 0|positive-int |
1035
|
|
|
*/ |
1036
|
|
|
public int $NumRecentTables; |
1037
|
|
|
|
1038
|
|
|
/** |
1039
|
|
|
* number of favorite tables displayed in the navigation panel |
1040
|
|
|
* |
1041
|
|
|
* ```php |
1042
|
|
|
* $cfg['NumFavoriteTables'] = 10; |
1043
|
|
|
* ``` |
1044
|
|
|
* |
1045
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NumFavoriteTables |
1046
|
|
|
* |
1047
|
|
|
* @psalm-var 0|positive-int |
1048
|
|
|
*/ |
1049
|
|
|
public int $NumFavoriteTables; |
1050
|
|
|
|
1051
|
|
|
/** |
1052
|
|
|
* display a JavaScript table filter in the navigation panel |
1053
|
|
|
* when more then x tables are present |
1054
|
|
|
* |
1055
|
|
|
* ```php |
1056
|
|
|
* $cfg['NavigationTreeDisplayItemFilterMinimum'] = 30; |
1057
|
|
|
* ``` |
1058
|
|
|
* |
1059
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeDisplayItemFilterMinimum |
1060
|
|
|
* |
1061
|
|
|
* @psalm-var positive-int |
1062
|
|
|
*/ |
1063
|
|
|
public int $NavigationTreeDisplayItemFilterMinimum; |
1064
|
|
|
|
1065
|
|
|
/** |
1066
|
|
|
* display server choice at top of navigation panel |
1067
|
|
|
* |
1068
|
|
|
* ```php |
1069
|
|
|
* $cfg['NavigationDisplayServers'] = true; |
1070
|
|
|
* ``` |
1071
|
|
|
* |
1072
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationDisplayServers |
1073
|
|
|
*/ |
1074
|
|
|
public bool $NavigationDisplayServers; |
1075
|
|
|
|
1076
|
|
|
/** |
1077
|
|
|
* server choice as links |
1078
|
|
|
* |
1079
|
|
|
* ```php |
1080
|
|
|
* $cfg['DisplayServersList'] = false; |
1081
|
|
|
* ``` |
1082
|
|
|
* |
1083
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_DisplayServersList |
1084
|
|
|
*/ |
1085
|
|
|
public bool $DisplayServersList; |
1086
|
|
|
|
1087
|
|
|
/** |
1088
|
|
|
* display a JavaScript database filter in the navigation panel |
1089
|
|
|
* when more then x databases are present |
1090
|
|
|
* |
1091
|
|
|
* ```php |
1092
|
|
|
* $cfg['NavigationTreeDisplayDbFilterMinimum'] = 30; |
1093
|
|
|
* ``` |
1094
|
|
|
* |
1095
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeDisplayDbFilterMinimum |
1096
|
|
|
* |
1097
|
|
|
* @psalm-var positive-int |
1098
|
|
|
*/ |
1099
|
|
|
public int $NavigationTreeDisplayDbFilterMinimum; |
1100
|
|
|
|
1101
|
|
|
/** |
1102
|
|
|
* target of the navigation panel quick access icon |
1103
|
|
|
* |
1104
|
|
|
* Possible values: |
1105
|
|
|
* 'structure' = fields list |
1106
|
|
|
* 'sql' = SQL form |
1107
|
|
|
* 'search' = search page |
1108
|
|
|
* 'insert' = insert row page |
1109
|
|
|
* 'browse' = browse page |
1110
|
|
|
* |
1111
|
|
|
* ```php |
1112
|
|
|
* $cfg['NavigationTreeDefaultTabTable'] = 'structure'; |
1113
|
|
|
* ``` |
1114
|
|
|
* |
1115
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeDefaultTabTable |
1116
|
|
|
* |
1117
|
|
|
* @psalm-var 'structure'|'sql'|'search'|'insert'|'browse' |
1118
|
|
|
*/ |
1119
|
|
|
public string $NavigationTreeDefaultTabTable; |
1120
|
|
|
|
1121
|
|
|
/** |
1122
|
|
|
* target of the navigation panel quick second access icon |
1123
|
|
|
* |
1124
|
|
|
* Possible values: |
1125
|
|
|
* 'structure' = fields list |
1126
|
|
|
* 'sql' = SQL form |
1127
|
|
|
* 'search' = search page |
1128
|
|
|
* 'insert' = insert row page |
1129
|
|
|
* 'browse' = browse page |
1130
|
|
|
* '' = no link |
1131
|
|
|
* |
1132
|
|
|
* ```php |
1133
|
|
|
* $cfg['NavigationTreeDefaultTabTable2'] = ''; |
1134
|
|
|
* ``` |
1135
|
|
|
* |
1136
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeDefaultTabTable2 |
1137
|
|
|
* |
1138
|
|
|
* @psalm-var 'structure'|'sql'|'search'|'insert'|'browse'|'' |
1139
|
|
|
*/ |
1140
|
|
|
public string $NavigationTreeDefaultTabTable2; |
1141
|
|
|
|
1142
|
|
|
/** |
1143
|
|
|
* Enables the possibility of navigation tree expansion |
1144
|
|
|
* |
1145
|
|
|
* ```php |
1146
|
|
|
* $cfg['NavigationTreeEnableExpansion'] = true; |
1147
|
|
|
* ``` |
1148
|
|
|
* |
1149
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeEnableExpansion |
1150
|
|
|
*/ |
1151
|
|
|
public bool $NavigationTreeEnableExpansion; |
1152
|
|
|
|
1153
|
|
|
/** |
1154
|
|
|
* Show tables in navigation panel |
1155
|
|
|
* |
1156
|
|
|
* ```php |
1157
|
|
|
* $cfg['NavigationTreeShowTables'] = true; |
1158
|
|
|
* ``` |
1159
|
|
|
* |
1160
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeShowTables |
1161
|
|
|
*/ |
1162
|
|
|
public bool $NavigationTreeShowTables; |
1163
|
|
|
|
1164
|
|
|
/** |
1165
|
|
|
* Show views in navigation panel |
1166
|
|
|
* |
1167
|
|
|
* ```php |
1168
|
|
|
* $cfg['NavigationTreeShowViews'] = true; |
1169
|
|
|
* ``` |
1170
|
|
|
* |
1171
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeShowViews |
1172
|
|
|
*/ |
1173
|
|
|
public bool $NavigationTreeShowViews; |
1174
|
|
|
|
1175
|
|
|
/** |
1176
|
|
|
* Show functions in navigation panel |
1177
|
|
|
* |
1178
|
|
|
* ```php |
1179
|
|
|
* $cfg['NavigationTreeShowFunctions'] = true; |
1180
|
|
|
* ``` |
1181
|
|
|
* |
1182
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeShowFunctions |
1183
|
|
|
*/ |
1184
|
|
|
public bool $NavigationTreeShowFunctions; |
1185
|
|
|
|
1186
|
|
|
/** |
1187
|
|
|
* Show procedures in navigation panel |
1188
|
|
|
* |
1189
|
|
|
* ```php |
1190
|
|
|
* $cfg['NavigationTreeShowProcedures'] = true; |
1191
|
|
|
* ``` |
1192
|
|
|
* |
1193
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeShowProcedures |
1194
|
|
|
*/ |
1195
|
|
|
public bool $NavigationTreeShowProcedures; |
1196
|
|
|
|
1197
|
|
|
/** |
1198
|
|
|
* Show events in navigation panel |
1199
|
|
|
* |
1200
|
|
|
* ```php |
1201
|
|
|
* $cfg['NavigationTreeShowEvents'] = true; |
1202
|
|
|
* ``` |
1203
|
|
|
* |
1204
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeShowEvents |
1205
|
|
|
*/ |
1206
|
|
|
public bool $NavigationTreeShowEvents; |
1207
|
|
|
|
1208
|
|
|
/** |
1209
|
|
|
* Width of navigation panel |
1210
|
|
|
* |
1211
|
|
|
* ```php |
1212
|
|
|
* $cfg['NavigationWidth'] = 240; |
1213
|
|
|
* ``` |
1214
|
|
|
* |
1215
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationWidth |
1216
|
|
|
* |
1217
|
|
|
* @psalm-var 0|positive-int |
1218
|
|
|
*/ |
1219
|
|
|
public int $NavigationWidth; |
1220
|
|
|
|
1221
|
|
|
/** |
1222
|
|
|
* Automatically expands single database in navigation panel |
1223
|
|
|
* |
1224
|
|
|
* ```php |
1225
|
|
|
* $cfg['NavigationTreeAutoexpandSingleDb'] = true; |
1226
|
|
|
* ``` |
1227
|
|
|
* |
1228
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeAutoexpandSingleDb |
1229
|
|
|
*/ |
1230
|
|
|
public bool $NavigationTreeAutoexpandSingleDb; |
1231
|
|
|
|
1232
|
|
|
/** |
1233
|
|
|
* allow to display statistics and space usage in the pages about database |
1234
|
|
|
* details and table properties |
1235
|
|
|
* |
1236
|
|
|
* ```php |
1237
|
|
|
* $cfg['ShowStats'] = true; |
1238
|
|
|
* ``` |
1239
|
|
|
* |
1240
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowStats |
1241
|
|
|
*/ |
1242
|
|
|
public bool $ShowStats; |
1243
|
|
|
|
1244
|
|
|
/** |
1245
|
|
|
* show PHP info link |
1246
|
|
|
* |
1247
|
|
|
* ```php |
1248
|
|
|
* $cfg['ShowPhpInfo'] = false; |
1249
|
|
|
* ``` |
1250
|
|
|
* |
1251
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowPhpInfo |
1252
|
|
|
*/ |
1253
|
|
|
public bool $ShowPhpInfo; |
1254
|
|
|
|
1255
|
|
|
/** |
1256
|
|
|
* show MySQL server and/or web server information (true|false|'database-server'|'web-server') |
1257
|
|
|
* |
1258
|
|
|
* ```php |
1259
|
|
|
* $cfg['ShowServerInfo'] = true; |
1260
|
|
|
* ``` |
1261
|
|
|
* |
1262
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowServerInfo |
1263
|
|
|
* |
1264
|
|
|
* @psalm-var bool|'database-server'|'web-server' |
1265
|
|
|
*/ |
1266
|
|
|
public bool|string $ShowServerInfo; |
1267
|
|
|
|
1268
|
|
|
/** |
1269
|
|
|
* show change password link |
1270
|
|
|
* |
1271
|
|
|
* ```php |
1272
|
|
|
* $cfg['ShowChgPassword'] = true; |
1273
|
|
|
* ``` |
1274
|
|
|
* |
1275
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowChgPassword |
1276
|
|
|
*/ |
1277
|
|
|
public bool $ShowChgPassword; |
1278
|
|
|
|
1279
|
|
|
/** |
1280
|
|
|
* show create database form |
1281
|
|
|
* |
1282
|
|
|
* ```php |
1283
|
|
|
* $cfg['ShowCreateDb'] = true; |
1284
|
|
|
* ``` |
1285
|
|
|
* |
1286
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowCreateDb |
1287
|
|
|
*/ |
1288
|
|
|
public bool $ShowCreateDb; |
1289
|
|
|
|
1290
|
|
|
/** |
1291
|
|
|
* show charset column in database structure (true|false)? |
1292
|
|
|
* |
1293
|
|
|
* ```php |
1294
|
|
|
* $cfg['ShowDbStructureCharset'] = false; |
1295
|
|
|
* ``` |
1296
|
|
|
* |
1297
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowDbStructureCharset |
1298
|
|
|
*/ |
1299
|
|
|
public bool $ShowDbStructureCharset; |
1300
|
|
|
|
1301
|
|
|
/** |
1302
|
|
|
* show comment column in database structure (true|false)? |
1303
|
|
|
* |
1304
|
|
|
* ```php |
1305
|
|
|
* $cfg['ShowDbStructureComment'] = false; |
1306
|
|
|
* ``` |
1307
|
|
|
* |
1308
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowDbStructureComment |
1309
|
|
|
*/ |
1310
|
|
|
public bool $ShowDbStructureComment; |
1311
|
|
|
|
1312
|
|
|
/** |
1313
|
|
|
* show creation timestamp column in database structure (true|false)? |
1314
|
|
|
* |
1315
|
|
|
* ```php |
1316
|
|
|
* $cfg['ShowDbStructureCreation'] = false; |
1317
|
|
|
* ``` |
1318
|
|
|
* |
1319
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowDbStructureCreation |
1320
|
|
|
*/ |
1321
|
|
|
public bool $ShowDbStructureCreation; |
1322
|
|
|
|
1323
|
|
|
/** |
1324
|
|
|
* show last update timestamp column in database structure (true|false)? |
1325
|
|
|
* |
1326
|
|
|
* ```php |
1327
|
|
|
* $cfg['ShowDbStructureLastUpdate'] = false; |
1328
|
|
|
* ``` |
1329
|
|
|
* |
1330
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowDbStructureLastUpdate |
1331
|
|
|
*/ |
1332
|
|
|
public bool $ShowDbStructureLastUpdate; |
1333
|
|
|
|
1334
|
|
|
/** |
1335
|
|
|
* show last check timestamp column in database structure (true|false)? |
1336
|
|
|
* |
1337
|
|
|
* ```php |
1338
|
|
|
* $cfg['ShowDbStructureLastCheck'] = false; |
1339
|
|
|
* ``` |
1340
|
|
|
* |
1341
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowDbStructureLastCheck |
1342
|
|
|
*/ |
1343
|
|
|
public bool $ShowDbStructureLastCheck; |
1344
|
|
|
|
1345
|
|
|
/** |
1346
|
|
|
* allow hide action columns to drop down menu in database structure (true|false)? |
1347
|
|
|
* |
1348
|
|
|
* ```php |
1349
|
|
|
* $cfg['HideStructureActions'] = true; |
1350
|
|
|
* ``` |
1351
|
|
|
* |
1352
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_HideStructureActions |
1353
|
|
|
*/ |
1354
|
|
|
public bool $HideStructureActions; |
1355
|
|
|
|
1356
|
|
|
/** |
1357
|
|
|
* Show column comments in table structure view (true|false)? |
1358
|
|
|
* |
1359
|
|
|
* ```php |
1360
|
|
|
* $cfg['ShowColumnComments'] = true; |
1361
|
|
|
* ``` |
1362
|
|
|
* |
1363
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowColumnComments |
1364
|
|
|
*/ |
1365
|
|
|
public bool $ShowColumnComments; |
1366
|
|
|
|
1367
|
|
|
/** |
1368
|
|
|
* Use icons instead of text for the navigation bar buttons (table browse) |
1369
|
|
|
* ('text'|'icons'|'both') |
1370
|
|
|
* |
1371
|
|
|
* ```php |
1372
|
|
|
* $cfg['TableNavigationLinksMode'] = 'icons'; |
1373
|
|
|
* ``` |
1374
|
|
|
* |
1375
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_TableNavigationLinksMode |
1376
|
|
|
* |
1377
|
|
|
* @psalm-var 'text'|'icons'|'both' |
1378
|
|
|
*/ |
1379
|
|
|
public string $TableNavigationLinksMode; |
1380
|
|
|
|
1381
|
|
|
/** |
1382
|
|
|
* Defines whether a user should be displayed a "show all (records)" |
1383
|
|
|
* button in browse mode or not. |
1384
|
|
|
* |
1385
|
|
|
* ```php |
1386
|
|
|
* $cfg['ShowAll'] = false; |
1387
|
|
|
* ``` |
1388
|
|
|
* |
1389
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowAll |
1390
|
|
|
*/ |
1391
|
|
|
public bool $showAll; |
1392
|
|
|
|
1393
|
|
|
/** |
1394
|
|
|
* Number of rows displayed when browsing a result set. If the result |
1395
|
|
|
* set contains more rows, "Previous" and "Next". |
1396
|
|
|
* Possible values: 25,50,100,250,500 |
1397
|
|
|
* |
1398
|
|
|
* ```php |
1399
|
|
|
* $cfg['MaxRows'] = 25; |
1400
|
|
|
* ``` |
1401
|
|
|
* |
1402
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_MaxRows |
1403
|
|
|
* |
1404
|
|
|
* @psalm-var positive-int |
1405
|
|
|
*/ |
1406
|
|
|
public int $maxRows; |
1407
|
|
|
|
1408
|
|
|
/** |
1409
|
|
|
* default for 'ORDER BY' clause (valid values are 'ASC', 'DESC' or 'SMART' -ie |
1410
|
|
|
* descending order for fields of type TIME, DATE, DATETIME & TIMESTAMP, |
1411
|
|
|
* ascending order else-) |
1412
|
|
|
* |
1413
|
|
|
* ```php |
1414
|
|
|
* $cfg['Order'] = 'SMART'; |
1415
|
|
|
* ``` |
1416
|
|
|
* |
1417
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_Order |
1418
|
|
|
* |
1419
|
|
|
* @psalm-var 'ASC'|'DESC'|'SMART' |
1420
|
|
|
*/ |
1421
|
|
|
public string $Order; |
1422
|
|
|
|
1423
|
|
|
/** |
1424
|
|
|
* grid editing: save edited cell(s) in browse-mode at once |
1425
|
|
|
* |
1426
|
|
|
* ```php |
1427
|
|
|
* $cfg['SaveCellsAtOnce'] = false; |
1428
|
|
|
* ``` |
1429
|
|
|
* |
1430
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_SaveCellsAtOnce |
1431
|
|
|
*/ |
1432
|
|
|
public bool $SaveCellsAtOnce; |
1433
|
|
|
|
1434
|
|
|
/** |
1435
|
|
|
* grid editing: which action triggers it, or completely disable the feature |
1436
|
|
|
* |
1437
|
|
|
* Possible values: |
1438
|
|
|
* 'click' |
1439
|
|
|
* 'double-click' |
1440
|
|
|
* 'disabled' |
1441
|
|
|
* |
1442
|
|
|
* ```php |
1443
|
|
|
* $cfg['GridEditing'] = 'double-click'; |
1444
|
|
|
* ``` |
1445
|
|
|
* |
1446
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_GridEditing |
1447
|
|
|
* |
1448
|
|
|
* @psalm-var 'double-click'|'click'|'disabled' |
1449
|
|
|
*/ |
1450
|
|
|
public string $GridEditing; |
1451
|
|
|
|
1452
|
|
|
/** |
1453
|
|
|
* Options > Relational display |
1454
|
|
|
* |
1455
|
|
|
* Possible values: |
1456
|
|
|
* 'K' for key value |
1457
|
|
|
* 'D' for display column |
1458
|
|
|
* |
1459
|
|
|
* ```php |
1460
|
|
|
* $cfg['RelationalDisplay'] = 'K'; |
1461
|
|
|
* ``` |
1462
|
|
|
* |
1463
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_RelationalDisplay |
1464
|
|
|
* |
1465
|
|
|
* @psalm-var 'K'|'D' |
1466
|
|
|
*/ |
1467
|
|
|
public string $RelationalDisplay; |
1468
|
|
|
|
1469
|
|
|
/** |
1470
|
|
|
* disallow editing of binary fields |
1471
|
|
|
* valid values are: |
1472
|
|
|
* false allow editing |
1473
|
|
|
* 'blob' allow editing except for BLOB fields |
1474
|
|
|
* 'noblob' disallow editing except for BLOB fields |
1475
|
|
|
* 'all' disallow editing |
1476
|
|
|
* |
1477
|
|
|
* ```php |
1478
|
|
|
* $cfg['ProtectBinary'] = 'blob'; |
1479
|
|
|
* ``` |
1480
|
|
|
* |
1481
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ProtectBinary |
1482
|
|
|
* |
1483
|
|
|
* @psalm-var 'blob'|'noblob'|'all'|false |
1484
|
|
|
*/ |
1485
|
|
|
public string|false $ProtectBinary; |
1486
|
|
|
|
1487
|
|
|
/** |
1488
|
|
|
* Display the function fields in edit/insert mode |
1489
|
|
|
* |
1490
|
|
|
* ```php |
1491
|
|
|
* $cfg['ShowFunctionFields'] = true; |
1492
|
|
|
* ``` |
1493
|
|
|
* |
1494
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowFunctionFields |
1495
|
|
|
*/ |
1496
|
|
|
public bool $ShowFunctionFields; |
1497
|
|
|
|
1498
|
|
|
/** |
1499
|
|
|
* Display the type fields in edit/insert mode |
1500
|
|
|
* |
1501
|
|
|
* ```php |
1502
|
|
|
* $cfg['ShowFieldTypesInDataEditView'] = true; |
1503
|
|
|
* ``` |
1504
|
|
|
* |
1505
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowFieldTypesInDataEditView |
1506
|
|
|
*/ |
1507
|
|
|
public bool $ShowFieldTypesInDataEditView; |
1508
|
|
|
|
1509
|
|
|
/** |
1510
|
|
|
* Which editor should be used for CHAR/VARCHAR fields: |
1511
|
|
|
* input - allows limiting of input length |
1512
|
|
|
* textarea - allows newlines in fields |
1513
|
|
|
* |
1514
|
|
|
* ```php |
1515
|
|
|
* $cfg['CharEditing'] = 'input'; |
1516
|
|
|
* ``` |
1517
|
|
|
* |
1518
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CharEditing |
1519
|
|
|
* |
1520
|
|
|
* @psalm-var 'input'|'textarea' |
1521
|
|
|
*/ |
1522
|
|
|
public string $CharEditing; |
1523
|
|
|
|
1524
|
|
|
/** |
1525
|
|
|
* The minimum size for character input fields |
1526
|
|
|
* |
1527
|
|
|
* ```php |
1528
|
|
|
* $cfg['MinSizeForInputField'] = 4; |
1529
|
|
|
* ``` |
1530
|
|
|
* |
1531
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_MinSizeForInputField |
1532
|
|
|
* |
1533
|
|
|
* @psalm-var 0|positive-int |
1534
|
|
|
*/ |
1535
|
|
|
public int $MinSizeForInputField; |
1536
|
|
|
|
1537
|
|
|
/** |
1538
|
|
|
* The maximum size for character input fields |
1539
|
|
|
* |
1540
|
|
|
* ```php |
1541
|
|
|
* $cfg['MaxSizeForInputField'] = 60; |
1542
|
|
|
* ``` |
1543
|
|
|
* |
1544
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_MaxSizeForInputField |
1545
|
|
|
* |
1546
|
|
|
* @psalm-var positive-int |
1547
|
|
|
*/ |
1548
|
|
|
public int $MaxSizeForInputField; |
1549
|
|
|
|
1550
|
|
|
/** |
1551
|
|
|
* How many rows can be inserted at one time |
1552
|
|
|
* |
1553
|
|
|
* ```php |
1554
|
|
|
* $cfg['InsertRows'] = 2; |
1555
|
|
|
* ``` |
1556
|
|
|
* |
1557
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_InsertRows |
1558
|
|
|
* |
1559
|
|
|
* @psalm-var positive-int |
1560
|
|
|
*/ |
1561
|
|
|
public int $InsertRows; |
1562
|
|
|
|
1563
|
|
|
/** |
1564
|
|
|
* Sort order for items in a foreign-key drop-down list. |
1565
|
|
|
* 'content' is the referenced data, 'id' is the key value. |
1566
|
|
|
* |
1567
|
|
|
* ```php |
1568
|
|
|
* $cfg['ForeignKeyDropdownOrder'] = ['content-id', 'id-content']; |
1569
|
|
|
* ``` |
1570
|
|
|
* |
1571
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ForeignKeyDropdownOrder |
1572
|
|
|
* |
1573
|
|
|
* @var string[] |
1574
|
|
|
* @psalm-var array{0: 'content-id'|'id-content', 1?: 'content-id'|'id-content'} |
1575
|
|
|
*/ |
1576
|
|
|
public array $ForeignKeyDropdownOrder; |
1577
|
|
|
|
1578
|
|
|
/** |
1579
|
|
|
* A drop-down list will be used if fewer items are present |
1580
|
|
|
* |
1581
|
|
|
* ```php |
1582
|
|
|
* $cfg['ForeignKeyMaxLimit'] = 100; |
1583
|
|
|
* ``` |
1584
|
|
|
* |
1585
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ForeignKeyMaxLimit |
1586
|
|
|
* |
1587
|
|
|
* @psalm-var positive-int |
1588
|
|
|
*/ |
1589
|
|
|
public int $ForeignKeyMaxLimit; |
1590
|
|
|
|
1591
|
|
|
/** |
1592
|
|
|
* Whether to disable foreign key checks while importing |
1593
|
|
|
* |
1594
|
|
|
* ```php |
1595
|
|
|
* $cfg['DefaultForeignKeyChecks'] = 'default'; |
1596
|
|
|
* ``` |
1597
|
|
|
* |
1598
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_DefaultForeignKeyChecks |
1599
|
|
|
* |
1600
|
|
|
* @psalm-var 'default'|'enable'|'disable' |
1601
|
|
|
*/ |
1602
|
|
|
public string $DefaultForeignKeyChecks; |
1603
|
|
|
|
1604
|
|
|
/** |
1605
|
|
|
* Allow for the use of zip compression (requires zip support to be enabled) |
1606
|
|
|
* |
1607
|
|
|
* ```php |
1608
|
|
|
* $cfg['ZipDump'] = true; |
1609
|
|
|
* ``` |
1610
|
|
|
* |
1611
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ZipDump |
1612
|
|
|
*/ |
1613
|
|
|
public bool $ZipDump; |
1614
|
|
|
|
1615
|
|
|
/** |
1616
|
|
|
* Allow for the use of gzip compression (requires zlib) |
1617
|
|
|
* |
1618
|
|
|
* ```php |
1619
|
|
|
* $cfg['GZipDump'] = true; |
1620
|
|
|
* ``` |
1621
|
|
|
* |
1622
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_GZipDump |
1623
|
|
|
*/ |
1624
|
|
|
public bool $GZipDump; |
1625
|
|
|
|
1626
|
|
|
/** |
1627
|
|
|
* Allow for the use of bzip2 decompression (requires bz2 extension) |
1628
|
|
|
* |
1629
|
|
|
* ```php |
1630
|
|
|
* $cfg['BZipDump'] = true; |
1631
|
|
|
* ``` |
1632
|
|
|
* |
1633
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_BZipDump |
1634
|
|
|
*/ |
1635
|
|
|
public bool $BZipDump; |
1636
|
|
|
|
1637
|
|
|
/** |
1638
|
|
|
* Will compress gzip exports on the fly without the need for much memory. |
1639
|
|
|
* If you encounter problems with created gzip files disable this feature. |
1640
|
|
|
* |
1641
|
|
|
* ```php |
1642
|
|
|
* $cfg['CompressOnFly'] = true; |
1643
|
|
|
* ``` |
1644
|
|
|
* |
1645
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CompressOnFly |
1646
|
|
|
*/ |
1647
|
|
|
public bool $CompressOnFly; |
1648
|
|
|
|
1649
|
|
|
/** |
1650
|
|
|
* How to display the menu tabs ('icons'|'text'|'both') |
1651
|
|
|
* |
1652
|
|
|
* ```php |
1653
|
|
|
* $cfg['TabsMode'] = 'both'; |
1654
|
|
|
* ``` |
1655
|
|
|
* |
1656
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_TabsMode |
1657
|
|
|
* |
1658
|
|
|
* @psalm-var 'icons'|'text'|'both' |
1659
|
|
|
*/ |
1660
|
|
|
public string $TabsMode; |
1661
|
|
|
|
1662
|
|
|
/** |
1663
|
|
|
* How to display various action links ('icons'|'text'|'both') |
1664
|
|
|
* |
1665
|
|
|
* ```php |
1666
|
|
|
* $cfg['ActionLinksMode'] = 'both'; |
1667
|
|
|
* ``` |
1668
|
|
|
* |
1669
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ActionLinksMode |
1670
|
|
|
* |
1671
|
|
|
* @psalm-var 'icons'|'text'|'both' |
1672
|
|
|
*/ |
1673
|
|
|
public string $ActionLinksMode; |
1674
|
|
|
|
1675
|
|
|
/** |
1676
|
|
|
* How many columns should be used for table display of a database? |
1677
|
|
|
* (a value larger than 1 results in some information being hidden) |
1678
|
|
|
* |
1679
|
|
|
* ```php |
1680
|
|
|
* $cfg['PropertiesNumColumns'] = 1; |
1681
|
|
|
* ``` |
1682
|
|
|
* |
1683
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_PropertiesNumColumns |
1684
|
|
|
* |
1685
|
|
|
* @psalm-var positive-int |
1686
|
|
|
*/ |
1687
|
|
|
public int $PropertiesNumColumns; |
1688
|
|
|
|
1689
|
|
|
/** |
1690
|
|
|
* Possible values: |
1691
|
|
|
* 'welcome' = the welcome page (recommended for multiuser setups) |
1692
|
|
|
* 'databases' = list of databases |
1693
|
|
|
* 'status' = runtime information |
1694
|
|
|
* 'variables' = MySQL server variables |
1695
|
|
|
* 'privileges' = user management |
1696
|
|
|
* |
1697
|
|
|
* ```php |
1698
|
|
|
* $cfg['DefaultTabServer'] = 'welcome'; |
1699
|
|
|
* ``` |
1700
|
|
|
* |
1701
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_DefaultTabServer |
1702
|
|
|
* |
1703
|
|
|
* @psalm-var 'welcome'|'databases'|'status'|'variables'|'privileges' |
1704
|
|
|
*/ |
1705
|
|
|
public string $DefaultTabServer; |
1706
|
|
|
|
1707
|
|
|
/** |
1708
|
|
|
* Possible values: |
1709
|
|
|
* 'structure' = tables list |
1710
|
|
|
* 'sql' = SQL form |
1711
|
|
|
* 'search' = search query |
1712
|
|
|
* 'operations' = operations on database |
1713
|
|
|
* |
1714
|
|
|
* ```php |
1715
|
|
|
* $cfg['DefaultTabDatabase'] = 'structure'; |
1716
|
|
|
* ``` |
1717
|
|
|
* |
1718
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_DefaultTabDatabase |
1719
|
|
|
* |
1720
|
|
|
* @psalm-var 'structure'|'sql'|'search'|'operations' |
1721
|
|
|
*/ |
1722
|
|
|
public string $DefaultTabDatabase; |
1723
|
|
|
|
1724
|
|
|
/** |
1725
|
|
|
* Possible values: |
1726
|
|
|
* 'structure' = fields list |
1727
|
|
|
* 'sql' = SQL form |
1728
|
|
|
* 'search' = search page |
1729
|
|
|
* 'insert' = insert row page |
1730
|
|
|
* 'browse' = browse page |
1731
|
|
|
* |
1732
|
|
|
* ```php |
1733
|
|
|
* $cfg['DefaultTabTable'] = 'browse'; |
1734
|
|
|
* ``` |
1735
|
|
|
* |
1736
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_DefaultTabTable |
1737
|
|
|
* |
1738
|
|
|
* @psalm-var 'structure'|'sql'|'search'|'insert'|'browse' |
1739
|
|
|
*/ |
1740
|
|
|
public string $DefaultTabTable; |
1741
|
|
|
|
1742
|
|
|
/** |
1743
|
|
|
* Whether to display image or text or both image and text in table row |
1744
|
|
|
* action segment. Value can be either of ``image``, ``text`` or ``both``. |
1745
|
|
|
* |
1746
|
|
|
* ```php |
1747
|
|
|
* $cfg['RowActionType'] = 'both'; |
1748
|
|
|
* ``` |
1749
|
|
|
* |
1750
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_RowActionType |
1751
|
|
|
* |
1752
|
|
|
* @psalm-var 'icons'|'text'|'both' |
1753
|
|
|
*/ |
1754
|
|
|
public string $RowActionType; |
1755
|
|
|
|
1756
|
|
|
/** |
1757
|
|
|
* Export defaults |
1758
|
|
|
* |
1759
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_Export |
1760
|
|
|
*/ |
1761
|
|
|
public Export $Export; |
1762
|
|
|
|
1763
|
|
|
/** |
1764
|
|
|
* Import defaults |
1765
|
|
|
* |
1766
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_Import |
1767
|
|
|
*/ |
1768
|
|
|
public Import $Import; |
1769
|
|
|
|
1770
|
|
|
/** |
1771
|
|
|
* Schema export defaults |
1772
|
|
|
* |
1773
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_Schema |
1774
|
|
|
*/ |
1775
|
|
|
public Schema $Schema; |
1776
|
|
|
|
1777
|
|
|
/** |
1778
|
|
|
* Possible paper sizes for creating PDF pages. |
1779
|
|
|
* |
1780
|
|
|
* ```php |
1781
|
|
|
* $cfg['PDFPageSizes'] = ['A3', 'A4', 'A5', 'letter', 'legal']; |
1782
|
|
|
* ``` |
1783
|
|
|
* |
1784
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_PDFPageSizes |
1785
|
|
|
* |
1786
|
|
|
* @var string[] |
1787
|
|
|
*/ |
1788
|
|
|
public array $PDFPageSizes; |
1789
|
|
|
|
1790
|
|
|
/** |
1791
|
|
|
* Default page size to use when creating PDF pages. |
1792
|
|
|
* |
1793
|
|
|
* ```php |
1794
|
|
|
* $cfg['PDFDefaultPageSize'] = 'A4'; |
1795
|
|
|
* ``` |
1796
|
|
|
* |
1797
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_PDFDefaultPageSize |
1798
|
|
|
*/ |
1799
|
|
|
public string $PDFDefaultPageSize; |
1800
|
|
|
|
1801
|
|
|
/** |
1802
|
|
|
* Default language to use, if not browser-defined or user-defined |
1803
|
|
|
* |
1804
|
|
|
* ```php |
1805
|
|
|
* $cfg['DefaultLang'] = 'en'; |
1806
|
|
|
* ``` |
1807
|
|
|
* |
1808
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_DefaultLang |
1809
|
|
|
*/ |
1810
|
|
|
public string $DefaultLang; |
1811
|
|
|
|
1812
|
|
|
/** |
1813
|
|
|
* Default connection collation |
1814
|
|
|
* |
1815
|
|
|
* ```php |
1816
|
|
|
* $cfg['DefaultConnectionCollation'] = 'utf8mb4_unicode_ci'; |
1817
|
|
|
* ``` |
1818
|
|
|
* |
1819
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_DefaultConnectionCollation |
1820
|
|
|
*/ |
1821
|
|
|
public string $DefaultConnectionCollation; |
1822
|
|
|
|
1823
|
|
|
/** |
1824
|
|
|
* Force: always use this language, e.g. 'en' |
1825
|
|
|
* |
1826
|
|
|
* ```php |
1827
|
|
|
* $cfg['Lang'] = ''; |
1828
|
|
|
* ``` |
1829
|
|
|
* |
1830
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_Lang |
1831
|
|
|
*/ |
1832
|
|
|
public string $Lang; |
1833
|
|
|
|
1834
|
|
|
/** |
1835
|
|
|
* Regular expression to limit listed languages, e.g. '^(cs|en)' for Czech and |
1836
|
|
|
* English only |
1837
|
|
|
* |
1838
|
|
|
* ```php |
1839
|
|
|
* $cfg['FilterLanguages'] = ''; |
1840
|
|
|
* ``` |
1841
|
|
|
* |
1842
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_FilterLanguages |
1843
|
|
|
*/ |
1844
|
|
|
public string $FilterLanguages; |
1845
|
|
|
|
1846
|
|
|
/** |
1847
|
|
|
* You can select here which functions will be used for character set conversion. |
1848
|
|
|
* Possible values are: |
1849
|
|
|
* auto - automatically use available one (first is tested iconv, then mbstring) |
1850
|
|
|
* iconv - use iconv or libiconv functions |
1851
|
|
|
* mb - use mbstring extension |
1852
|
|
|
* none - disable encoding conversion |
1853
|
|
|
* |
1854
|
|
|
* ```php |
1855
|
|
|
* $cfg['RecodingEngine'] = 'auto'; |
1856
|
|
|
* ``` |
1857
|
|
|
* |
1858
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_RecodingEngine |
1859
|
|
|
* |
1860
|
|
|
* @psalm-var 'auto'|'iconv'|'mb'|'none' |
1861
|
|
|
*/ |
1862
|
|
|
public string $RecodingEngine; |
1863
|
|
|
|
1864
|
|
|
/** |
1865
|
|
|
* Specify some parameters for iconv used in character set conversion. See iconv |
1866
|
|
|
* documentation for details: |
1867
|
|
|
* https://www.gnu.org/savannah-checkouts/gnu/libiconv/documentation/libiconv-1.15/iconv_open.3.html |
1868
|
|
|
* |
1869
|
|
|
* ```php |
1870
|
|
|
* $cfg['IconvExtraParams'] = '//TRANSLIT'; |
1871
|
|
|
* ``` |
1872
|
|
|
* |
1873
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_IconvExtraParams |
1874
|
|
|
*/ |
1875
|
|
|
public string $IconvExtraParams; |
1876
|
|
|
|
1877
|
|
|
/** |
1878
|
|
|
* Available character sets for MySQL conversion. currently contains all which could |
1879
|
|
|
* be found in lang/* files and few more. |
1880
|
|
|
* Character sets will be shown in same order as here listed, so if you frequently |
1881
|
|
|
* use some of these move them to the top. |
1882
|
|
|
* |
1883
|
|
|
* ```php |
1884
|
|
|
* $cfg['AvailableCharsets'] = [ |
1885
|
|
|
* 'iso-8859-1', 'iso-8859-2', 'iso-8859-3', 'iso-8859-4', 'iso-8859-5', 'iso-8859-6', 'iso-8859-7', 'iso-8859-8', |
1886
|
|
|
* 'iso-8859-9', 'iso-8859-10', 'iso-8859-11', 'iso-8859-12', 'iso-8859-13', 'iso-8859-14', 'iso-8859-15', |
1887
|
|
|
* 'windows-1250', 'windows-1251', 'windows-1252', 'windows-1256', 'windows-1257', 'koi8-r', 'big5', 'gb2312', |
1888
|
|
|
* 'utf-16', 'utf-8', 'utf-7', 'x-user-defined', 'euc-jp', 'ks_c_5601-1987', 'tis-620', |
1889
|
|
|
* 'SHIFT_JIS', 'SJIS', 'SJIS-win' |
1890
|
|
|
* ]; |
1891
|
|
|
* ``` |
1892
|
|
|
* |
1893
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_AvailableCharsets |
1894
|
|
|
* |
1895
|
|
|
* @var string[] |
1896
|
|
|
*/ |
1897
|
|
|
public array $AvailableCharsets; |
1898
|
|
|
|
1899
|
|
|
/** |
1900
|
|
|
* enable the left panel pointer |
1901
|
|
|
* |
1902
|
|
|
* ```php |
1903
|
|
|
* $cfg['NavigationTreePointerEnable'] = true; |
1904
|
|
|
* ``` |
1905
|
|
|
* |
1906
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreePointerEnable |
1907
|
|
|
*/ |
1908
|
|
|
public bool $NavigationTreePointerEnable; |
1909
|
|
|
|
1910
|
|
|
/** |
1911
|
|
|
* enable the browse pointer |
1912
|
|
|
* |
1913
|
|
|
* ```php |
1914
|
|
|
* $cfg['BrowsePointerEnable'] = true; |
1915
|
|
|
* ``` |
1916
|
|
|
* |
1917
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_BrowsePointerEnable |
1918
|
|
|
*/ |
1919
|
|
|
public bool $BrowsePointerEnable; |
1920
|
|
|
|
1921
|
|
|
/** |
1922
|
|
|
* enable the browse marker |
1923
|
|
|
* |
1924
|
|
|
* ```php |
1925
|
|
|
* $cfg['BrowseMarkerEnable'] = true; |
1926
|
|
|
* ``` |
1927
|
|
|
* |
1928
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_BrowseMarkerEnable |
1929
|
|
|
*/ |
1930
|
|
|
public bool $BrowseMarkerEnable; |
1931
|
|
|
|
1932
|
|
|
/** |
1933
|
|
|
* textarea size (columns) in edit mode |
1934
|
|
|
* (this value will be emphasized (*2) for SQL |
1935
|
|
|
* query textareas and (*1.25) for query window) |
1936
|
|
|
* |
1937
|
|
|
* ```php |
1938
|
|
|
* $cfg['TextareaCols'] = 40; |
1939
|
|
|
* ``` |
1940
|
|
|
* |
1941
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_TextareaCols |
1942
|
|
|
* |
1943
|
|
|
* @psalm-var positive-int |
1944
|
|
|
*/ |
1945
|
|
|
public int $TextareaCols; |
1946
|
|
|
|
1947
|
|
|
/** |
1948
|
|
|
* textarea size (rows) in edit mode |
1949
|
|
|
* |
1950
|
|
|
* ```php |
1951
|
|
|
* $cfg['TextareaRows'] = 15; |
1952
|
|
|
* ``` |
1953
|
|
|
* |
1954
|
|
|
* @psalm-var positive-int |
1955
|
|
|
*/ |
1956
|
|
|
public int $TextareaRows; |
1957
|
|
|
|
1958
|
|
|
/** |
1959
|
|
|
* double size of textarea size for LONGTEXT columns |
1960
|
|
|
* |
1961
|
|
|
* ```php |
1962
|
|
|
* $cfg['LongtextDoubleTextarea'] = true; |
1963
|
|
|
* ``` |
1964
|
|
|
* |
1965
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_LongtextDoubleTextarea |
1966
|
|
|
*/ |
1967
|
|
|
public bool $LongtextDoubleTextarea; |
1968
|
|
|
|
1969
|
|
|
/** |
1970
|
|
|
* auto-select when clicking in the textarea of the query-box |
1971
|
|
|
* |
1972
|
|
|
* ```php |
1973
|
|
|
* $cfg['TextareaAutoSelect'] = false; |
1974
|
|
|
* ``` |
1975
|
|
|
* |
1976
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_TextareaAutoSelect |
1977
|
|
|
*/ |
1978
|
|
|
public bool $TextareaAutoSelect; |
1979
|
|
|
|
1980
|
|
|
/** |
1981
|
|
|
* textarea size (columns) for CHAR/VARCHAR |
1982
|
|
|
* |
1983
|
|
|
* ```php |
1984
|
|
|
* $cfg['CharTextareaCols'] = 40; |
1985
|
|
|
* ``` |
1986
|
|
|
* |
1987
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CharTextareaCols |
1988
|
|
|
* |
1989
|
|
|
* @psalm-var positive-int |
1990
|
|
|
*/ |
1991
|
|
|
public int $CharTextareaCols; |
1992
|
|
|
|
1993
|
|
|
/** |
1994
|
|
|
* textarea size (rows) for CHAR/VARCHAR |
1995
|
|
|
* |
1996
|
|
|
* ```php |
1997
|
|
|
* $cfg['CharTextareaRows'] = 7; |
1998
|
|
|
* ``` |
1999
|
|
|
* |
2000
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CharTextareaRows |
2001
|
|
|
* |
2002
|
|
|
* @psalm-var positive-int |
2003
|
|
|
*/ |
2004
|
|
|
public int $CharTextareaRows; |
2005
|
|
|
|
2006
|
|
|
/** |
2007
|
|
|
* Max field data length in browse mode for all non-numeric fields |
2008
|
|
|
* |
2009
|
|
|
* ```php |
2010
|
|
|
* $cfg['LimitChars'] = 50; |
2011
|
|
|
* ``` |
2012
|
|
|
* |
2013
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_LimitChars |
2014
|
|
|
* |
2015
|
|
|
* @psalm-var positive-int |
2016
|
|
|
*/ |
2017
|
|
|
public int $limitChars; |
2018
|
|
|
|
2019
|
|
|
/** |
2020
|
|
|
* Where to show the edit/copy/delete links in browse mode |
2021
|
|
|
* Possible values are 'left', 'right', 'both' and 'none'. |
2022
|
|
|
* |
2023
|
|
|
* ```php |
2024
|
|
|
* $cfg['RowActionLinks'] = 'left'; |
2025
|
|
|
* ``` |
2026
|
|
|
* |
2027
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_RowActionLinks |
2028
|
|
|
* |
2029
|
|
|
* @psalm-var 'left'|'right'|'both'|'none' |
2030
|
|
|
*/ |
2031
|
|
|
public string $RowActionLinks; |
2032
|
|
|
|
2033
|
|
|
/** |
2034
|
|
|
* Whether to show row links (Edit, Copy, Delete) and checkboxes for |
2035
|
|
|
* multiple row operations even when the selection does not have a unique key. |
2036
|
|
|
* |
2037
|
|
|
* ```php |
2038
|
|
|
* $cfg['RowActionLinksWithoutUnique'] = false; |
2039
|
|
|
* ``` |
2040
|
|
|
* |
2041
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_RowActionLinksWithoutUnique |
2042
|
|
|
*/ |
2043
|
|
|
public bool $RowActionLinksWithoutUnique; |
2044
|
|
|
|
2045
|
|
|
/** |
2046
|
|
|
* Default sort order by primary key. |
2047
|
|
|
* |
2048
|
|
|
* ```php |
2049
|
|
|
* $cfg['TablePrimaryKeyOrder'] = 'NONE'; |
2050
|
|
|
* ``` |
2051
|
|
|
* |
2052
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_TablePrimaryKeyOrder |
2053
|
|
|
* |
2054
|
|
|
* @psalm-var 'NONE'|'ASC'|'DESC' |
2055
|
|
|
*/ |
2056
|
|
|
public string $TablePrimaryKeyOrder; |
2057
|
|
|
|
2058
|
|
|
/** |
2059
|
|
|
* remember the last way a table sorted |
2060
|
|
|
* |
2061
|
|
|
* ```php |
2062
|
|
|
* $cfg['RememberSorting'] = true; |
2063
|
|
|
* ``` |
2064
|
|
|
* |
2065
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_RememberSorting |
2066
|
|
|
*/ |
2067
|
|
|
public bool $RememberSorting; |
2068
|
|
|
|
2069
|
|
|
/** |
2070
|
|
|
* shows column comments in 'browse' mode. |
2071
|
|
|
* |
2072
|
|
|
* ```php |
2073
|
|
|
* $cfg['ShowBrowseComments'] = true; |
2074
|
|
|
* ``` |
2075
|
|
|
* |
2076
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowBrowseComments |
2077
|
|
|
*/ |
2078
|
|
|
public bool $ShowBrowseComments; |
2079
|
|
|
|
2080
|
|
|
/** |
2081
|
|
|
* shows column comments in 'table property' mode. |
2082
|
|
|
* |
2083
|
|
|
* ```php |
2084
|
|
|
* $cfg['ShowPropertyComments'] = true; |
2085
|
|
|
* ``` |
2086
|
|
|
* |
2087
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowPropertyComments |
2088
|
|
|
*/ |
2089
|
|
|
public bool $ShowPropertyComments; |
2090
|
|
|
|
2091
|
|
|
/** |
2092
|
|
|
* repeat header names every X cells? (0 = deactivate) |
2093
|
|
|
* |
2094
|
|
|
* ```php |
2095
|
|
|
* $cfg['RepeatCells'] = 100; |
2096
|
|
|
* ``` |
2097
|
|
|
* |
2098
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_RepeatCells |
2099
|
|
|
* |
2100
|
|
|
* @psalm-var 0|positive-int |
2101
|
|
|
*/ |
2102
|
|
|
public int $repeatCells; |
2103
|
|
|
|
2104
|
|
|
/** |
2105
|
|
|
* Set to true if you want DB-based query history.If false, this utilizes |
2106
|
|
|
* JS-routines to display query history (lost by window close) |
2107
|
|
|
* |
2108
|
|
|
* ```php |
2109
|
|
|
* $cfg['QueryHistoryDB'] = false; |
2110
|
|
|
* ``` |
2111
|
|
|
* |
2112
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_QueryHistoryDB |
2113
|
|
|
*/ |
2114
|
|
|
public bool $QueryHistoryDB; |
2115
|
|
|
|
2116
|
|
|
/** |
2117
|
|
|
* When using DB-based query history, how many entries should be kept? |
2118
|
|
|
* |
2119
|
|
|
* ```php |
2120
|
|
|
* $cfg['QueryHistoryMax'] = 25; |
2121
|
|
|
* ``` |
2122
|
|
|
* |
2123
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_QueryHistoryMax |
2124
|
|
|
* |
2125
|
|
|
* @psalm-var positive-int |
2126
|
|
|
*/ |
2127
|
|
|
public int $QueryHistoryMax; |
2128
|
|
|
|
2129
|
|
|
/** |
2130
|
|
|
* Allow shared bookmarks between users |
2131
|
|
|
* |
2132
|
|
|
* ```php |
2133
|
|
|
* $cfg['AllowSharedBookmarks'] = true; |
2134
|
|
|
* ``` |
2135
|
|
|
* |
2136
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_AllowSharedBookmarks |
2137
|
|
|
*/ |
2138
|
|
|
public bool $AllowSharedBookmarks; |
2139
|
|
|
|
2140
|
|
|
/** |
2141
|
|
|
* Use MIME-Types (stored in column comments table) for |
2142
|
|
|
* |
2143
|
|
|
* ```php |
2144
|
|
|
* $cfg['BrowseMIME'] = true; |
2145
|
|
|
* ``` |
2146
|
|
|
* |
2147
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_BrowseMIME |
2148
|
|
|
*/ |
2149
|
|
|
public bool $BrowseMIME; |
2150
|
|
|
|
2151
|
|
|
/** |
2152
|
|
|
* When approximate count < this, PMA will get exact count for table rows. |
2153
|
|
|
* |
2154
|
|
|
* ```php |
2155
|
|
|
* $cfg['MaxExactCount'] = 50000; |
2156
|
|
|
* ``` |
2157
|
|
|
* |
2158
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_MaxExactCount |
2159
|
|
|
* |
2160
|
|
|
* @psalm-var positive-int |
2161
|
|
|
*/ |
2162
|
|
|
public int $MaxExactCount; |
2163
|
|
|
|
2164
|
|
|
/** |
2165
|
|
|
* Zero means that no row count is done for views; see the doc |
2166
|
|
|
* |
2167
|
|
|
* ```php |
2168
|
|
|
* $cfg['MaxExactCountViews'] = 0; |
2169
|
|
|
* ``` |
2170
|
|
|
* |
2171
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_MaxExactCountViews |
2172
|
|
|
* |
2173
|
|
|
* @psalm-var 0|positive-int |
2174
|
|
|
*/ |
2175
|
|
|
public int $MaxExactCountViews; |
2176
|
|
|
|
2177
|
|
|
/** |
2178
|
|
|
* Sort table and database in natural order |
2179
|
|
|
* |
2180
|
|
|
* ```php |
2181
|
|
|
* $cfg['NaturalOrder'] = true; |
2182
|
|
|
* ``` |
2183
|
|
|
* |
2184
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_NaturalOrder |
2185
|
|
|
*/ |
2186
|
|
|
public bool $NaturalOrder; |
2187
|
|
|
|
2188
|
|
|
/** |
2189
|
|
|
* Initial state for sliders |
2190
|
|
|
* (open | closed | disabled) |
2191
|
|
|
* |
2192
|
|
|
* ```php |
2193
|
|
|
* $cfg['InitialSlidersState'] = 'closed'; |
2194
|
|
|
* ``` |
2195
|
|
|
* |
2196
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_InitialSlidersState |
2197
|
|
|
* |
2198
|
|
|
* @psalm-var 'open'|'closed'|'disabled' |
2199
|
|
|
*/ |
2200
|
|
|
public string $InitialSlidersState; |
2201
|
|
|
|
2202
|
|
|
/** |
2203
|
|
|
* User preferences: disallow these settings |
2204
|
|
|
* For possible setting names look in src/Config/Forms/User/ |
2205
|
|
|
* |
2206
|
|
|
* ```php |
2207
|
|
|
* $cfg['UserprefsDisallow'] = []; |
2208
|
|
|
* ``` |
2209
|
|
|
* |
2210
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_UserprefsDisallow |
2211
|
|
|
* |
2212
|
|
|
* @var string[] |
2213
|
|
|
*/ |
2214
|
|
|
public array $UserprefsDisallow; |
2215
|
|
|
|
2216
|
|
|
/** |
2217
|
|
|
* User preferences: enable the Developer tab |
2218
|
|
|
* |
2219
|
|
|
* ```php |
2220
|
|
|
* $cfg['UserprefsDeveloperTab'] = false; |
2221
|
|
|
* ``` |
2222
|
|
|
* |
2223
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_UserprefsDeveloperTab |
2224
|
|
|
*/ |
2225
|
|
|
public bool $UserprefsDeveloperTab; |
2226
|
|
|
|
2227
|
|
|
/** |
2228
|
|
|
* title of browser window when a table is selected |
2229
|
|
|
* |
2230
|
|
|
* ```php |
2231
|
|
|
* $cfg['TitleTable'] = '@HTTP_HOST@ / @VSERVER@ / @DATABASE@ / @TABLE@ | @PHPMYADMIN@'; |
2232
|
|
|
* ``` |
2233
|
|
|
* |
2234
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_TitleTable |
2235
|
|
|
*/ |
2236
|
|
|
public string $TitleTable; |
2237
|
|
|
|
2238
|
|
|
/** |
2239
|
|
|
* title of browser window when a database is selected |
2240
|
|
|
* |
2241
|
|
|
* ```php |
2242
|
|
|
* $cfg['TitleDatabase'] = '@HTTP_HOST@ / @VSERVER@ / @DATABASE@ | @PHPMYADMIN@'; |
2243
|
|
|
* ``` |
2244
|
|
|
* |
2245
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_TitleDatabase |
2246
|
|
|
*/ |
2247
|
|
|
public string $TitleDatabase; |
2248
|
|
|
|
2249
|
|
|
/** |
2250
|
|
|
* title of browser window when a server is selected |
2251
|
|
|
* |
2252
|
|
|
* ```php |
2253
|
|
|
* $cfg['TitleServer'] = '@HTTP_HOST@ / @VSERVER@ | @PHPMYADMIN@'; |
2254
|
|
|
* ``` |
2255
|
|
|
* |
2256
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_TitleServer |
2257
|
|
|
*/ |
2258
|
|
|
public string $TitleServer; |
2259
|
|
|
|
2260
|
|
|
/** |
2261
|
|
|
* title of browser window when nothing is selected |
2262
|
|
|
* |
2263
|
|
|
* ```php |
2264
|
|
|
* $cfg['TitleDefault'] = '@HTTP_HOST@ | @PHPMYADMIN@'; |
2265
|
|
|
* ``` |
2266
|
|
|
* |
2267
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_TitleDefault |
2268
|
|
|
*/ |
2269
|
|
|
public string $TitleDefault; |
2270
|
|
|
|
2271
|
|
|
/** |
2272
|
|
|
* if you want to use selectable themes and if ThemesPath not empty |
2273
|
|
|
* set it to true, else set it to false (default is false); |
2274
|
|
|
* |
2275
|
|
|
* ```php |
2276
|
|
|
* $cfg['ThemeManager'] = true; |
2277
|
|
|
* ``` |
2278
|
|
|
* |
2279
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ThemeManager |
2280
|
|
|
*/ |
2281
|
|
|
public bool $ThemeManager; |
2282
|
|
|
|
2283
|
|
|
/** |
2284
|
|
|
* set up default theme, you can set up here an valid |
2285
|
|
|
* path to themes or 'original' for the original pma-theme |
2286
|
|
|
* |
2287
|
|
|
* ```php |
2288
|
|
|
* $cfg['ThemeDefault'] = 'pmahomme'; |
2289
|
|
|
* ``` |
2290
|
|
|
* |
2291
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ThemeDefault |
2292
|
|
|
*/ |
2293
|
|
|
public string $ThemeDefault; |
2294
|
|
|
|
2295
|
|
|
/** |
2296
|
|
|
* allow different theme for each configured server |
2297
|
|
|
* |
2298
|
|
|
* ```php |
2299
|
|
|
* $cfg['ThemePerServer'] = false; |
2300
|
|
|
* ``` |
2301
|
|
|
* |
2302
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ThemePerServer |
2303
|
|
|
*/ |
2304
|
|
|
public bool $ThemePerServer; |
2305
|
|
|
|
2306
|
|
|
/** |
2307
|
|
|
* Default query for table |
2308
|
|
|
* |
2309
|
|
|
* ```php |
2310
|
|
|
* $cfg['DefaultQueryTable'] = 'SELECT * FROM @TABLE@ WHERE 1'; |
2311
|
|
|
* ``` |
2312
|
|
|
* |
2313
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_DefaultQueryTable |
2314
|
|
|
*/ |
2315
|
|
|
public string $DefaultQueryTable; |
2316
|
|
|
|
2317
|
|
|
/** |
2318
|
|
|
* Default query for database |
2319
|
|
|
* |
2320
|
|
|
* ```php |
2321
|
|
|
* $cfg['DefaultQueryDatabase'] = ''; |
2322
|
|
|
* ``` |
2323
|
|
|
* |
2324
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_DefaultQueryDatabase |
2325
|
|
|
*/ |
2326
|
|
|
public string $DefaultQueryDatabase; |
2327
|
|
|
|
2328
|
|
|
/** |
2329
|
|
|
* SQL Query box settings |
2330
|
|
|
* These are the links display in all of the SQL Query boxes |
2331
|
|
|
*/ |
2332
|
|
|
public SqlQueryBox $SQLQuery; |
2333
|
|
|
|
2334
|
|
|
/** |
2335
|
|
|
* Enables autoComplete for table & column names in SQL queries |
2336
|
|
|
* |
2337
|
|
|
* ```php |
2338
|
|
|
* $cfg['EnableAutocompleteForTablesAndColumns'] = true; |
2339
|
|
|
* ``` |
2340
|
|
|
* |
2341
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_EnableAutocompleteForTablesAndColumns |
2342
|
|
|
*/ |
2343
|
|
|
public bool $EnableAutocompleteForTablesAndColumns; |
2344
|
|
|
|
2345
|
|
|
/** |
2346
|
|
|
* Directory for uploaded files that can be executed by phpMyAdmin. |
2347
|
|
|
* For example './upload'. Leave empty for no upload directory support. |
2348
|
|
|
* Use %u for username inclusion. |
2349
|
|
|
* |
2350
|
|
|
* ```php |
2351
|
|
|
* $cfg['UploadDir'] = ''; |
2352
|
|
|
* ``` |
2353
|
|
|
* |
2354
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_UploadDir |
2355
|
|
|
*/ |
2356
|
|
|
public string $UploadDir; |
2357
|
|
|
|
2358
|
|
|
/** |
2359
|
|
|
* Directory where phpMyAdmin can save exported data on server. |
2360
|
|
|
* For example './save'. Leave empty for no save directory support. |
2361
|
|
|
* Use %u for username inclusion. |
2362
|
|
|
* |
2363
|
|
|
* ```php |
2364
|
|
|
* $cfg['SaveDir'] = ''; |
2365
|
|
|
* ``` |
2366
|
|
|
* |
2367
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_SaveDir |
2368
|
|
|
*/ |
2369
|
|
|
public string $SaveDir; |
2370
|
|
|
|
2371
|
|
|
/** |
2372
|
|
|
* Directory where phpMyAdmin can save temporary files. |
2373
|
|
|
* |
2374
|
|
|
* ```php |
2375
|
|
|
* $cfg['TempDir'] = './tmp/'; |
2376
|
|
|
* ``` |
2377
|
|
|
* |
2378
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_TempDir |
2379
|
|
|
*/ |
2380
|
|
|
public string $TempDir; |
2381
|
|
|
|
2382
|
|
|
/** |
2383
|
|
|
* Is GD >= 2 available? Set to yes/no/auto. 'auto' does auto-detection, |
2384
|
|
|
* which is the only safe way to determine GD version. |
2385
|
|
|
* |
2386
|
|
|
* ```php |
2387
|
|
|
* $cfg['GD2Available'] = 'auto'; |
2388
|
|
|
* ``` |
2389
|
|
|
* |
2390
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_GD2Available |
2391
|
|
|
* |
2392
|
|
|
* @psalm-var 'auto'|'yes'|'no' |
2393
|
|
|
*/ |
2394
|
|
|
public string $GD2Available; |
2395
|
|
|
|
2396
|
|
|
/** |
2397
|
|
|
* Lists proxy IP and HTTP header combinations which are trusted for IP allow/deny |
2398
|
|
|
* |
2399
|
|
|
* ```php |
2400
|
|
|
* $cfg['TrustedProxies'] = []; |
2401
|
|
|
* ``` |
2402
|
|
|
* |
2403
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_TrustedProxies |
2404
|
|
|
* |
2405
|
|
|
* @var array<string, string> |
2406
|
|
|
*/ |
2407
|
|
|
public array $TrustedProxies; |
2408
|
|
|
|
2409
|
|
|
/** |
2410
|
|
|
* We normally check the permissions on the configuration file to ensure |
2411
|
|
|
* it's not world writable. However, phpMyAdmin could be installed on |
2412
|
|
|
* a NTFS filesystem mounted on a non-Windows server, in which case the |
2413
|
|
|
* permissions seems wrong but in fact cannot be detected. In this case |
2414
|
|
|
* a sysadmin would set the following to false. |
2415
|
|
|
* |
2416
|
|
|
* ```php |
2417
|
|
|
* $cfg['CheckConfigurationPermissions'] = true; |
2418
|
|
|
* ``` |
2419
|
|
|
* |
2420
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CheckConfigurationPermissions |
2421
|
|
|
*/ |
2422
|
|
|
public bool $CheckConfigurationPermissions; |
2423
|
|
|
|
2424
|
|
|
/** |
2425
|
|
|
* Limit for length of URL in links. When length would be above this limit, it |
2426
|
|
|
* is replaced by form with button. |
2427
|
|
|
* This is required as some web servers (IIS) have problems with long URLs. |
2428
|
|
|
* The recommended limit is 2000 |
2429
|
|
|
* (see https://www.boutell.com/newfaq/misc/urllength.html) but we put |
2430
|
|
|
* 1000 to accommodate Suhosin, see bug #3358750. |
2431
|
|
|
* |
2432
|
|
|
* ```php |
2433
|
|
|
* $cfg['LinkLengthLimit'] = 1000; |
2434
|
|
|
* ``` |
2435
|
|
|
* |
2436
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_LinkLengthLimit |
2437
|
|
|
* |
2438
|
|
|
* @psalm-var positive-int |
2439
|
|
|
*/ |
2440
|
|
|
public int $LinkLengthLimit; |
2441
|
|
|
|
2442
|
|
|
/** |
2443
|
|
|
* Additional string to allow in CSP headers. |
2444
|
|
|
* |
2445
|
|
|
* ```php |
2446
|
|
|
* $cfg['CSPAllow'] = ''; |
2447
|
|
|
* ``` |
2448
|
|
|
* |
2449
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_CSPAllow |
2450
|
|
|
*/ |
2451
|
|
|
public string $CSPAllow; |
2452
|
|
|
|
2453
|
|
|
/** |
2454
|
|
|
* Disable the table maintenance mass operations, like optimizing or |
2455
|
|
|
* repairing the selected tables of a database. An accidental execution |
2456
|
|
|
* of such a maintenance task can enormously slow down a bigger database. |
2457
|
|
|
* |
2458
|
|
|
* ```php |
2459
|
|
|
* $cfg['DisableMultiTableMaintenance'] = false; |
2460
|
|
|
* ``` |
2461
|
|
|
* |
2462
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_DisableMultiTableMaintenance |
2463
|
|
|
*/ |
2464
|
|
|
public bool $DisableMultiTableMaintenance; |
2465
|
|
|
|
2466
|
|
|
/** |
2467
|
|
|
* Whether or not to query the user before sending the error report to |
2468
|
|
|
* the phpMyAdmin team when a JavaScript error occurs |
2469
|
|
|
* |
2470
|
|
|
* Available options |
2471
|
|
|
* (ask | always | never) |
2472
|
|
|
* |
2473
|
|
|
* ```php |
2474
|
|
|
* $cfg['SendErrorReports'] = 'ask'; |
2475
|
|
|
* ``` |
2476
|
|
|
* |
2477
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_SendErrorReports |
2478
|
|
|
* |
2479
|
|
|
* @psalm-var 'ask'|'always'|'never' |
2480
|
|
|
*/ |
2481
|
|
|
public string $SendErrorReports; |
2482
|
|
|
|
2483
|
|
|
/** |
2484
|
|
|
* Whether Enter or Ctrl+Enter executes queries in the console. |
2485
|
|
|
* |
2486
|
|
|
* ```php |
2487
|
|
|
* $cfg['ConsoleEnterExecutes'] = false; |
2488
|
|
|
* ``` |
2489
|
|
|
* |
2490
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ConsoleEnterExecutes |
2491
|
|
|
*/ |
2492
|
|
|
public bool $ConsoleEnterExecutes; |
2493
|
|
|
|
2494
|
|
|
/** |
2495
|
|
|
* Zero Configuration mode. |
2496
|
|
|
* |
2497
|
|
|
* ```php |
2498
|
|
|
* $cfg['ZeroConf'] = true; |
2499
|
|
|
* ``` |
2500
|
|
|
* |
2501
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ZeroConf |
2502
|
|
|
*/ |
2503
|
|
|
public bool $zeroConf; |
2504
|
|
|
|
2505
|
|
|
/** |
2506
|
|
|
* Developers ONLY! |
2507
|
|
|
* |
2508
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_DBG |
2509
|
|
|
*/ |
2510
|
|
|
public Debug $debug; |
2511
|
|
|
|
2512
|
|
|
/** |
2513
|
|
|
* Sets the working environment |
2514
|
|
|
* |
2515
|
|
|
* This only needs to be changed when you are developing phpMyAdmin itself. |
2516
|
|
|
* The development mode may display debug information in some places. |
2517
|
|
|
* |
2518
|
|
|
* Possible values are 'production' or 'development' |
2519
|
|
|
* |
2520
|
|
|
* ```php |
2521
|
|
|
* $cfg['environment'] = 'production'; |
2522
|
|
|
* ``` |
2523
|
|
|
* |
2524
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_environment |
2525
|
|
|
* |
2526
|
|
|
* @psalm-var 'production'|'development' |
2527
|
|
|
*/ |
2528
|
|
|
public string $environment; |
2529
|
|
|
|
2530
|
|
|
/** |
2531
|
|
|
* Default functions for above defined groups |
2532
|
|
|
* |
2533
|
|
|
* ```php |
2534
|
|
|
* $cfg['DefaultFunctions'] = [ |
2535
|
|
|
* 'FUNC_CHAR' => '', |
2536
|
|
|
* 'FUNC_DATE' => '', |
2537
|
|
|
* 'FUNC_NUMBER' => '', |
2538
|
|
|
* 'FUNC_SPATIAL' => 'GeomFromText', |
2539
|
|
|
* 'FUNC_UUID' => 'UUID', |
2540
|
|
|
* 'first_timestamp' => 'NOW', |
2541
|
|
|
* ]; |
2542
|
|
|
* ``` |
2543
|
|
|
* |
2544
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_DefaultFunctions |
2545
|
|
|
* |
2546
|
|
|
* @var array<string, string> |
2547
|
|
|
*/ |
2548
|
|
|
public array $DefaultFunctions; |
2549
|
|
|
|
2550
|
|
|
/** |
2551
|
|
|
* Max rows retrieved for zoom search |
2552
|
|
|
* |
2553
|
|
|
* ```php |
2554
|
|
|
* $cfg['maxRowPlotLimit'] = 500; |
2555
|
|
|
* ``` |
2556
|
|
|
* |
2557
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_maxRowPlotLimit |
2558
|
|
|
* |
2559
|
|
|
* @psalm-var positive-int |
2560
|
|
|
*/ |
2561
|
|
|
public int $maxRowPlotLimit; |
2562
|
|
|
|
2563
|
|
|
/** |
2564
|
|
|
* Show Git revision if applicable |
2565
|
|
|
* |
2566
|
|
|
* ```php |
2567
|
|
|
* $cfg['ShowGitRevision'] = true; |
2568
|
|
|
* ``` |
2569
|
|
|
* |
2570
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_ShowGitRevision |
2571
|
|
|
*/ |
2572
|
|
|
public bool $ShowGitRevision; |
2573
|
|
|
|
2574
|
|
|
/** |
2575
|
|
|
* MySQL minimal version required |
2576
|
|
|
* |
2577
|
|
|
* ```php |
2578
|
|
|
* $cfg['MysqlMinVersion'] = ['internal' => 50500, 'human' => '5.5.0']; |
2579
|
|
|
* ``` |
2580
|
|
|
* |
2581
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_MysqlMinVersion |
2582
|
|
|
* |
2583
|
|
|
* @var array<string, int|string> |
2584
|
|
|
* @psalm-var array{internal: int, human: string} |
2585
|
|
|
*/ |
2586
|
|
|
public array $mysqlMinVersion; |
2587
|
|
|
|
2588
|
|
|
/** |
2589
|
|
|
* Disable shortcuts |
2590
|
|
|
* |
2591
|
|
|
* ```php |
2592
|
|
|
* $cfg['DisableShortcutKeys'] = false; |
2593
|
|
|
* ``` |
2594
|
|
|
* |
2595
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_DisableShortcutKeys |
2596
|
|
|
*/ |
2597
|
|
|
public bool $DisableShortcutKeys; |
2598
|
|
|
|
2599
|
|
|
/** |
2600
|
|
|
* Console configuration |
2601
|
|
|
* |
2602
|
|
|
* This is mostly meant for user preferences. |
2603
|
|
|
*/ |
2604
|
|
|
public Console $Console; |
2605
|
|
|
|
2606
|
|
|
/** |
2607
|
|
|
* Initialize default transformations array |
2608
|
|
|
* |
2609
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_DefaultTransformations |
2610
|
|
|
*/ |
2611
|
|
|
public Transformations $DefaultTransformations; |
2612
|
|
|
|
2613
|
|
|
/** |
2614
|
|
|
* Set default for FirstDayOfCalendar |
2615
|
|
|
* |
2616
|
|
|
* ```php |
2617
|
|
|
* $cfg['FirstDayOfCalendar'] = 0; |
2618
|
|
|
* ``` |
2619
|
|
|
* |
2620
|
|
|
* @link https://docs.phpmyadmin.net/en/latest/config.html#cfg_FirstDayOfCalendar |
2621
|
|
|
* |
2622
|
|
|
* @psalm-var 0|positive-int |
2623
|
|
|
*/ |
2624
|
|
|
public int $FirstDayOfCalendar; |
2625
|
|
|
|
2626
|
|
|
/** @param array<int|string, mixed> $settings */ |
2627
|
592 |
|
public function __construct(array $settings) |
2628
|
|
|
{ |
2629
|
592 |
|
$this->PmaAbsoluteUri = $this->setPmaAbsoluteUri($settings); |
2630
|
592 |
|
$this->authLog = $this->setAuthLog($settings); |
2631
|
592 |
|
$this->authLogSuccess = $this->setAuthLogSuccess($settings); |
2632
|
592 |
|
$this->PmaNoRelation_DisableWarning = $this->setPmaNoRelationDisableWarning($settings); |
2633
|
592 |
|
$this->SuhosinDisableWarning = $this->setSuhosinDisableWarning($settings); |
2634
|
592 |
|
$this->LoginCookieValidityDisableWarning = $this->setLoginCookieValidityDisableWarning($settings); |
2635
|
592 |
|
$this->ReservedWordDisableWarning = $this->setReservedWordDisableWarning($settings); |
2636
|
592 |
|
$this->TranslationWarningThreshold = $this->setTranslationWarningThreshold($settings); |
2637
|
592 |
|
$this->AllowThirdPartyFraming = $this->setAllowThirdPartyFraming($settings); |
2638
|
592 |
|
$this->blowfish_secret = $this->setBlowfishSecret($settings); |
2639
|
592 |
|
$this->Servers = $this->setServers($settings); |
2640
|
592 |
|
$this->ServerDefault = $this->setServerDefault($settings); |
2641
|
592 |
|
$this->VersionCheck = $this->setVersionCheck($settings); |
2642
|
592 |
|
$this->ProxyUrl = $this->setProxyUrl($settings); |
2643
|
592 |
|
$this->ProxyUser = $this->setProxyUser($settings); |
2644
|
592 |
|
$this->ProxyPass = $this->setProxyPass($settings); |
2645
|
592 |
|
$this->MaxDbList = $this->setMaxDbList($settings); |
2646
|
592 |
|
$this->MaxTableList = $this->setMaxTableList($settings); |
2647
|
592 |
|
$this->ShowHint = $this->setShowHint($settings); |
2648
|
592 |
|
$this->MaxCharactersInDisplayedSQL = $this->setMaxCharactersInDisplayedSQL($settings); |
2649
|
592 |
|
$this->OBGzip = $this->setOBGzip($settings); |
2650
|
592 |
|
$this->PersistentConnections = $this->setPersistentConnections($settings); |
2651
|
592 |
|
$this->ExecTimeLimit = $this->setExecTimeLimit($settings); |
2652
|
592 |
|
$this->SessionSavePath = $this->setSessionSavePath($settings); |
2653
|
592 |
|
$this->MysqlSslWarningSafeHosts = $this->setMysqlSslWarningSafeHosts($settings); |
2654
|
592 |
|
$this->MemoryLimit = $this->setMemoryLimit($settings); |
2655
|
592 |
|
$this->SkipLockedTables = $this->setSkipLockedTables($settings); |
2656
|
592 |
|
$this->ShowSQL = $this->setShowSQL($settings); |
2657
|
592 |
|
$this->RetainQueryBox = $this->setRetainQueryBox($settings); |
2658
|
592 |
|
$this->CodemirrorEnable = $this->setCodemirrorEnable($settings); |
2659
|
592 |
|
$this->LintEnable = $this->setLintEnable($settings); |
2660
|
592 |
|
$this->AllowUserDropDatabase = $this->setAllowUserDropDatabase($settings); |
2661
|
592 |
|
$this->Confirm = $this->setConfirm($settings); |
2662
|
592 |
|
$this->CookieSameSite = $this->setCookieSameSite($settings); |
2663
|
592 |
|
$this->LoginCookieRecall = $this->setLoginCookieRecall($settings); |
2664
|
592 |
|
$this->LoginCookieValidity = $this->setLoginCookieValidity($settings); |
2665
|
592 |
|
$this->LoginCookieStore = $this->setLoginCookieStore($settings); |
2666
|
592 |
|
$this->LoginCookieDeleteAll = $this->setLoginCookieDeleteAll($settings); |
2667
|
592 |
|
$this->UseDbSearch = $this->setUseDbSearch($settings); |
2668
|
592 |
|
$this->IgnoreMultiSubmitErrors = $this->setIgnoreMultiSubmitErrors($settings); |
2669
|
592 |
|
$this->URLQueryEncryption = $this->setURLQueryEncryption($settings); |
2670
|
592 |
|
$this->URLQueryEncryptionSecretKey = $this->setURLQueryEncryptionSecretKey($settings); |
2671
|
592 |
|
$this->AllowArbitraryServer = $this->setAllowArbitraryServer($settings); |
2672
|
592 |
|
$this->ArbitraryServerRegexp = $this->setArbitraryServerRegexp($settings); |
2673
|
592 |
|
$this->CaptchaMethod = $this->setCaptchaMethod($settings); |
2674
|
592 |
|
$this->CaptchaApi = $this->setCaptchaApi($settings); |
2675
|
592 |
|
$this->CaptchaCsp = $this->setCaptchaCsp($settings); |
2676
|
592 |
|
$this->CaptchaRequestParam = $this->setCaptchaRequestParam($settings); |
2677
|
592 |
|
$this->CaptchaResponseParam = $this->setCaptchaResponseParam($settings); |
2678
|
592 |
|
$this->CaptchaLoginPublicKey = $this->setCaptchaLoginPublicKey($settings); |
2679
|
592 |
|
$this->CaptchaLoginPrivateKey = $this->setCaptchaLoginPrivateKey($settings); |
2680
|
592 |
|
$this->CaptchaSiteVerifyURL = $this->setCaptchaSiteVerifyURL($settings); |
2681
|
592 |
|
$this->enable_drag_drop_import = $this->setEnableDragDropImport($settings); |
2682
|
592 |
|
$this->ShowDatabasesNavigationAsTree = $this->setShowDatabasesNavigationAsTree($settings); |
2683
|
592 |
|
$this->FirstLevelNavigationItems = $this->setFirstLevelNavigationItems($settings); |
2684
|
592 |
|
$this->MaxNavigationItems = $this->setMaxNavigationItems($settings); |
2685
|
592 |
|
$this->NavigationTreeEnableGrouping = $this->setNavigationTreeEnableGrouping($settings); |
2686
|
592 |
|
$this->NavigationTreeDbSeparator = $this->setNavigationTreeDbSeparator($settings); |
2687
|
592 |
|
$this->NavigationTreeTableSeparator = $this->setNavigationTreeTableSeparator($settings); |
2688
|
592 |
|
$this->NavigationTreeTableLevel = $this->setNavigationTreeTableLevel($settings); |
2689
|
592 |
|
$this->NavigationLinkWithMainPanel = $this->setNavigationLinkWithMainPanel($settings); |
2690
|
592 |
|
$this->NavigationDisplayLogo = $this->setNavigationDisplayLogo($settings); |
2691
|
592 |
|
$this->NavigationLogoLink = $this->setNavigationLogoLink($settings); |
2692
|
592 |
|
$this->NavigationLogoLinkWindow = $this->setNavigationLogoLinkWindow($settings); |
2693
|
592 |
|
$this->NumRecentTables = $this->setNumRecentTables($settings); |
2694
|
592 |
|
$this->NumFavoriteTables = $this->setNumFavoriteTables($settings); |
2695
|
592 |
|
$this->NavigationTreeDisplayItemFilterMinimum = $this->setNavigationTreeDisplayItemFilterMinimum($settings); |
2696
|
592 |
|
$this->NavigationDisplayServers = $this->setNavigationDisplayServers($settings); |
2697
|
592 |
|
$this->DisplayServersList = $this->setDisplayServersList($settings); |
2698
|
592 |
|
$this->NavigationTreeDisplayDbFilterMinimum = $this->setNavigationTreeDisplayDbFilterMinimum($settings); |
2699
|
592 |
|
$this->NavigationTreeDefaultTabTable = $this->setNavigationTreeDefaultTabTable($settings); |
2700
|
592 |
|
$this->NavigationTreeDefaultTabTable2 = $this->setNavigationTreeDefaultTabTable2($settings); |
2701
|
592 |
|
$this->NavigationTreeEnableExpansion = $this->setNavigationTreeEnableExpansion($settings); |
2702
|
592 |
|
$this->NavigationTreeShowTables = $this->setNavigationTreeShowTables($settings); |
2703
|
592 |
|
$this->NavigationTreeShowViews = $this->setNavigationTreeShowViews($settings); |
2704
|
592 |
|
$this->NavigationTreeShowFunctions = $this->setNavigationTreeShowFunctions($settings); |
2705
|
592 |
|
$this->NavigationTreeShowProcedures = $this->setNavigationTreeShowProcedures($settings); |
2706
|
592 |
|
$this->NavigationTreeShowEvents = $this->setNavigationTreeShowEvents($settings); |
2707
|
592 |
|
$this->NavigationWidth = $this->setNavigationWidth($settings); |
2708
|
592 |
|
$this->NavigationTreeAutoexpandSingleDb = $this->setNavigationTreeAutoexpandSingleDb($settings); |
2709
|
592 |
|
$this->ShowStats = $this->setShowStats($settings); |
2710
|
592 |
|
$this->ShowPhpInfo = $this->setShowPhpInfo($settings); |
2711
|
592 |
|
$this->ShowServerInfo = $this->setShowServerInfo($settings); |
2712
|
592 |
|
$this->ShowChgPassword = $this->setShowChgPassword($settings); |
2713
|
592 |
|
$this->ShowCreateDb = $this->setShowCreateDb($settings); |
2714
|
592 |
|
$this->ShowDbStructureCharset = $this->setShowDbStructureCharset($settings); |
2715
|
592 |
|
$this->ShowDbStructureComment = $this->setShowDbStructureComment($settings); |
2716
|
592 |
|
$this->ShowDbStructureCreation = $this->setShowDbStructureCreation($settings); |
2717
|
592 |
|
$this->ShowDbStructureLastUpdate = $this->setShowDbStructureLastUpdate($settings); |
2718
|
592 |
|
$this->ShowDbStructureLastCheck = $this->setShowDbStructureLastCheck($settings); |
2719
|
592 |
|
$this->HideStructureActions = $this->setHideStructureActions($settings); |
2720
|
592 |
|
$this->ShowColumnComments = $this->setShowColumnComments($settings); |
2721
|
592 |
|
$this->TableNavigationLinksMode = $this->setTableNavigationLinksMode($settings); |
2722
|
592 |
|
$this->showAll = $this->setShowAll($settings); |
2723
|
592 |
|
$this->maxRows = $this->setMaxRows($settings); |
2724
|
592 |
|
$this->Order = $this->setOrder($settings); |
2725
|
592 |
|
$this->SaveCellsAtOnce = $this->setSaveCellsAtOnce($settings); |
2726
|
592 |
|
$this->GridEditing = $this->setGridEditing($settings); |
2727
|
592 |
|
$this->RelationalDisplay = $this->setRelationalDisplay($settings); |
2728
|
592 |
|
$this->ProtectBinary = $this->setProtectBinary($settings); |
2729
|
592 |
|
$this->ShowFunctionFields = $this->setShowFunctionFields($settings); |
2730
|
592 |
|
$this->ShowFieldTypesInDataEditView = $this->setShowFieldTypesInDataEditView($settings); |
2731
|
592 |
|
$this->CharEditing = $this->setCharEditing($settings); |
2732
|
592 |
|
$this->MinSizeForInputField = $this->setMinSizeForInputField($settings); |
2733
|
592 |
|
$this->MaxSizeForInputField = $this->setMaxSizeForInputField($settings); |
2734
|
592 |
|
$this->InsertRows = $this->setInsertRows($settings); |
2735
|
592 |
|
$this->ForeignKeyDropdownOrder = $this->setForeignKeyDropdownOrder($settings); |
2736
|
592 |
|
$this->ForeignKeyMaxLimit = $this->setForeignKeyMaxLimit($settings); |
2737
|
592 |
|
$this->DefaultForeignKeyChecks = $this->setDefaultForeignKeyChecks($settings); |
2738
|
592 |
|
$this->ZipDump = $this->setZipDump($settings); |
2739
|
592 |
|
$this->GZipDump = $this->setGZipDump($settings); |
2740
|
592 |
|
$this->BZipDump = $this->setBZipDump($settings); |
2741
|
592 |
|
$this->CompressOnFly = $this->setCompressOnFly($settings); |
2742
|
592 |
|
$this->TabsMode = $this->setTabsMode($settings); |
2743
|
592 |
|
$this->ActionLinksMode = $this->setActionLinksMode($settings); |
2744
|
592 |
|
$this->PropertiesNumColumns = $this->setPropertiesNumColumns($settings); |
2745
|
592 |
|
$this->DefaultTabServer = $this->setDefaultTabServer($settings); |
2746
|
592 |
|
$this->DefaultTabDatabase = $this->setDefaultTabDatabase($settings); |
2747
|
592 |
|
$this->DefaultTabTable = $this->setDefaultTabTable($settings); |
2748
|
592 |
|
$this->RowActionType = $this->setRowActionType($settings); |
2749
|
592 |
|
$this->Export = $this->setExport($settings); |
2750
|
592 |
|
$this->Import = $this->setImport($settings); |
2751
|
592 |
|
$this->Schema = $this->setSchema($settings); |
2752
|
592 |
|
$this->PDFPageSizes = $this->setPDFPageSizes($settings); |
2753
|
592 |
|
$this->PDFDefaultPageSize = $this->setPDFDefaultPageSize($settings); |
2754
|
592 |
|
$this->DefaultLang = $this->setDefaultLang($settings); |
2755
|
592 |
|
$this->DefaultConnectionCollation = $this->setDefaultConnectionCollation($settings); |
2756
|
592 |
|
$this->Lang = $this->setLang($settings); |
2757
|
592 |
|
$this->FilterLanguages = $this->setFilterLanguages($settings); |
2758
|
592 |
|
$this->RecodingEngine = $this->setRecodingEngine($settings); |
2759
|
592 |
|
$this->IconvExtraParams = $this->setIconvExtraParams($settings); |
2760
|
592 |
|
$this->AvailableCharsets = $this->setAvailableCharsets($settings); |
2761
|
592 |
|
$this->NavigationTreePointerEnable = $this->setNavigationTreePointerEnable($settings); |
2762
|
592 |
|
$this->BrowsePointerEnable = $this->setBrowsePointerEnable($settings); |
2763
|
592 |
|
$this->BrowseMarkerEnable = $this->setBrowseMarkerEnable($settings); |
2764
|
592 |
|
$this->TextareaCols = $this->setTextareaCols($settings); |
2765
|
592 |
|
$this->TextareaRows = $this->setTextareaRows($settings); |
2766
|
592 |
|
$this->LongtextDoubleTextarea = $this->setLongtextDoubleTextarea($settings); |
2767
|
592 |
|
$this->TextareaAutoSelect = $this->setTextareaAutoSelect($settings); |
2768
|
592 |
|
$this->CharTextareaCols = $this->setCharTextareaCols($settings); |
2769
|
592 |
|
$this->CharTextareaRows = $this->setCharTextareaRows($settings); |
2770
|
592 |
|
$this->limitChars = $this->setLimitChars($settings); |
2771
|
592 |
|
$this->RowActionLinks = $this->setRowActionLinks($settings); |
2772
|
592 |
|
$this->RowActionLinksWithoutUnique = $this->setRowActionLinksWithoutUnique($settings); |
2773
|
592 |
|
$this->TablePrimaryKeyOrder = $this->setTablePrimaryKeyOrder($settings); |
2774
|
592 |
|
$this->RememberSorting = $this->setRememberSorting($settings); |
2775
|
592 |
|
$this->ShowBrowseComments = $this->setShowBrowseComments($settings); |
2776
|
592 |
|
$this->ShowPropertyComments = $this->setShowPropertyComments($settings); |
2777
|
592 |
|
$this->repeatCells = $this->setRepeatCells($settings); |
2778
|
592 |
|
$this->QueryHistoryDB = $this->setQueryHistoryDB($settings); |
2779
|
592 |
|
$this->QueryHistoryMax = $this->setQueryHistoryMax($settings); |
2780
|
592 |
|
$this->AllowSharedBookmarks = $this->setAllowSharedBookmarks($settings); |
2781
|
592 |
|
$this->BrowseMIME = $this->setBrowseMIME($settings); |
2782
|
592 |
|
$this->MaxExactCount = $this->setMaxExactCount($settings); |
2783
|
592 |
|
$this->MaxExactCountViews = $this->setMaxExactCountViews($settings); |
2784
|
592 |
|
$this->NaturalOrder = $this->setNaturalOrder($settings); |
2785
|
592 |
|
$this->InitialSlidersState = $this->setInitialSlidersState($settings); |
2786
|
592 |
|
$this->UserprefsDisallow = $this->setUserprefsDisallow($settings); |
2787
|
592 |
|
$this->UserprefsDeveloperTab = $this->setUserprefsDeveloperTab($settings); |
2788
|
592 |
|
$this->TitleTable = $this->setTitleTable($settings); |
2789
|
592 |
|
$this->TitleDatabase = $this->setTitleDatabase($settings); |
2790
|
592 |
|
$this->TitleServer = $this->setTitleServer($settings); |
2791
|
592 |
|
$this->TitleDefault = $this->setTitleDefault($settings); |
2792
|
592 |
|
$this->ThemeManager = $this->setThemeManager($settings); |
2793
|
592 |
|
$this->ThemeDefault = $this->setThemeDefault($settings); |
2794
|
592 |
|
$this->ThemePerServer = $this->setThemePerServer($settings); |
2795
|
592 |
|
$this->DefaultQueryTable = $this->setDefaultQueryTable($settings); |
2796
|
592 |
|
$this->DefaultQueryDatabase = $this->setDefaultQueryDatabase($settings); |
2797
|
592 |
|
$this->SQLQuery = $this->setSQLQuery($settings); |
2798
|
592 |
|
$this->EnableAutocompleteForTablesAndColumns = $this->setEnableAutocompleteForTablesAndColumns($settings); |
2799
|
592 |
|
$this->UploadDir = $this->setUploadDir($settings); |
2800
|
592 |
|
$this->SaveDir = $this->setSaveDir($settings); |
2801
|
592 |
|
$this->TempDir = $this->setTempDir($settings); |
2802
|
592 |
|
$this->GD2Available = $this->setGD2Available($settings); |
2803
|
592 |
|
$this->TrustedProxies = $this->setTrustedProxies($settings); |
2804
|
592 |
|
$this->CheckConfigurationPermissions = $this->setCheckConfigurationPermissions($settings); |
2805
|
592 |
|
$this->LinkLengthLimit = $this->setLinkLengthLimit($settings); |
2806
|
592 |
|
$this->CSPAllow = $this->setCSPAllow($settings); |
2807
|
592 |
|
$this->DisableMultiTableMaintenance = $this->setDisableMultiTableMaintenance($settings); |
2808
|
592 |
|
$this->SendErrorReports = $this->setSendErrorReports($settings); |
2809
|
592 |
|
$this->ConsoleEnterExecutes = $this->setConsoleEnterExecutes($settings); |
2810
|
592 |
|
$this->zeroConf = $this->setZeroConf($settings); |
2811
|
592 |
|
$this->debug = $this->setDebug($settings); |
2812
|
592 |
|
$this->environment = $this->setEnvironment($settings); |
2813
|
592 |
|
$this->DefaultFunctions = $this->setDefaultFunctions($settings); |
2814
|
592 |
|
$this->maxRowPlotLimit = $this->setMaxRowPlotLimit($settings); |
2815
|
592 |
|
$this->ShowGitRevision = $this->setShowGitRevision($settings); |
2816
|
592 |
|
$this->mysqlMinVersion = $this->setMysqlMinVersion($settings); |
2817
|
592 |
|
$this->DisableShortcutKeys = $this->setDisableShortcutKeys($settings); |
2818
|
592 |
|
$this->Console = $this->setConsole($settings); |
2819
|
592 |
|
$this->DefaultTransformations = $this->setDefaultTransformations($settings); |
2820
|
592 |
|
$this->FirstDayOfCalendar = $this->setFirstDayOfCalendar($settings); |
2821
|
|
|
} |
2822
|
|
|
|
2823
|
|
|
/** @psalm-return SettingsType */ |
2824
|
592 |
|
public function asArray(): array |
2825
|
|
|
{ |
2826
|
592 |
|
return [ |
2827
|
592 |
|
'PmaAbsoluteUri' => $this->PmaAbsoluteUri, |
2828
|
592 |
|
'AuthLog' => $this->authLog, |
2829
|
592 |
|
'AuthLogSuccess' => $this->authLogSuccess, |
2830
|
592 |
|
'PmaNoRelation_DisableWarning' => $this->PmaNoRelation_DisableWarning, |
2831
|
592 |
|
'SuhosinDisableWarning' => $this->SuhosinDisableWarning, |
2832
|
592 |
|
'LoginCookieValidityDisableWarning' => $this->LoginCookieValidityDisableWarning, |
2833
|
592 |
|
'ReservedWordDisableWarning' => $this->ReservedWordDisableWarning, |
2834
|
592 |
|
'TranslationWarningThreshold' => $this->TranslationWarningThreshold, |
2835
|
592 |
|
'AllowThirdPartyFraming' => $this->AllowThirdPartyFraming, |
2836
|
592 |
|
'blowfish_secret' => $this->blowfish_secret, |
2837
|
592 |
|
'Servers' => array_map(static fn (Server $server): array => $server->asArray(), $this->Servers), |
2838
|
592 |
|
'ServerDefault' => $this->ServerDefault, |
2839
|
592 |
|
'VersionCheck' => $this->VersionCheck, |
2840
|
592 |
|
'ProxyUrl' => $this->ProxyUrl, |
2841
|
592 |
|
'ProxyUser' => $this->ProxyUser, |
2842
|
592 |
|
'ProxyPass' => $this->ProxyPass, |
2843
|
592 |
|
'MaxDbList' => $this->MaxDbList, |
2844
|
592 |
|
'MaxTableList' => $this->MaxTableList, |
2845
|
592 |
|
'ShowHint' => $this->ShowHint, |
2846
|
592 |
|
'MaxCharactersInDisplayedSQL' => $this->MaxCharactersInDisplayedSQL, |
2847
|
592 |
|
'OBGzip' => $this->OBGzip, |
2848
|
592 |
|
'PersistentConnections' => $this->PersistentConnections, |
2849
|
592 |
|
'ExecTimeLimit' => $this->ExecTimeLimit, |
2850
|
592 |
|
'SessionSavePath' => $this->SessionSavePath, |
2851
|
592 |
|
'MysqlSslWarningSafeHosts' => $this->MysqlSslWarningSafeHosts, |
2852
|
592 |
|
'MemoryLimit' => $this->MemoryLimit, |
2853
|
592 |
|
'SkipLockedTables' => $this->SkipLockedTables, |
2854
|
592 |
|
'ShowSQL' => $this->ShowSQL, |
2855
|
592 |
|
'RetainQueryBox' => $this->RetainQueryBox, |
2856
|
592 |
|
'CodemirrorEnable' => $this->CodemirrorEnable, |
2857
|
592 |
|
'LintEnable' => $this->LintEnable, |
2858
|
592 |
|
'AllowUserDropDatabase' => $this->AllowUserDropDatabase, |
2859
|
592 |
|
'Confirm' => $this->Confirm, |
2860
|
592 |
|
'CookieSameSite' => $this->CookieSameSite, |
2861
|
592 |
|
'LoginCookieRecall' => $this->LoginCookieRecall, |
2862
|
592 |
|
'LoginCookieValidity' => $this->LoginCookieValidity, |
2863
|
592 |
|
'LoginCookieStore' => $this->LoginCookieStore, |
2864
|
592 |
|
'LoginCookieDeleteAll' => $this->LoginCookieDeleteAll, |
2865
|
592 |
|
'UseDbSearch' => $this->UseDbSearch, |
2866
|
592 |
|
'IgnoreMultiSubmitErrors' => $this->IgnoreMultiSubmitErrors, |
2867
|
592 |
|
'URLQueryEncryption' => $this->URLQueryEncryption, |
2868
|
592 |
|
'URLQueryEncryptionSecretKey' => $this->URLQueryEncryptionSecretKey, |
2869
|
592 |
|
'AllowArbitraryServer' => $this->AllowArbitraryServer, |
2870
|
592 |
|
'ArbitraryServerRegexp' => $this->ArbitraryServerRegexp, |
2871
|
592 |
|
'CaptchaMethod' => $this->CaptchaMethod, |
2872
|
592 |
|
'CaptchaApi' => $this->CaptchaApi, |
2873
|
592 |
|
'CaptchaCsp' => $this->CaptchaCsp, |
2874
|
592 |
|
'CaptchaRequestParam' => $this->CaptchaRequestParam, |
2875
|
592 |
|
'CaptchaResponseParam' => $this->CaptchaResponseParam, |
2876
|
592 |
|
'CaptchaLoginPublicKey' => $this->CaptchaLoginPublicKey, |
2877
|
592 |
|
'CaptchaLoginPrivateKey' => $this->CaptchaLoginPrivateKey, |
2878
|
592 |
|
'CaptchaSiteVerifyURL' => $this->CaptchaSiteVerifyURL, |
2879
|
592 |
|
'enable_drag_drop_import' => $this->enable_drag_drop_import, |
2880
|
592 |
|
'ShowDatabasesNavigationAsTree' => $this->ShowDatabasesNavigationAsTree, |
2881
|
592 |
|
'FirstLevelNavigationItems' => $this->FirstLevelNavigationItems, |
2882
|
592 |
|
'MaxNavigationItems' => $this->MaxNavigationItems, |
2883
|
592 |
|
'NavigationTreeEnableGrouping' => $this->NavigationTreeEnableGrouping, |
2884
|
592 |
|
'NavigationTreeDbSeparator' => $this->NavigationTreeDbSeparator, |
2885
|
592 |
|
'NavigationTreeTableSeparator' => $this->NavigationTreeTableSeparator, |
2886
|
592 |
|
'NavigationTreeTableLevel' => $this->NavigationTreeTableLevel, |
2887
|
592 |
|
'NavigationLinkWithMainPanel' => $this->NavigationLinkWithMainPanel, |
2888
|
592 |
|
'NavigationDisplayLogo' => $this->NavigationDisplayLogo, |
2889
|
592 |
|
'NavigationLogoLink' => $this->NavigationLogoLink, |
2890
|
592 |
|
'NavigationLogoLinkWindow' => $this->NavigationLogoLinkWindow, |
2891
|
592 |
|
'NumRecentTables' => $this->NumRecentTables, |
2892
|
592 |
|
'NumFavoriteTables' => $this->NumFavoriteTables, |
2893
|
592 |
|
'NavigationTreeDisplayItemFilterMinimum' => $this->NavigationTreeDisplayItemFilterMinimum, |
2894
|
592 |
|
'NavigationDisplayServers' => $this->NavigationDisplayServers, |
2895
|
592 |
|
'DisplayServersList' => $this->DisplayServersList, |
2896
|
592 |
|
'NavigationTreeDisplayDbFilterMinimum' => $this->NavigationTreeDisplayDbFilterMinimum, |
2897
|
592 |
|
'NavigationTreeDefaultTabTable' => $this->NavigationTreeDefaultTabTable, |
2898
|
592 |
|
'NavigationTreeDefaultTabTable2' => $this->NavigationTreeDefaultTabTable2, |
2899
|
592 |
|
'NavigationTreeEnableExpansion' => $this->NavigationTreeEnableExpansion, |
2900
|
592 |
|
'NavigationTreeShowTables' => $this->NavigationTreeShowTables, |
2901
|
592 |
|
'NavigationTreeShowViews' => $this->NavigationTreeShowViews, |
2902
|
592 |
|
'NavigationTreeShowFunctions' => $this->NavigationTreeShowFunctions, |
2903
|
592 |
|
'NavigationTreeShowProcedures' => $this->NavigationTreeShowProcedures, |
2904
|
592 |
|
'NavigationTreeShowEvents' => $this->NavigationTreeShowEvents, |
2905
|
592 |
|
'NavigationWidth' => $this->NavigationWidth, |
2906
|
592 |
|
'NavigationTreeAutoexpandSingleDb' => $this->NavigationTreeAutoexpandSingleDb, |
2907
|
592 |
|
'ShowStats' => $this->ShowStats, |
2908
|
592 |
|
'ShowPhpInfo' => $this->ShowPhpInfo, |
2909
|
592 |
|
'ShowServerInfo' => $this->ShowServerInfo, |
2910
|
592 |
|
'ShowChgPassword' => $this->ShowChgPassword, |
2911
|
592 |
|
'ShowCreateDb' => $this->ShowCreateDb, |
2912
|
592 |
|
'ShowDbStructureCharset' => $this->ShowDbStructureCharset, |
2913
|
592 |
|
'ShowDbStructureComment' => $this->ShowDbStructureComment, |
2914
|
592 |
|
'ShowDbStructureCreation' => $this->ShowDbStructureCreation, |
2915
|
592 |
|
'ShowDbStructureLastUpdate' => $this->ShowDbStructureLastUpdate, |
2916
|
592 |
|
'ShowDbStructureLastCheck' => $this->ShowDbStructureLastCheck, |
2917
|
592 |
|
'HideStructureActions' => $this->HideStructureActions, |
2918
|
592 |
|
'ShowColumnComments' => $this->ShowColumnComments, |
2919
|
592 |
|
'TableNavigationLinksMode' => $this->TableNavigationLinksMode, |
2920
|
592 |
|
'ShowAll' => $this->showAll, |
2921
|
592 |
|
'MaxRows' => $this->maxRows, |
2922
|
592 |
|
'Order' => $this->Order, |
2923
|
592 |
|
'SaveCellsAtOnce' => $this->SaveCellsAtOnce, |
2924
|
592 |
|
'GridEditing' => $this->GridEditing, |
2925
|
592 |
|
'RelationalDisplay' => $this->RelationalDisplay, |
2926
|
592 |
|
'ProtectBinary' => $this->ProtectBinary, |
2927
|
592 |
|
'ShowFunctionFields' => $this->ShowFunctionFields, |
2928
|
592 |
|
'ShowFieldTypesInDataEditView' => $this->ShowFieldTypesInDataEditView, |
2929
|
592 |
|
'CharEditing' => $this->CharEditing, |
2930
|
592 |
|
'MinSizeForInputField' => $this->MinSizeForInputField, |
2931
|
592 |
|
'MaxSizeForInputField' => $this->MaxSizeForInputField, |
2932
|
592 |
|
'InsertRows' => $this->InsertRows, |
2933
|
592 |
|
'ForeignKeyDropdownOrder' => $this->ForeignKeyDropdownOrder, |
2934
|
592 |
|
'ForeignKeyMaxLimit' => $this->ForeignKeyMaxLimit, |
2935
|
592 |
|
'DefaultForeignKeyChecks' => $this->DefaultForeignKeyChecks, |
2936
|
592 |
|
'ZipDump' => $this->ZipDump, |
2937
|
592 |
|
'GZipDump' => $this->GZipDump, |
2938
|
592 |
|
'BZipDump' => $this->BZipDump, |
2939
|
592 |
|
'CompressOnFly' => $this->CompressOnFly, |
2940
|
592 |
|
'TabsMode' => $this->TabsMode, |
2941
|
592 |
|
'ActionLinksMode' => $this->ActionLinksMode, |
2942
|
592 |
|
'PropertiesNumColumns' => $this->PropertiesNumColumns, |
2943
|
592 |
|
'DefaultTabServer' => $this->DefaultTabServer, |
2944
|
592 |
|
'DefaultTabDatabase' => $this->DefaultTabDatabase, |
2945
|
592 |
|
'DefaultTabTable' => $this->DefaultTabTable, |
2946
|
592 |
|
'RowActionType' => $this->RowActionType, |
2947
|
592 |
|
'Export' => $this->Export->asArray(), |
2948
|
592 |
|
'Import' => $this->Import->asArray(), |
2949
|
592 |
|
'Schema' => $this->Schema->asArray(), |
2950
|
592 |
|
'PDFPageSizes' => $this->PDFPageSizes, |
2951
|
592 |
|
'PDFDefaultPageSize' => $this->PDFDefaultPageSize, |
2952
|
592 |
|
'DefaultLang' => $this->DefaultLang, |
2953
|
592 |
|
'DefaultConnectionCollation' => $this->DefaultConnectionCollation, |
2954
|
592 |
|
'Lang' => $this->Lang, |
2955
|
592 |
|
'FilterLanguages' => $this->FilterLanguages, |
2956
|
592 |
|
'RecodingEngine' => $this->RecodingEngine, |
2957
|
592 |
|
'IconvExtraParams' => $this->IconvExtraParams, |
2958
|
592 |
|
'AvailableCharsets' => $this->AvailableCharsets, |
2959
|
592 |
|
'NavigationTreePointerEnable' => $this->NavigationTreePointerEnable, |
2960
|
592 |
|
'BrowsePointerEnable' => $this->BrowsePointerEnable, |
2961
|
592 |
|
'BrowseMarkerEnable' => $this->BrowseMarkerEnable, |
2962
|
592 |
|
'TextareaCols' => $this->TextareaCols, |
2963
|
592 |
|
'TextareaRows' => $this->TextareaRows, |
2964
|
592 |
|
'LongtextDoubleTextarea' => $this->LongtextDoubleTextarea, |
2965
|
592 |
|
'TextareaAutoSelect' => $this->TextareaAutoSelect, |
2966
|
592 |
|
'CharTextareaCols' => $this->CharTextareaCols, |
2967
|
592 |
|
'CharTextareaRows' => $this->CharTextareaRows, |
2968
|
592 |
|
'LimitChars' => $this->limitChars, |
2969
|
592 |
|
'RowActionLinks' => $this->RowActionLinks, |
2970
|
592 |
|
'RowActionLinksWithoutUnique' => $this->RowActionLinksWithoutUnique, |
2971
|
592 |
|
'TablePrimaryKeyOrder' => $this->TablePrimaryKeyOrder, |
2972
|
592 |
|
'RememberSorting' => $this->RememberSorting, |
2973
|
592 |
|
'ShowBrowseComments' => $this->ShowBrowseComments, |
2974
|
592 |
|
'ShowPropertyComments' => $this->ShowPropertyComments, |
2975
|
592 |
|
'RepeatCells' => $this->repeatCells, |
2976
|
592 |
|
'QueryHistoryDB' => $this->QueryHistoryDB, |
2977
|
592 |
|
'QueryHistoryMax' => $this->QueryHistoryMax, |
2978
|
592 |
|
'AllowSharedBookmarks' => $this->AllowSharedBookmarks, |
2979
|
592 |
|
'BrowseMIME' => $this->BrowseMIME, |
2980
|
592 |
|
'MaxExactCount' => $this->MaxExactCount, |
2981
|
592 |
|
'MaxExactCountViews' => $this->MaxExactCountViews, |
2982
|
592 |
|
'NaturalOrder' => $this->NaturalOrder, |
2983
|
592 |
|
'InitialSlidersState' => $this->InitialSlidersState, |
2984
|
592 |
|
'UserprefsDisallow' => $this->UserprefsDisallow, |
2985
|
592 |
|
'UserprefsDeveloperTab' => $this->UserprefsDeveloperTab, |
2986
|
592 |
|
'TitleTable' => $this->TitleTable, |
2987
|
592 |
|
'TitleDatabase' => $this->TitleDatabase, |
2988
|
592 |
|
'TitleServer' => $this->TitleServer, |
2989
|
592 |
|
'TitleDefault' => $this->TitleDefault, |
2990
|
592 |
|
'ThemeManager' => $this->ThemeManager, |
2991
|
592 |
|
'ThemeDefault' => $this->ThemeDefault, |
2992
|
592 |
|
'ThemePerServer' => $this->ThemePerServer, |
2993
|
592 |
|
'DefaultQueryTable' => $this->DefaultQueryTable, |
2994
|
592 |
|
'DefaultQueryDatabase' => $this->DefaultQueryDatabase, |
2995
|
592 |
|
'SQLQuery' => $this->SQLQuery->asArray(), |
2996
|
592 |
|
'EnableAutocompleteForTablesAndColumns' => $this->EnableAutocompleteForTablesAndColumns, |
2997
|
592 |
|
'UploadDir' => $this->UploadDir, |
2998
|
592 |
|
'SaveDir' => $this->SaveDir, |
2999
|
592 |
|
'TempDir' => $this->TempDir, |
3000
|
592 |
|
'GD2Available' => $this->GD2Available, |
3001
|
592 |
|
'TrustedProxies' => $this->TrustedProxies, |
3002
|
592 |
|
'CheckConfigurationPermissions' => $this->CheckConfigurationPermissions, |
3003
|
592 |
|
'LinkLengthLimit' => $this->LinkLengthLimit, |
3004
|
592 |
|
'CSPAllow' => $this->CSPAllow, |
3005
|
592 |
|
'DisableMultiTableMaintenance' => $this->DisableMultiTableMaintenance, |
3006
|
592 |
|
'SendErrorReports' => $this->SendErrorReports, |
3007
|
592 |
|
'ConsoleEnterExecutes' => $this->ConsoleEnterExecutes, |
3008
|
592 |
|
'ZeroConf' => $this->zeroConf, |
3009
|
592 |
|
'DBG' => $this->debug->asArray(), |
3010
|
592 |
|
'environment' => $this->environment, |
3011
|
592 |
|
'DefaultFunctions' => $this->DefaultFunctions, |
3012
|
592 |
|
'maxRowPlotLimit' => $this->maxRowPlotLimit, |
3013
|
592 |
|
'ShowGitRevision' => $this->ShowGitRevision, |
3014
|
592 |
|
'MysqlMinVersion' => $this->mysqlMinVersion, |
3015
|
592 |
|
'DisableShortcutKeys' => $this->DisableShortcutKeys, |
3016
|
592 |
|
'Console' => $this->Console->asArray(), |
3017
|
592 |
|
'DefaultTransformations' => $this->DefaultTransformations->asArray(), |
3018
|
592 |
|
'FirstDayOfCalendar' => $this->FirstDayOfCalendar, |
3019
|
592 |
|
]; |
3020
|
|
|
} |
3021
|
|
|
|
3022
|
|
|
/** @param array<int|string, mixed> $settings */ |
3023
|
592 |
|
private function setPmaAbsoluteUri(array $settings): string |
3024
|
|
|
{ |
3025
|
592 |
|
if (! isset($settings['PmaAbsoluteUri'])) { |
3026
|
580 |
|
return ''; |
3027
|
|
|
} |
3028
|
|
|
|
3029
|
12 |
|
return (string) $settings['PmaAbsoluteUri']; |
3030
|
|
|
} |
3031
|
|
|
|
3032
|
|
|
/** @param array<int|string, mixed> $settings */ |
3033
|
592 |
|
private function setAuthLog(array $settings): string |
3034
|
|
|
{ |
3035
|
592 |
|
if (! isset($settings['AuthLog'])) { |
3036
|
580 |
|
return 'auto'; |
3037
|
|
|
} |
3038
|
|
|
|
3039
|
12 |
|
return (string) $settings['AuthLog']; |
3040
|
|
|
} |
3041
|
|
|
|
3042
|
|
|
/** @param array<int|string, mixed> $settings */ |
3043
|
592 |
|
private function setAuthLogSuccess(array $settings): bool |
3044
|
|
|
{ |
3045
|
592 |
|
if (! isset($settings['AuthLogSuccess'])) { |
3046
|
580 |
|
return false; |
3047
|
|
|
} |
3048
|
|
|
|
3049
|
12 |
|
return (bool) $settings['AuthLogSuccess']; |
3050
|
|
|
} |
3051
|
|
|
|
3052
|
|
|
/** @param array<int|string, mixed> $settings */ |
3053
|
592 |
|
private function setPmaNoRelationDisableWarning(array $settings): bool |
3054
|
|
|
{ |
3055
|
592 |
|
if (! isset($settings['PmaNoRelation_DisableWarning'])) { |
3056
|
580 |
|
return false; |
3057
|
|
|
} |
3058
|
|
|
|
3059
|
12 |
|
return (bool) $settings['PmaNoRelation_DisableWarning']; |
3060
|
|
|
} |
3061
|
|
|
|
3062
|
|
|
/** @param array<int|string, mixed> $settings */ |
3063
|
592 |
|
private function setSuhosinDisableWarning(array $settings): bool |
3064
|
|
|
{ |
3065
|
592 |
|
if (! isset($settings['SuhosinDisableWarning'])) { |
3066
|
580 |
|
return false; |
3067
|
|
|
} |
3068
|
|
|
|
3069
|
12 |
|
return (bool) $settings['SuhosinDisableWarning']; |
3070
|
|
|
} |
3071
|
|
|
|
3072
|
|
|
/** @param array<int|string, mixed> $settings */ |
3073
|
592 |
|
private function setLoginCookieValidityDisableWarning(array $settings): bool |
3074
|
|
|
{ |
3075
|
592 |
|
if (! isset($settings['LoginCookieValidityDisableWarning'])) { |
3076
|
580 |
|
return false; |
3077
|
|
|
} |
3078
|
|
|
|
3079
|
12 |
|
return (bool) $settings['LoginCookieValidityDisableWarning']; |
3080
|
|
|
} |
3081
|
|
|
|
3082
|
|
|
/** @param array<int|string, mixed> $settings */ |
3083
|
592 |
|
private function setReservedWordDisableWarning(array $settings): bool |
3084
|
|
|
{ |
3085
|
592 |
|
if (! isset($settings['ReservedWordDisableWarning'])) { |
3086
|
580 |
|
return false; |
3087
|
|
|
} |
3088
|
|
|
|
3089
|
12 |
|
return (bool) $settings['ReservedWordDisableWarning']; |
3090
|
|
|
} |
3091
|
|
|
|
3092
|
|
|
/** @param array<int|string, mixed> $settings */ |
3093
|
592 |
|
private function setTranslationWarningThreshold(array $settings): int |
3094
|
|
|
{ |
3095
|
592 |
|
if (! isset($settings['TranslationWarningThreshold'])) { |
3096
|
576 |
|
return 80; |
3097
|
|
|
} |
3098
|
|
|
|
3099
|
16 |
|
$threshold = (int) $settings['TranslationWarningThreshold']; |
3100
|
16 |
|
if ($threshold < 0) { |
3101
|
4 |
|
return 80; |
3102
|
|
|
} |
3103
|
|
|
|
3104
|
12 |
|
return min($threshold, 100); |
3105
|
|
|
} |
3106
|
|
|
|
3107
|
|
|
/** |
3108
|
|
|
* @param array<int|string, mixed> $settings |
3109
|
|
|
* |
3110
|
|
|
* @psalm-return bool|'sameorigin' |
3111
|
|
|
*/ |
3112
|
592 |
|
private function setAllowThirdPartyFraming(array $settings): bool|string |
3113
|
|
|
{ |
3114
|
592 |
|
if (! isset($settings['AllowThirdPartyFraming'])) { |
3115
|
576 |
|
return false; |
3116
|
|
|
} |
3117
|
|
|
|
3118
|
16 |
|
if ($settings['AllowThirdPartyFraming'] === 'sameorigin') { |
3119
|
4 |
|
return 'sameorigin'; |
3120
|
|
|
} |
3121
|
|
|
|
3122
|
12 |
|
return (bool) $settings['AllowThirdPartyFraming']; |
3123
|
|
|
} |
3124
|
|
|
|
3125
|
|
|
/** @param array<int|string, mixed> $settings */ |
3126
|
592 |
|
private function setBlowfishSecret(array $settings): string |
3127
|
|
|
{ |
3128
|
592 |
|
if (! isset($settings['blowfish_secret'])) { |
3129
|
580 |
|
return ''; |
3130
|
|
|
} |
3131
|
|
|
|
3132
|
12 |
|
return (string) $settings['blowfish_secret']; |
3133
|
|
|
} |
3134
|
|
|
|
3135
|
|
|
/** |
3136
|
|
|
* @param array<int|string, mixed> $settings |
3137
|
|
|
* |
3138
|
|
|
* @return array<int, Server> |
3139
|
|
|
* @psalm-return array<int<1, max>, Server> |
3140
|
|
|
*/ |
3141
|
592 |
|
private function setServers(array $settings): array |
3142
|
|
|
{ |
3143
|
592 |
|
if (! isset($settings['Servers']) || ! is_array($settings['Servers'])) { |
3144
|
572 |
|
return [1 => new Server()]; |
3145
|
|
|
} |
3146
|
|
|
|
3147
|
20 |
|
$servers = []; |
3148
|
20 |
|
foreach ($settings['Servers'] as $key => $server) { |
3149
|
20 |
|
if (! is_int($key) || $key < 1 || ! is_array($server)) { |
3150
|
8 |
|
continue; |
3151
|
|
|
} |
3152
|
|
|
|
3153
|
16 |
|
$servers[$key] = new Server($server); |
3154
|
16 |
|
if ($servers[$key]->host !== '' || $servers[$key]->verbose !== '') { |
3155
|
12 |
|
continue; |
3156
|
|
|
} |
3157
|
|
|
|
3158
|
|
|
/** |
3159
|
|
|
* Ensures that the database server has a name. |
3160
|
|
|
* |
3161
|
|
|
* @link https://github.com/phpmyadmin/phpmyadmin/issues/6878 |
3162
|
|
|
* |
3163
|
|
|
* @psalm-suppress ImpureFunctionCall |
3164
|
|
|
*/ |
3165
|
4 |
|
$server['verbose'] = sprintf(__('Server %d'), $key); |
3166
|
4 |
|
$servers[$key] = new Server($server); |
3167
|
|
|
} |
3168
|
|
|
|
3169
|
20 |
|
if ($servers === []) { |
3170
|
4 |
|
return [1 => new Server()]; |
3171
|
|
|
} |
3172
|
|
|
|
3173
|
16 |
|
return $servers; |
3174
|
|
|
} |
3175
|
|
|
|
3176
|
|
|
/** |
3177
|
|
|
* @param array<int|string, mixed> $settings |
3178
|
|
|
* |
3179
|
|
|
* @psalm-return 0|positive-int |
3180
|
|
|
*/ |
3181
|
592 |
|
private function setServerDefault(array $settings): int |
3182
|
|
|
{ |
3183
|
592 |
|
if (! isset($settings['ServerDefault'])) { |
3184
|
580 |
|
return 1; |
3185
|
|
|
} |
3186
|
|
|
|
3187
|
12 |
|
$serverDefault = (int) $settings['ServerDefault']; |
3188
|
|
|
|
3189
|
12 |
|
return $serverDefault >= 0 ? $serverDefault : 1; |
3190
|
|
|
} |
3191
|
|
|
|
3192
|
|
|
/** @param array<int|string, mixed> $settings */ |
3193
|
592 |
|
private function setVersionCheck(array $settings): bool |
3194
|
|
|
{ |
3195
|
592 |
|
$versionCheck = true; |
3196
|
592 |
|
if (defined('VERSION_CHECK_DEFAULT')) { |
3197
|
592 |
|
$versionCheck = VERSION_CHECK_DEFAULT; |
3198
|
|
|
} |
3199
|
|
|
|
3200
|
592 |
|
if (! isset($settings['VersionCheck'])) { |
3201
|
580 |
|
return $versionCheck; |
3202
|
|
|
} |
3203
|
|
|
|
3204
|
12 |
|
return (bool) $settings['VersionCheck']; |
3205
|
|
|
} |
3206
|
|
|
|
3207
|
|
|
/** @param array<int|string, mixed> $settings */ |
3208
|
592 |
|
private function setProxyUrl(array $settings): string |
3209
|
|
|
{ |
3210
|
592 |
|
if (! isset($settings['ProxyUrl'])) { |
3211
|
580 |
|
return ''; |
3212
|
|
|
} |
3213
|
|
|
|
3214
|
12 |
|
return (string) $settings['ProxyUrl']; |
3215
|
|
|
} |
3216
|
|
|
|
3217
|
|
|
/** @param array<int|string, mixed> $settings */ |
3218
|
592 |
|
private function setProxyUser(array $settings): string |
3219
|
|
|
{ |
3220
|
592 |
|
if (! isset($settings['ProxyUser'])) { |
3221
|
580 |
|
return ''; |
3222
|
|
|
} |
3223
|
|
|
|
3224
|
12 |
|
return (string) $settings['ProxyUser']; |
3225
|
|
|
} |
3226
|
|
|
|
3227
|
|
|
/** @param array<int|string, mixed> $settings */ |
3228
|
592 |
|
private function setProxyPass(array $settings): string |
3229
|
|
|
{ |
3230
|
592 |
|
if (! isset($settings['ProxyPass'])) { |
3231
|
580 |
|
return ''; |
3232
|
|
|
} |
3233
|
|
|
|
3234
|
12 |
|
return (string) $settings['ProxyPass']; |
3235
|
|
|
} |
3236
|
|
|
|
3237
|
|
|
/** |
3238
|
|
|
* @param array<int|string, mixed> $settings |
3239
|
|
|
* |
3240
|
|
|
* @psalm-return positive-int |
3241
|
|
|
*/ |
3242
|
592 |
|
private function setMaxDbList(array $settings): int |
3243
|
|
|
{ |
3244
|
592 |
|
if (! isset($settings['MaxDbList'])) { |
3245
|
580 |
|
return 100; |
3246
|
|
|
} |
3247
|
|
|
|
3248
|
12 |
|
$maxDbList = (int) $settings['MaxDbList']; |
3249
|
|
|
|
3250
|
12 |
|
return $maxDbList >= 1 ? $maxDbList : 100; |
3251
|
|
|
} |
3252
|
|
|
|
3253
|
|
|
/** |
3254
|
|
|
* @param array<int|string, mixed> $settings |
3255
|
|
|
* |
3256
|
|
|
* @psalm-return positive-int |
3257
|
|
|
*/ |
3258
|
592 |
|
private function setMaxTableList(array $settings): int |
3259
|
|
|
{ |
3260
|
592 |
|
if (! isset($settings['MaxTableList'])) { |
3261
|
580 |
|
return 250; |
3262
|
|
|
} |
3263
|
|
|
|
3264
|
12 |
|
$maxTableList = (int) $settings['MaxTableList']; |
3265
|
|
|
|
3266
|
12 |
|
return $maxTableList >= 1 ? $maxTableList : 250; |
3267
|
|
|
} |
3268
|
|
|
|
3269
|
|
|
/** @param array<int|string, mixed> $settings */ |
3270
|
592 |
|
private function setShowHint(array $settings): bool |
3271
|
|
|
{ |
3272
|
592 |
|
if (! isset($settings['ShowHint'])) { |
3273
|
580 |
|
return true; |
3274
|
|
|
} |
3275
|
|
|
|
3276
|
12 |
|
return (bool) $settings['ShowHint']; |
3277
|
|
|
} |
3278
|
|
|
|
3279
|
|
|
/** |
3280
|
|
|
* @param array<int|string, mixed> $settings |
3281
|
|
|
* |
3282
|
|
|
* @psalm-return positive-int |
3283
|
|
|
*/ |
3284
|
592 |
|
private function setMaxCharactersInDisplayedSQL(array $settings): int |
3285
|
|
|
{ |
3286
|
592 |
|
if (! isset($settings['MaxCharactersInDisplayedSQL'])) { |
3287
|
580 |
|
return 1000; |
3288
|
|
|
} |
3289
|
|
|
|
3290
|
12 |
|
$maxCharactersInDisplayedSQL = (int) $settings['MaxCharactersInDisplayedSQL']; |
3291
|
|
|
|
3292
|
12 |
|
return $maxCharactersInDisplayedSQL >= 1 ? $maxCharactersInDisplayedSQL : 1000; |
3293
|
|
|
} |
3294
|
|
|
|
3295
|
|
|
/** |
3296
|
|
|
* @param array<int|string, mixed> $settings |
3297
|
|
|
* |
3298
|
|
|
* @psalm-return 'auto'|bool |
3299
|
|
|
*/ |
3300
|
592 |
|
private function setOBGzip(array $settings): bool|string |
3301
|
|
|
{ |
3302
|
592 |
|
if (! isset($settings['OBGzip']) || $settings['OBGzip'] === 'auto') { |
3303
|
580 |
|
return 'auto'; |
3304
|
|
|
} |
3305
|
|
|
|
3306
|
12 |
|
return (bool) $settings['OBGzip']; |
3307
|
|
|
} |
3308
|
|
|
|
3309
|
|
|
/** @param array<int|string, mixed> $settings */ |
3310
|
592 |
|
private function setPersistentConnections(array $settings): bool |
3311
|
|
|
{ |
3312
|
592 |
|
if (! isset($settings['PersistentConnections'])) { |
3313
|
580 |
|
return false; |
3314
|
|
|
} |
3315
|
|
|
|
3316
|
12 |
|
return (bool) $settings['PersistentConnections']; |
3317
|
|
|
} |
3318
|
|
|
|
3319
|
|
|
/** |
3320
|
|
|
* @param array<int|string, mixed> $settings |
3321
|
|
|
* |
3322
|
|
|
* @psalm-return 0|positive-int |
3323
|
|
|
*/ |
3324
|
592 |
|
private function setExecTimeLimit(array $settings): int |
3325
|
|
|
{ |
3326
|
592 |
|
if (! isset($settings['ExecTimeLimit'])) { |
3327
|
580 |
|
return 300; |
3328
|
|
|
} |
3329
|
|
|
|
3330
|
12 |
|
$execTimeLimit = (int) $settings['ExecTimeLimit']; |
3331
|
|
|
|
3332
|
12 |
|
return $execTimeLimit >= 0 ? $execTimeLimit : 300; |
3333
|
|
|
} |
3334
|
|
|
|
3335
|
|
|
/** @param array<int|string, mixed> $settings */ |
3336
|
592 |
|
private function setSessionSavePath(array $settings): string |
3337
|
|
|
{ |
3338
|
592 |
|
if (! isset($settings['SessionSavePath'])) { |
3339
|
580 |
|
return ''; |
3340
|
|
|
} |
3341
|
|
|
|
3342
|
12 |
|
return (string) $settings['SessionSavePath']; |
3343
|
|
|
} |
3344
|
|
|
|
3345
|
|
|
/** |
3346
|
|
|
* @param array<int|string, mixed> $settings |
3347
|
|
|
* |
3348
|
|
|
* @return string[] |
3349
|
|
|
*/ |
3350
|
592 |
|
private function setMysqlSslWarningSafeHosts(array $settings): array |
3351
|
|
|
{ |
3352
|
592 |
|
if (! isset($settings['MysqlSslWarningSafeHosts']) || ! is_array($settings['MysqlSslWarningSafeHosts'])) { |
3353
|
584 |
|
return ['127.0.0.1', 'localhost']; |
3354
|
|
|
} |
3355
|
|
|
|
3356
|
8 |
|
$hosts = []; |
3357
|
|
|
/** @var mixed $host */ |
3358
|
8 |
|
foreach ($settings['MysqlSslWarningSafeHosts'] as $host) { |
3359
|
8 |
|
$safeHost = (string) $host; |
3360
|
8 |
|
if ($safeHost === '') { |
3361
|
4 |
|
continue; |
3362
|
|
|
} |
3363
|
|
|
|
3364
|
8 |
|
$hosts[] = $safeHost; |
3365
|
|
|
} |
3366
|
|
|
|
3367
|
8 |
|
return $hosts; |
3368
|
|
|
} |
3369
|
|
|
|
3370
|
|
|
/** @param array<int|string, mixed> $settings */ |
3371
|
592 |
|
private function setMemoryLimit(array $settings): string |
3372
|
|
|
{ |
3373
|
592 |
|
if (! isset($settings['MemoryLimit'])) { |
3374
|
584 |
|
return '-1'; |
3375
|
|
|
} |
3376
|
|
|
|
3377
|
8 |
|
return (string) $settings['MemoryLimit']; |
3378
|
|
|
} |
3379
|
|
|
|
3380
|
|
|
/** @param array<int|string, mixed> $settings */ |
3381
|
592 |
|
private function setSkipLockedTables(array $settings): bool |
3382
|
|
|
{ |
3383
|
592 |
|
if (! isset($settings['SkipLockedTables'])) { |
3384
|
584 |
|
return false; |
3385
|
|
|
} |
3386
|
|
|
|
3387
|
8 |
|
return (bool) $settings['SkipLockedTables']; |
3388
|
|
|
} |
3389
|
|
|
|
3390
|
|
|
/** @param array<int|string, mixed> $settings */ |
3391
|
592 |
|
private function setShowSQL(array $settings): bool |
3392
|
|
|
{ |
3393
|
592 |
|
if (! isset($settings['ShowSQL'])) { |
3394
|
584 |
|
return true; |
3395
|
|
|
} |
3396
|
|
|
|
3397
|
8 |
|
return (bool) $settings['ShowSQL']; |
3398
|
|
|
} |
3399
|
|
|
|
3400
|
|
|
/** @param array<int|string, mixed> $settings */ |
3401
|
592 |
|
private function setRetainQueryBox(array $settings): bool |
3402
|
|
|
{ |
3403
|
592 |
|
if (! isset($settings['RetainQueryBox'])) { |
3404
|
584 |
|
return false; |
3405
|
|
|
} |
3406
|
|
|
|
3407
|
8 |
|
return (bool) $settings['RetainQueryBox']; |
3408
|
|
|
} |
3409
|
|
|
|
3410
|
|
|
/** @param array<int|string, mixed> $settings */ |
3411
|
592 |
|
private function setCodemirrorEnable(array $settings): bool |
3412
|
|
|
{ |
3413
|
592 |
|
if (! isset($settings['CodemirrorEnable'])) { |
3414
|
584 |
|
return true; |
3415
|
|
|
} |
3416
|
|
|
|
3417
|
8 |
|
return (bool) $settings['CodemirrorEnable']; |
3418
|
|
|
} |
3419
|
|
|
|
3420
|
|
|
/** @param array<int|string, mixed> $settings */ |
3421
|
592 |
|
private function setLintEnable(array $settings): bool |
3422
|
|
|
{ |
3423
|
592 |
|
if (! isset($settings['LintEnable'])) { |
3424
|
584 |
|
return true; |
3425
|
|
|
} |
3426
|
|
|
|
3427
|
8 |
|
return (bool) $settings['LintEnable']; |
3428
|
|
|
} |
3429
|
|
|
|
3430
|
|
|
/** @param array<int|string, mixed> $settings */ |
3431
|
592 |
|
private function setAllowUserDropDatabase(array $settings): bool |
3432
|
|
|
{ |
3433
|
592 |
|
if (! isset($settings['AllowUserDropDatabase'])) { |
3434
|
584 |
|
return false; |
3435
|
|
|
} |
3436
|
|
|
|
3437
|
8 |
|
return (bool) $settings['AllowUserDropDatabase']; |
3438
|
|
|
} |
3439
|
|
|
|
3440
|
|
|
/** @param array<int|string, mixed> $settings */ |
3441
|
592 |
|
private function setConfirm(array $settings): bool |
3442
|
|
|
{ |
3443
|
592 |
|
if (! isset($settings['Confirm'])) { |
3444
|
584 |
|
return true; |
3445
|
|
|
} |
3446
|
|
|
|
3447
|
8 |
|
return (bool) $settings['Confirm']; |
3448
|
|
|
} |
3449
|
|
|
|
3450
|
|
|
/** |
3451
|
|
|
* @param array<int|string, mixed> $settings |
3452
|
|
|
* |
3453
|
|
|
* @psalm-return 'Lax'|'Strict'|'None' |
3454
|
|
|
*/ |
3455
|
592 |
|
private function setCookieSameSite(array $settings): string |
3456
|
|
|
{ |
3457
|
592 |
|
if (! isset($settings['CookieSameSite']) || ! in_array($settings['CookieSameSite'], ['Lax', 'None'], true)) { |
3458
|
584 |
|
return 'Strict'; |
3459
|
|
|
} |
3460
|
|
|
|
3461
|
8 |
|
return $settings['CookieSameSite']; |
3462
|
|
|
} |
3463
|
|
|
|
3464
|
|
|
/** @param array<int|string, mixed> $settings */ |
3465
|
592 |
|
private function setLoginCookieRecall(array $settings): bool |
3466
|
|
|
{ |
3467
|
592 |
|
if (! isset($settings['LoginCookieRecall'])) { |
3468
|
584 |
|
return true; |
3469
|
|
|
} |
3470
|
|
|
|
3471
|
8 |
|
return (bool) $settings['LoginCookieRecall']; |
3472
|
|
|
} |
3473
|
|
|
|
3474
|
|
|
/** |
3475
|
|
|
* @param array<int|string, mixed> $settings |
3476
|
|
|
* |
3477
|
|
|
* @psalm-return positive-int |
3478
|
|
|
*/ |
3479
|
592 |
|
private function setLoginCookieValidity(array $settings): int |
3480
|
|
|
{ |
3481
|
592 |
|
if (! isset($settings['LoginCookieValidity'])) { |
3482
|
580 |
|
return 1440; |
3483
|
|
|
} |
3484
|
|
|
|
3485
|
12 |
|
$loginCookieValidity = (int) $settings['LoginCookieValidity']; |
3486
|
|
|
|
3487
|
12 |
|
return $loginCookieValidity >= 1 ? $loginCookieValidity : 1440; |
3488
|
|
|
} |
3489
|
|
|
|
3490
|
|
|
/** |
3491
|
|
|
* @param array<int|string, mixed> $settings |
3492
|
|
|
* |
3493
|
|
|
* @psalm-return 0|positive-int |
3494
|
|
|
*/ |
3495
|
592 |
|
private function setLoginCookieStore(array $settings): int |
3496
|
|
|
{ |
3497
|
592 |
|
if (! isset($settings['LoginCookieStore'])) { |
3498
|
580 |
|
return 0; |
3499
|
|
|
} |
3500
|
|
|
|
3501
|
12 |
|
$loginCookieStore = (int) $settings['LoginCookieStore']; |
3502
|
|
|
|
3503
|
12 |
|
return $loginCookieStore >= 1 ? $loginCookieStore : 0; |
3504
|
|
|
} |
3505
|
|
|
|
3506
|
|
|
/** @param array<int|string, mixed> $settings */ |
3507
|
592 |
|
private function setLoginCookieDeleteAll(array $settings): bool |
3508
|
|
|
{ |
3509
|
592 |
|
if (! isset($settings['LoginCookieDeleteAll'])) { |
3510
|
584 |
|
return true; |
3511
|
|
|
} |
3512
|
|
|
|
3513
|
8 |
|
return (bool) $settings['LoginCookieDeleteAll']; |
3514
|
|
|
} |
3515
|
|
|
|
3516
|
|
|
/** @param array<int|string, mixed> $settings */ |
3517
|
592 |
|
private function setUseDbSearch(array $settings): bool |
3518
|
|
|
{ |
3519
|
592 |
|
if (! isset($settings['UseDbSearch'])) { |
3520
|
584 |
|
return true; |
3521
|
|
|
} |
3522
|
|
|
|
3523
|
8 |
|
return (bool) $settings['UseDbSearch']; |
3524
|
|
|
} |
3525
|
|
|
|
3526
|
|
|
/** @param array<int|string, mixed> $settings */ |
3527
|
592 |
|
private function setIgnoreMultiSubmitErrors(array $settings): bool |
3528
|
|
|
{ |
3529
|
592 |
|
if (! isset($settings['IgnoreMultiSubmitErrors'])) { |
3530
|
584 |
|
return false; |
3531
|
|
|
} |
3532
|
|
|
|
3533
|
8 |
|
return (bool) $settings['IgnoreMultiSubmitErrors']; |
3534
|
|
|
} |
3535
|
|
|
|
3536
|
|
|
/** @param array<int|string, mixed> $settings */ |
3537
|
592 |
|
private function setURLQueryEncryption(array $settings): bool |
3538
|
|
|
{ |
3539
|
592 |
|
if (! isset($settings['URLQueryEncryption'])) { |
3540
|
584 |
|
return false; |
3541
|
|
|
} |
3542
|
|
|
|
3543
|
8 |
|
return (bool) $settings['URLQueryEncryption']; |
3544
|
|
|
} |
3545
|
|
|
|
3546
|
|
|
/** @param array<int|string, mixed> $settings */ |
3547
|
592 |
|
private function setURLQueryEncryptionSecretKey(array $settings): string |
3548
|
|
|
{ |
3549
|
592 |
|
if (! isset($settings['URLQueryEncryptionSecretKey'])) { |
3550
|
588 |
|
return ''; |
3551
|
|
|
} |
3552
|
|
|
|
3553
|
4 |
|
return (string) $settings['URLQueryEncryptionSecretKey']; |
3554
|
|
|
} |
3555
|
|
|
|
3556
|
|
|
/** @param array<int|string, mixed> $settings */ |
3557
|
592 |
|
private function setAllowArbitraryServer(array $settings): bool |
3558
|
|
|
{ |
3559
|
592 |
|
if (! isset($settings['AllowArbitraryServer'])) { |
3560
|
584 |
|
return false; |
3561
|
|
|
} |
3562
|
|
|
|
3563
|
8 |
|
return (bool) $settings['AllowArbitraryServer']; |
3564
|
|
|
} |
3565
|
|
|
|
3566
|
|
|
/** @param array<int|string, mixed> $settings */ |
3567
|
592 |
|
private function setArbitraryServerRegexp(array $settings): string |
3568
|
|
|
{ |
3569
|
592 |
|
if (! isset($settings['ArbitraryServerRegexp'])) { |
3570
|
584 |
|
return ''; |
3571
|
|
|
} |
3572
|
|
|
|
3573
|
8 |
|
return (string) $settings['ArbitraryServerRegexp']; |
3574
|
|
|
} |
3575
|
|
|
|
3576
|
|
|
/** |
3577
|
|
|
* @param array<int|string, mixed> $settings |
3578
|
|
|
* |
3579
|
|
|
* @psalm-return 'invisible'|'checkbox' |
3580
|
|
|
*/ |
3581
|
592 |
|
private function setCaptchaMethod(array $settings): string |
3582
|
|
|
{ |
3583
|
592 |
|
if (! isset($settings['CaptchaMethod']) || $settings['CaptchaMethod'] !== 'checkbox') { |
3584
|
588 |
|
return 'invisible'; |
3585
|
|
|
} |
3586
|
|
|
|
3587
|
4 |
|
return 'checkbox'; |
3588
|
|
|
} |
3589
|
|
|
|
3590
|
|
|
/** @param array<int|string, mixed> $settings */ |
3591
|
592 |
|
private function setCaptchaApi(array $settings): string |
3592
|
|
|
{ |
3593
|
592 |
|
if (! isset($settings['CaptchaApi'])) { |
3594
|
584 |
|
return 'https://www.google.com/recaptcha/api.js'; |
3595
|
|
|
} |
3596
|
|
|
|
3597
|
8 |
|
return (string) $settings['CaptchaApi']; |
3598
|
|
|
} |
3599
|
|
|
|
3600
|
|
|
/** @param array<int|string, mixed> $settings */ |
3601
|
592 |
|
private function setCaptchaCsp(array $settings): string |
3602
|
|
|
{ |
3603
|
592 |
|
if (! isset($settings['CaptchaCsp'])) { |
3604
|
584 |
|
return 'https://apis.google.com https://www.google.com/recaptcha/' |
3605
|
584 |
|
. ' https://www.gstatic.com/recaptcha/ https://ssl.gstatic.com/'; |
3606
|
|
|
} |
3607
|
|
|
|
3608
|
8 |
|
return (string) $settings['CaptchaCsp']; |
3609
|
|
|
} |
3610
|
|
|
|
3611
|
|
|
/** @param array<int|string, mixed> $settings */ |
3612
|
592 |
|
private function setCaptchaRequestParam(array $settings): string |
3613
|
|
|
{ |
3614
|
592 |
|
if (! isset($settings['CaptchaRequestParam'])) { |
3615
|
584 |
|
return 'g-recaptcha'; |
3616
|
|
|
} |
3617
|
|
|
|
3618
|
8 |
|
return (string) $settings['CaptchaRequestParam']; |
3619
|
|
|
} |
3620
|
|
|
|
3621
|
|
|
/** @param array<int|string, mixed> $settings */ |
3622
|
592 |
|
private function setCaptchaResponseParam(array $settings): string |
3623
|
|
|
{ |
3624
|
592 |
|
if (! isset($settings['CaptchaResponseParam'])) { |
3625
|
584 |
|
return 'g-recaptcha-response'; |
3626
|
|
|
} |
3627
|
|
|
|
3628
|
8 |
|
return (string) $settings['CaptchaResponseParam']; |
3629
|
|
|
} |
3630
|
|
|
|
3631
|
|
|
/** @param array<int|string, mixed> $settings */ |
3632
|
592 |
|
private function setCaptchaLoginPublicKey(array $settings): string |
3633
|
|
|
{ |
3634
|
592 |
|
if (! isset($settings['CaptchaLoginPublicKey'])) { |
3635
|
584 |
|
return ''; |
3636
|
|
|
} |
3637
|
|
|
|
3638
|
8 |
|
return (string) $settings['CaptchaLoginPublicKey']; |
3639
|
|
|
} |
3640
|
|
|
|
3641
|
|
|
/** @param array<int|string, mixed> $settings */ |
3642
|
592 |
|
private function setCaptchaLoginPrivateKey(array $settings): string |
3643
|
|
|
{ |
3644
|
592 |
|
if (! isset($settings['CaptchaLoginPrivateKey'])) { |
3645
|
584 |
|
return ''; |
3646
|
|
|
} |
3647
|
|
|
|
3648
|
8 |
|
return (string) $settings['CaptchaLoginPrivateKey']; |
3649
|
|
|
} |
3650
|
|
|
|
3651
|
|
|
/** @param array<int|string, mixed> $settings */ |
3652
|
592 |
|
private function setCaptchaSiteVerifyURL(array $settings): string |
3653
|
|
|
{ |
3654
|
592 |
|
if (! isset($settings['CaptchaSiteVerifyURL'])) { |
3655
|
584 |
|
return ''; |
3656
|
|
|
} |
3657
|
|
|
|
3658
|
8 |
|
return (string) $settings['CaptchaSiteVerifyURL']; |
3659
|
|
|
} |
3660
|
|
|
|
3661
|
|
|
/** @param array<int|string, mixed> $settings */ |
3662
|
592 |
|
private function setEnableDragDropImport(array $settings): bool |
3663
|
|
|
{ |
3664
|
592 |
|
if (! isset($settings['enable_drag_drop_import'])) { |
3665
|
584 |
|
return true; |
3666
|
|
|
} |
3667
|
|
|
|
3668
|
8 |
|
return (bool) $settings['enable_drag_drop_import']; |
3669
|
|
|
} |
3670
|
|
|
|
3671
|
|
|
/** @param array<int|string, mixed> $settings */ |
3672
|
592 |
|
private function setShowDatabasesNavigationAsTree(array $settings): bool |
3673
|
|
|
{ |
3674
|
592 |
|
if (! isset($settings['ShowDatabasesNavigationAsTree'])) { |
3675
|
584 |
|
return true; |
3676
|
|
|
} |
3677
|
|
|
|
3678
|
8 |
|
return (bool) $settings['ShowDatabasesNavigationAsTree']; |
3679
|
|
|
} |
3680
|
|
|
|
3681
|
|
|
/** |
3682
|
|
|
* @param array<int|string, mixed> $settings |
3683
|
|
|
* |
3684
|
|
|
* @psalm-return positive-int |
3685
|
|
|
*/ |
3686
|
592 |
|
private function setFirstLevelNavigationItems(array $settings): int |
3687
|
|
|
{ |
3688
|
592 |
|
if (! isset($settings['FirstLevelNavigationItems'])) { |
3689
|
580 |
|
return 100; |
3690
|
|
|
} |
3691
|
|
|
|
3692
|
12 |
|
$firstLevelNavigationItems = (int) $settings['FirstLevelNavigationItems']; |
3693
|
|
|
|
3694
|
12 |
|
return $firstLevelNavigationItems >= 1 ? $firstLevelNavigationItems : 100; |
3695
|
|
|
} |
3696
|
|
|
|
3697
|
|
|
/** |
3698
|
|
|
* @param array<int|string, mixed> $settings |
3699
|
|
|
* |
3700
|
|
|
* @psalm-return positive-int |
3701
|
|
|
*/ |
3702
|
592 |
|
private function setMaxNavigationItems(array $settings): int |
3703
|
|
|
{ |
3704
|
592 |
|
if (! isset($settings['MaxNavigationItems'])) { |
3705
|
580 |
|
return 50; |
3706
|
|
|
} |
3707
|
|
|
|
3708
|
12 |
|
$maxNavigationItems = (int) $settings['MaxNavigationItems']; |
3709
|
|
|
|
3710
|
12 |
|
return $maxNavigationItems >= 1 ? $maxNavigationItems : 50; |
3711
|
|
|
} |
3712
|
|
|
|
3713
|
|
|
/** @param array<int|string, mixed> $settings */ |
3714
|
592 |
|
private function setNavigationTreeEnableGrouping(array $settings): bool |
3715
|
|
|
{ |
3716
|
592 |
|
if (! isset($settings['NavigationTreeEnableGrouping'])) { |
3717
|
584 |
|
return true; |
3718
|
|
|
} |
3719
|
|
|
|
3720
|
8 |
|
return (bool) $settings['NavigationTreeEnableGrouping']; |
3721
|
|
|
} |
3722
|
|
|
|
3723
|
|
|
/** @param array<int|string, mixed> $settings */ |
3724
|
592 |
|
private function setNavigationTreeDbSeparator(array $settings): string |
3725
|
|
|
{ |
3726
|
592 |
|
if (! isset($settings['NavigationTreeDbSeparator'])) { |
3727
|
584 |
|
return '_'; |
3728
|
|
|
} |
3729
|
|
|
|
3730
|
8 |
|
return (string) $settings['NavigationTreeDbSeparator']; |
3731
|
|
|
} |
3732
|
|
|
|
3733
|
|
|
/** |
3734
|
|
|
* @param array<int|string, mixed> $settings |
3735
|
|
|
* |
3736
|
|
|
* @return false|string|string[] |
3737
|
|
|
*/ |
3738
|
592 |
|
private function setNavigationTreeTableSeparator(array $settings): false|string|array |
3739
|
|
|
{ |
3740
|
592 |
|
if (! isset($settings['NavigationTreeTableSeparator'])) { |
3741
|
572 |
|
return '__'; |
3742
|
|
|
} |
3743
|
|
|
|
3744
|
20 |
|
if ($settings['NavigationTreeTableSeparator'] === false) { |
3745
|
4 |
|
return false; |
3746
|
|
|
} |
3747
|
|
|
|
3748
|
16 |
|
if (! is_array($settings['NavigationTreeTableSeparator'])) { |
3749
|
8 |
|
return (string) $settings['NavigationTreeTableSeparator']; |
3750
|
|
|
} |
3751
|
|
|
|
3752
|
8 |
|
if ($settings['NavigationTreeTableSeparator'] !== []) { |
3753
|
4 |
|
$navigationTreeTableSeparator = []; |
3754
|
|
|
/** @var mixed $separator */ |
3755
|
4 |
|
foreach ($settings['NavigationTreeTableSeparator'] as $separator) { |
3756
|
4 |
|
$navigationTreeTableSeparator[] = (string) $separator; |
3757
|
|
|
} |
3758
|
|
|
|
3759
|
4 |
|
return $navigationTreeTableSeparator; |
3760
|
|
|
} |
3761
|
|
|
|
3762
|
4 |
|
return '__'; |
3763
|
|
|
} |
3764
|
|
|
|
3765
|
|
|
/** |
3766
|
|
|
* @param array<int|string, mixed> $settings |
3767
|
|
|
* |
3768
|
|
|
* @psalm-return positive-int |
3769
|
|
|
*/ |
3770
|
592 |
|
private function setNavigationTreeTableLevel(array $settings): int |
3771
|
|
|
{ |
3772
|
592 |
|
if (! isset($settings['NavigationTreeTableLevel'])) { |
3773
|
580 |
|
return 1; |
3774
|
|
|
} |
3775
|
|
|
|
3776
|
12 |
|
$navigationTreeTableLevel = (int) $settings['NavigationTreeTableLevel']; |
3777
|
|
|
|
3778
|
12 |
|
return $navigationTreeTableLevel >= 2 ? $navigationTreeTableLevel : 1; |
3779
|
|
|
} |
3780
|
|
|
|
3781
|
|
|
/** @param array<int|string, mixed> $settings */ |
3782
|
592 |
|
private function setNavigationLinkWithMainPanel(array $settings): bool |
3783
|
|
|
{ |
3784
|
592 |
|
if (! isset($settings['NavigationLinkWithMainPanel'])) { |
3785
|
584 |
|
return true; |
3786
|
|
|
} |
3787
|
|
|
|
3788
|
8 |
|
return (bool) $settings['NavigationLinkWithMainPanel']; |
3789
|
|
|
} |
3790
|
|
|
|
3791
|
|
|
/** @param array<int|string, mixed> $settings */ |
3792
|
592 |
|
private function setNavigationDisplayLogo(array $settings): bool |
3793
|
|
|
{ |
3794
|
592 |
|
if (! isset($settings['NavigationDisplayLogo'])) { |
3795
|
584 |
|
return true; |
3796
|
|
|
} |
3797
|
|
|
|
3798
|
8 |
|
return (bool) $settings['NavigationDisplayLogo']; |
3799
|
|
|
} |
3800
|
|
|
|
3801
|
|
|
/** @param array<int|string, mixed> $settings */ |
3802
|
592 |
|
private function setNavigationLogoLink(array $settings): string |
3803
|
|
|
{ |
3804
|
592 |
|
if (! isset($settings['NavigationLogoLink'])) { |
3805
|
584 |
|
return 'index.php'; |
3806
|
|
|
} |
3807
|
|
|
|
3808
|
8 |
|
return (string) $settings['NavigationLogoLink']; |
3809
|
|
|
} |
3810
|
|
|
|
3811
|
|
|
/** |
3812
|
|
|
* @param array<int|string, mixed> $settings |
3813
|
|
|
* |
3814
|
|
|
* @psalm-return 'main'|'new' |
3815
|
|
|
*/ |
3816
|
592 |
|
private function setNavigationLogoLinkWindow(array $settings): string |
3817
|
|
|
{ |
3818
|
592 |
|
if (! isset($settings['NavigationLogoLinkWindow']) || $settings['NavigationLogoLinkWindow'] !== 'new') { |
3819
|
588 |
|
return 'main'; |
3820
|
|
|
} |
3821
|
|
|
|
3822
|
4 |
|
return 'new'; |
3823
|
|
|
} |
3824
|
|
|
|
3825
|
|
|
/** |
3826
|
|
|
* @param array<int|string, mixed> $settings |
3827
|
|
|
* |
3828
|
|
|
* @psalm-return 0|positive-int |
3829
|
|
|
*/ |
3830
|
592 |
|
private function setNumRecentTables(array $settings): int |
3831
|
|
|
{ |
3832
|
592 |
|
if (! isset($settings['NumRecentTables'])) { |
3833
|
580 |
|
return 10; |
3834
|
|
|
} |
3835
|
|
|
|
3836
|
12 |
|
$numRecentTables = (int) $settings['NumRecentTables']; |
3837
|
|
|
|
3838
|
12 |
|
return $numRecentTables >= 0 ? $numRecentTables : 10; |
3839
|
|
|
} |
3840
|
|
|
|
3841
|
|
|
/** |
3842
|
|
|
* @param array<int|string, mixed> $settings |
3843
|
|
|
* |
3844
|
|
|
* @psalm-return 0|positive-int |
3845
|
|
|
*/ |
3846
|
592 |
|
private function setNumFavoriteTables(array $settings): int |
3847
|
|
|
{ |
3848
|
592 |
|
if (! isset($settings['NumFavoriteTables'])) { |
3849
|
580 |
|
return 10; |
3850
|
|
|
} |
3851
|
|
|
|
3852
|
12 |
|
$numFavoriteTables = (int) $settings['NumFavoriteTables']; |
3853
|
|
|
|
3854
|
12 |
|
return $numFavoriteTables >= 0 ? $numFavoriteTables : 10; |
3855
|
|
|
} |
3856
|
|
|
|
3857
|
|
|
/** |
3858
|
|
|
* @param array<int|string, mixed> $settings |
3859
|
|
|
* |
3860
|
|
|
* @psalm-return positive-int |
3861
|
|
|
*/ |
3862
|
592 |
|
private function setNavigationTreeDisplayItemFilterMinimum(array $settings): int |
3863
|
|
|
{ |
3864
|
592 |
|
if (! isset($settings['NavigationTreeDisplayItemFilterMinimum'])) { |
3865
|
580 |
|
return 30; |
3866
|
|
|
} |
3867
|
|
|
|
3868
|
12 |
|
$navigationTreeDisplayItemFilterMinimum = (int) $settings['NavigationTreeDisplayItemFilterMinimum']; |
3869
|
|
|
|
3870
|
12 |
|
return $navigationTreeDisplayItemFilterMinimum >= 1 ? $navigationTreeDisplayItemFilterMinimum : 30; |
3871
|
|
|
} |
3872
|
|
|
|
3873
|
|
|
/** @param array<int|string, mixed> $settings */ |
3874
|
592 |
|
private function setNavigationDisplayServers(array $settings): bool |
3875
|
|
|
{ |
3876
|
592 |
|
if (! isset($settings['NavigationDisplayServers'])) { |
3877
|
584 |
|
return true; |
3878
|
|
|
} |
3879
|
|
|
|
3880
|
8 |
|
return (bool) $settings['NavigationDisplayServers']; |
3881
|
|
|
} |
3882
|
|
|
|
3883
|
|
|
/** @param array<int|string, mixed> $settings */ |
3884
|
592 |
|
private function setDisplayServersList(array $settings): bool |
3885
|
|
|
{ |
3886
|
592 |
|
if (! isset($settings['DisplayServersList'])) { |
3887
|
584 |
|
return false; |
3888
|
|
|
} |
3889
|
|
|
|
3890
|
8 |
|
return (bool) $settings['DisplayServersList']; |
3891
|
|
|
} |
3892
|
|
|
|
3893
|
|
|
/** |
3894
|
|
|
* @param array<int|string, mixed> $settings |
3895
|
|
|
* |
3896
|
|
|
* @psalm-return positive-int |
3897
|
|
|
*/ |
3898
|
592 |
|
private function setNavigationTreeDisplayDbFilterMinimum(array $settings): int |
3899
|
|
|
{ |
3900
|
592 |
|
if (! isset($settings['NavigationTreeDisplayDbFilterMinimum'])) { |
3901
|
580 |
|
return 30; |
3902
|
|
|
} |
3903
|
|
|
|
3904
|
12 |
|
$navigationTreeDisplayDbFilterMinimum = (int) $settings['NavigationTreeDisplayDbFilterMinimum']; |
3905
|
|
|
|
3906
|
12 |
|
return $navigationTreeDisplayDbFilterMinimum >= 1 ? $navigationTreeDisplayDbFilterMinimum : 30; |
3907
|
|
|
} |
3908
|
|
|
|
3909
|
|
|
/** |
3910
|
|
|
* @param array<int|string, mixed> $settings |
3911
|
|
|
* |
3912
|
|
|
* @psalm-return 'structure'|'sql'|'search'|'insert'|'browse' |
3913
|
|
|
*/ |
3914
|
592 |
|
private function setNavigationTreeDefaultTabTable(array $settings): string |
3915
|
|
|
{ |
3916
|
592 |
|
if (! isset($settings['NavigationTreeDefaultTabTable'])) { |
3917
|
548 |
|
return 'structure'; |
3918
|
|
|
} |
3919
|
|
|
|
3920
|
44 |
|
return match ($settings['NavigationTreeDefaultTabTable']) { |
3921
|
44 |
|
'sql', 'tbl_sql.php' => 'sql', |
3922
|
44 |
|
'search', 'tbl_select.php' => 'search', |
3923
|
44 |
|
'insert', 'tbl_change.php' => 'insert', |
3924
|
44 |
|
'browse', 'sql.php' => 'browse', |
3925
|
44 |
|
default => 'structure', |
3926
|
44 |
|
}; |
3927
|
|
|
} |
3928
|
|
|
|
3929
|
|
|
/** |
3930
|
|
|
* @param array<int|string, mixed> $settings |
3931
|
|
|
* |
3932
|
|
|
* @psalm-return 'structure'|'sql'|'search'|'insert'|'browse'|'' |
3933
|
|
|
*/ |
3934
|
592 |
|
private function setNavigationTreeDefaultTabTable2(array $settings): string |
3935
|
|
|
{ |
3936
|
592 |
|
if (! isset($settings['NavigationTreeDefaultTabTable2'])) { |
3937
|
544 |
|
return ''; |
3938
|
|
|
} |
3939
|
|
|
|
3940
|
48 |
|
return match ($settings['NavigationTreeDefaultTabTable2']) { |
3941
|
48 |
|
'structure', 'tbl_structure.php' => 'structure', |
3942
|
48 |
|
'sql', 'tbl_sql.php' => 'sql', |
3943
|
48 |
|
'search', 'tbl_select.php' => 'search', |
3944
|
48 |
|
'insert', 'tbl_change.php' => 'insert', |
3945
|
48 |
|
'browse', 'sql.php' => 'browse', |
3946
|
48 |
|
default => '', |
3947
|
48 |
|
}; |
3948
|
|
|
} |
3949
|
|
|
|
3950
|
|
|
/** @param array<int|string, mixed> $settings */ |
3951
|
592 |
|
private function setNavigationTreeEnableExpansion(array $settings): bool |
3952
|
|
|
{ |
3953
|
592 |
|
if (! isset($settings['NavigationTreeEnableExpansion'])) { |
3954
|
584 |
|
return true; |
3955
|
|
|
} |
3956
|
|
|
|
3957
|
8 |
|
return (bool) $settings['NavigationTreeEnableExpansion']; |
3958
|
|
|
} |
3959
|
|
|
|
3960
|
|
|
/** @param array<int|string, mixed> $settings */ |
3961
|
592 |
|
private function setNavigationTreeShowTables(array $settings): bool |
3962
|
|
|
{ |
3963
|
592 |
|
if (! isset($settings['NavigationTreeShowTables'])) { |
3964
|
584 |
|
return true; |
3965
|
|
|
} |
3966
|
|
|
|
3967
|
8 |
|
return (bool) $settings['NavigationTreeShowTables']; |
3968
|
|
|
} |
3969
|
|
|
|
3970
|
|
|
/** @param array<int|string, mixed> $settings */ |
3971
|
592 |
|
private function setNavigationTreeShowViews(array $settings): bool |
3972
|
|
|
{ |
3973
|
592 |
|
if (! isset($settings['NavigationTreeShowViews'])) { |
3974
|
584 |
|
return true; |
3975
|
|
|
} |
3976
|
|
|
|
3977
|
8 |
|
return (bool) $settings['NavigationTreeShowViews']; |
3978
|
|
|
} |
3979
|
|
|
|
3980
|
|
|
/** @param array<int|string, mixed> $settings */ |
3981
|
592 |
|
private function setNavigationTreeShowFunctions(array $settings): bool |
3982
|
|
|
{ |
3983
|
592 |
|
if (! isset($settings['NavigationTreeShowFunctions'])) { |
3984
|
584 |
|
return true; |
3985
|
|
|
} |
3986
|
|
|
|
3987
|
8 |
|
return (bool) $settings['NavigationTreeShowFunctions']; |
3988
|
|
|
} |
3989
|
|
|
|
3990
|
|
|
/** @param array<int|string, mixed> $settings */ |
3991
|
592 |
|
private function setNavigationTreeShowProcedures(array $settings): bool |
3992
|
|
|
{ |
3993
|
592 |
|
if (! isset($settings['NavigationTreeShowProcedures'])) { |
3994
|
584 |
|
return true; |
3995
|
|
|
} |
3996
|
|
|
|
3997
|
8 |
|
return (bool) $settings['NavigationTreeShowProcedures']; |
3998
|
|
|
} |
3999
|
|
|
|
4000
|
|
|
/** @param array<int|string, mixed> $settings */ |
4001
|
592 |
|
private function setNavigationTreeShowEvents(array $settings): bool |
4002
|
|
|
{ |
4003
|
592 |
|
if (! isset($settings['NavigationTreeShowEvents'])) { |
4004
|
584 |
|
return true; |
4005
|
|
|
} |
4006
|
|
|
|
4007
|
8 |
|
return (bool) $settings['NavigationTreeShowEvents']; |
4008
|
|
|
} |
4009
|
|
|
|
4010
|
|
|
/** |
4011
|
|
|
* @param array<int|string, mixed> $settings |
4012
|
|
|
* |
4013
|
|
|
* @psalm-return 0|positive-int |
4014
|
|
|
*/ |
4015
|
592 |
|
private function setNavigationWidth(array $settings): int |
4016
|
|
|
{ |
4017
|
592 |
|
if (! isset($settings['NavigationWidth'])) { |
4018
|
580 |
|
return 240; |
4019
|
|
|
} |
4020
|
|
|
|
4021
|
12 |
|
$navigationWidth = (int) $settings['NavigationWidth']; |
4022
|
|
|
|
4023
|
12 |
|
return $navigationWidth >= 0 ? $navigationWidth : 240; |
4024
|
|
|
} |
4025
|
|
|
|
4026
|
|
|
/** @param array<int|string, mixed> $settings */ |
4027
|
592 |
|
private function setNavigationTreeAutoexpandSingleDb(array $settings): bool |
4028
|
|
|
{ |
4029
|
592 |
|
if (! isset($settings['NavigationTreeAutoexpandSingleDb'])) { |
4030
|
584 |
|
return true; |
4031
|
|
|
} |
4032
|
|
|
|
4033
|
8 |
|
return (bool) $settings['NavigationTreeAutoexpandSingleDb']; |
4034
|
|
|
} |
4035
|
|
|
|
4036
|
|
|
/** @param array<int|string, mixed> $settings */ |
4037
|
592 |
|
private function setShowStats(array $settings): bool |
4038
|
|
|
{ |
4039
|
592 |
|
if (! isset($settings['ShowStats'])) { |
4040
|
584 |
|
return true; |
4041
|
|
|
} |
4042
|
|
|
|
4043
|
8 |
|
return (bool) $settings['ShowStats']; |
4044
|
|
|
} |
4045
|
|
|
|
4046
|
|
|
/** @param array<int|string, mixed> $settings */ |
4047
|
592 |
|
private function setShowPhpInfo(array $settings): bool |
4048
|
|
|
{ |
4049
|
592 |
|
if (! isset($settings['ShowPhpInfo'])) { |
4050
|
584 |
|
return false; |
4051
|
|
|
} |
4052
|
|
|
|
4053
|
8 |
|
return (bool) $settings['ShowPhpInfo']; |
4054
|
|
|
} |
4055
|
|
|
|
4056
|
|
|
/** |
4057
|
|
|
* @param array<int|string, mixed> $settings |
4058
|
|
|
* |
4059
|
|
|
* @psalm-return bool|'database-server'|'web-server' |
4060
|
|
|
*/ |
4061
|
592 |
|
private function setShowServerInfo(array $settings): bool|string |
4062
|
|
|
{ |
4063
|
592 |
|
if (! isset($settings['ShowServerInfo'])) { |
4064
|
576 |
|
return true; |
4065
|
|
|
} |
4066
|
|
|
|
4067
|
16 |
|
if ($settings['ShowServerInfo'] === 'database-server') { |
4068
|
4 |
|
return 'database-server'; |
4069
|
|
|
} |
4070
|
|
|
|
4071
|
12 |
|
if ($settings['ShowServerInfo'] === 'web-server') { |
4072
|
4 |
|
return 'web-server'; |
4073
|
|
|
} |
4074
|
|
|
|
4075
|
8 |
|
return (bool) $settings['ShowServerInfo']; |
4076
|
|
|
} |
4077
|
|
|
|
4078
|
|
|
/** @param array<int|string, mixed> $settings */ |
4079
|
592 |
|
private function setShowChgPassword(array $settings): bool |
4080
|
|
|
{ |
4081
|
592 |
|
if (! isset($settings['ShowChgPassword'])) { |
4082
|
584 |
|
return true; |
4083
|
|
|
} |
4084
|
|
|
|
4085
|
8 |
|
return (bool) $settings['ShowChgPassword']; |
4086
|
|
|
} |
4087
|
|
|
|
4088
|
|
|
/** @param array<int|string, mixed> $settings */ |
4089
|
592 |
|
private function setShowCreateDb(array $settings): bool |
4090
|
|
|
{ |
4091
|
592 |
|
if (! isset($settings['ShowCreateDb'])) { |
4092
|
584 |
|
return true; |
4093
|
|
|
} |
4094
|
|
|
|
4095
|
8 |
|
return (bool) $settings['ShowCreateDb']; |
4096
|
|
|
} |
4097
|
|
|
|
4098
|
|
|
/** @param array<int|string, mixed> $settings */ |
4099
|
592 |
|
private function setShowDbStructureCharset(array $settings): bool |
4100
|
|
|
{ |
4101
|
592 |
|
if (! isset($settings['ShowDbStructureCharset'])) { |
4102
|
584 |
|
return false; |
4103
|
|
|
} |
4104
|
|
|
|
4105
|
8 |
|
return (bool) $settings['ShowDbStructureCharset']; |
4106
|
|
|
} |
4107
|
|
|
|
4108
|
|
|
/** @param array<int|string, mixed> $settings */ |
4109
|
592 |
|
private function setShowDbStructureComment(array $settings): bool |
4110
|
|
|
{ |
4111
|
592 |
|
if (! isset($settings['ShowDbStructureComment'])) { |
4112
|
584 |
|
return false; |
4113
|
|
|
} |
4114
|
|
|
|
4115
|
8 |
|
return (bool) $settings['ShowDbStructureComment']; |
4116
|
|
|
} |
4117
|
|
|
|
4118
|
|
|
/** @param array<int|string, mixed> $settings */ |
4119
|
592 |
|
private function setShowDbStructureCreation(array $settings): bool |
4120
|
|
|
{ |
4121
|
592 |
|
if (! isset($settings['ShowDbStructureCreation'])) { |
4122
|
584 |
|
return false; |
4123
|
|
|
} |
4124
|
|
|
|
4125
|
8 |
|
return (bool) $settings['ShowDbStructureCreation']; |
4126
|
|
|
} |
4127
|
|
|
|
4128
|
|
|
/** @param array<int|string, mixed> $settings */ |
4129
|
592 |
|
private function setShowDbStructureLastUpdate(array $settings): bool |
4130
|
|
|
{ |
4131
|
592 |
|
if (! isset($settings['ShowDbStructureLastUpdate'])) { |
4132
|
584 |
|
return false; |
4133
|
|
|
} |
4134
|
|
|
|
4135
|
8 |
|
return (bool) $settings['ShowDbStructureLastUpdate']; |
4136
|
|
|
} |
4137
|
|
|
|
4138
|
|
|
/** @param array<int|string, mixed> $settings */ |
4139
|
592 |
|
private function setShowDbStructureLastCheck(array $settings): bool |
4140
|
|
|
{ |
4141
|
592 |
|
if (! isset($settings['ShowDbStructureLastCheck'])) { |
4142
|
584 |
|
return false; |
4143
|
|
|
} |
4144
|
|
|
|
4145
|
8 |
|
return (bool) $settings['ShowDbStructureLastCheck']; |
4146
|
|
|
} |
4147
|
|
|
|
4148
|
|
|
/** @param array<int|string, mixed> $settings */ |
4149
|
592 |
|
private function setHideStructureActions(array $settings): bool |
4150
|
|
|
{ |
4151
|
592 |
|
if (! isset($settings['HideStructureActions'])) { |
4152
|
584 |
|
return true; |
4153
|
|
|
} |
4154
|
|
|
|
4155
|
8 |
|
return (bool) $settings['HideStructureActions']; |
4156
|
|
|
} |
4157
|
|
|
|
4158
|
|
|
/** @param array<int|string, mixed> $settings */ |
4159
|
592 |
|
private function setShowColumnComments(array $settings): bool |
4160
|
|
|
{ |
4161
|
592 |
|
if (! isset($settings['ShowColumnComments'])) { |
4162
|
584 |
|
return true; |
4163
|
|
|
} |
4164
|
|
|
|
4165
|
8 |
|
return (bool) $settings['ShowColumnComments']; |
4166
|
|
|
} |
4167
|
|
|
|
4168
|
|
|
/** |
4169
|
|
|
* @param array<int|string, mixed> $settings |
4170
|
|
|
* |
4171
|
|
|
* @psalm-return 'text'|'icons'|'both' |
4172
|
|
|
*/ |
4173
|
592 |
|
private function setTableNavigationLinksMode(array $settings): string |
4174
|
|
|
{ |
4175
|
|
|
if ( |
4176
|
592 |
|
! isset($settings['TableNavigationLinksMode']) |
4177
|
592 |
|
|| ! in_array($settings['TableNavigationLinksMode'], ['text', 'both'], true) |
4178
|
|
|
) { |
4179
|
584 |
|
return 'icons'; |
4180
|
|
|
} |
4181
|
|
|
|
4182
|
8 |
|
return $settings['TableNavigationLinksMode']; |
4183
|
|
|
} |
4184
|
|
|
|
4185
|
|
|
/** @param array<int|string, mixed> $settings */ |
4186
|
592 |
|
private function setShowAll(array $settings): bool |
4187
|
|
|
{ |
4188
|
592 |
|
if (! isset($settings['ShowAll'])) { |
4189
|
580 |
|
return false; |
4190
|
|
|
} |
4191
|
|
|
|
4192
|
12 |
|
return (bool) $settings['ShowAll']; |
4193
|
|
|
} |
4194
|
|
|
|
4195
|
|
|
/** |
4196
|
|
|
* @param array<int|string, mixed> $settings |
4197
|
|
|
* |
4198
|
|
|
* @psalm-return positive-int |
4199
|
|
|
*/ |
4200
|
592 |
|
private function setMaxRows(array $settings): int |
4201
|
|
|
{ |
4202
|
592 |
|
if (! isset($settings['MaxRows'])) { |
4203
|
580 |
|
return 25; |
4204
|
|
|
} |
4205
|
|
|
|
4206
|
12 |
|
$maxRows = (int) $settings['MaxRows']; |
4207
|
|
|
|
4208
|
12 |
|
return $maxRows >= 1 ? $maxRows : 25; |
4209
|
|
|
} |
4210
|
|
|
|
4211
|
|
|
/** |
4212
|
|
|
* @param array<int|string, mixed> $settings |
4213
|
|
|
* |
4214
|
|
|
* @psalm-return 'ASC'|'DESC'|'SMART' |
4215
|
|
|
*/ |
4216
|
592 |
|
private function setOrder(array $settings): string |
4217
|
|
|
{ |
4218
|
592 |
|
if (! isset($settings['Order']) || ! in_array($settings['Order'], ['ASC', 'DESC'], true)) { |
4219
|
584 |
|
return 'SMART'; |
4220
|
|
|
} |
4221
|
|
|
|
4222
|
8 |
|
return $settings['Order']; |
4223
|
|
|
} |
4224
|
|
|
|
4225
|
|
|
/** @param array<int|string, mixed> $settings */ |
4226
|
592 |
|
private function setSaveCellsAtOnce(array $settings): bool |
4227
|
|
|
{ |
4228
|
592 |
|
if (! isset($settings['SaveCellsAtOnce'])) { |
4229
|
584 |
|
return false; |
4230
|
|
|
} |
4231
|
|
|
|
4232
|
8 |
|
return (bool) $settings['SaveCellsAtOnce']; |
4233
|
|
|
} |
4234
|
|
|
|
4235
|
|
|
/** |
4236
|
|
|
* @param array<int|string, mixed> $settings |
4237
|
|
|
* |
4238
|
|
|
* @psalm-return 'double-click'|'click'|'disabled' |
4239
|
|
|
*/ |
4240
|
592 |
|
private function setGridEditing(array $settings): string |
4241
|
|
|
{ |
4242
|
592 |
|
if (! isset($settings['GridEditing']) || ! in_array($settings['GridEditing'], ['click', 'disabled'], true)) { |
4243
|
584 |
|
return 'double-click'; |
4244
|
|
|
} |
4245
|
|
|
|
4246
|
8 |
|
return $settings['GridEditing']; |
4247
|
|
|
} |
4248
|
|
|
|
4249
|
|
|
/** |
4250
|
|
|
* @param array<int|string, mixed> $settings |
4251
|
|
|
* |
4252
|
|
|
* @psalm-return 'K'|'D' |
4253
|
|
|
*/ |
4254
|
592 |
|
private function setRelationalDisplay(array $settings): string |
4255
|
|
|
{ |
4256
|
592 |
|
if (! isset($settings['RelationalDisplay']) || $settings['RelationalDisplay'] !== 'D') { |
4257
|
588 |
|
return 'K'; |
4258
|
|
|
} |
4259
|
|
|
|
4260
|
4 |
|
return 'D'; |
4261
|
|
|
} |
4262
|
|
|
|
4263
|
|
|
/** |
4264
|
|
|
* @param array<int|string, mixed> $settings |
4265
|
|
|
* |
4266
|
|
|
* @psalm-return 'blob'|'noblob'|'all'|false |
4267
|
|
|
*/ |
4268
|
592 |
|
private function setProtectBinary(array $settings): false|string |
4269
|
|
|
{ |
4270
|
|
|
if ( |
4271
|
592 |
|
! isset($settings['ProtectBinary']) |
4272
|
592 |
|
|| ! in_array($settings['ProtectBinary'], ['noblob', 'all', false], true) |
4273
|
|
|
) { |
4274
|
580 |
|
return 'blob'; |
4275
|
|
|
} |
4276
|
|
|
|
4277
|
12 |
|
return $settings['ProtectBinary']; |
4278
|
|
|
} |
4279
|
|
|
|
4280
|
|
|
/** @param array<int|string, mixed> $settings */ |
4281
|
592 |
|
private function setShowFunctionFields(array $settings): bool |
4282
|
|
|
{ |
4283
|
592 |
|
if (! isset($settings['ShowFunctionFields'])) { |
4284
|
584 |
|
return true; |
4285
|
|
|
} |
4286
|
|
|
|
4287
|
8 |
|
return (bool) $settings['ShowFunctionFields']; |
4288
|
|
|
} |
4289
|
|
|
|
4290
|
|
|
/** @param array<int|string, mixed> $settings */ |
4291
|
592 |
|
private function setShowFieldTypesInDataEditView(array $settings): bool |
4292
|
|
|
{ |
4293
|
592 |
|
if (! isset($settings['ShowFieldTypesInDataEditView'])) { |
4294
|
584 |
|
return true; |
4295
|
|
|
} |
4296
|
|
|
|
4297
|
8 |
|
return (bool) $settings['ShowFieldTypesInDataEditView']; |
4298
|
|
|
} |
4299
|
|
|
|
4300
|
|
|
/** |
4301
|
|
|
* @param array<int|string, mixed> $settings |
4302
|
|
|
* |
4303
|
|
|
* @psalm-return 'input'|'textarea' |
4304
|
|
|
*/ |
4305
|
592 |
|
private function setCharEditing(array $settings): string |
4306
|
|
|
{ |
4307
|
592 |
|
if (! isset($settings['CharEditing']) || $settings['CharEditing'] !== 'textarea') { |
4308
|
588 |
|
return 'input'; |
4309
|
|
|
} |
4310
|
|
|
|
4311
|
4 |
|
return 'textarea'; |
4312
|
|
|
} |
4313
|
|
|
|
4314
|
|
|
/** |
4315
|
|
|
* @param array<int|string, mixed> $settings |
4316
|
|
|
* |
4317
|
|
|
* @psalm-return 0|positive-int |
4318
|
|
|
*/ |
4319
|
592 |
|
private function setMinSizeForInputField(array $settings): int |
4320
|
|
|
{ |
4321
|
592 |
|
if (! isset($settings['MinSizeForInputField'])) { |
4322
|
580 |
|
return 4; |
4323
|
|
|
} |
4324
|
|
|
|
4325
|
12 |
|
$minSizeForInputField = (int) $settings['MinSizeForInputField']; |
4326
|
|
|
|
4327
|
12 |
|
return $minSizeForInputField >= 0 ? $minSizeForInputField : 4; |
4328
|
|
|
} |
4329
|
|
|
|
4330
|
|
|
/** |
4331
|
|
|
* @param array<int|string, mixed> $settings |
4332
|
|
|
* |
4333
|
|
|
* @psalm-return positive-int |
4334
|
|
|
*/ |
4335
|
592 |
|
private function setMaxSizeForInputField(array $settings): int |
4336
|
|
|
{ |
4337
|
592 |
|
if (! isset($settings['MaxSizeForInputField'])) { |
4338
|
580 |
|
return 60; |
4339
|
|
|
} |
4340
|
|
|
|
4341
|
12 |
|
$maxSizeForInputField = (int) $settings['MaxSizeForInputField']; |
4342
|
|
|
|
4343
|
12 |
|
return $maxSizeForInputField >= 1 ? $maxSizeForInputField : 60; |
4344
|
|
|
} |
4345
|
|
|
|
4346
|
|
|
/** |
4347
|
|
|
* @param array<int|string, mixed> $settings |
4348
|
|
|
* |
4349
|
|
|
* @psalm-return positive-int |
4350
|
|
|
*/ |
4351
|
592 |
|
private function setInsertRows(array $settings): int |
4352
|
|
|
{ |
4353
|
592 |
|
if (! isset($settings['InsertRows'])) { |
4354
|
580 |
|
return 2; |
4355
|
|
|
} |
4356
|
|
|
|
4357
|
12 |
|
$insertRows = (int) $settings['InsertRows']; |
4358
|
|
|
|
4359
|
12 |
|
return $insertRows >= 1 ? $insertRows : 2; |
4360
|
|
|
} |
4361
|
|
|
|
4362
|
|
|
/** |
4363
|
|
|
* @param array<int|string, mixed> $settings |
4364
|
|
|
* |
4365
|
|
|
* @return string[] |
4366
|
|
|
* @psalm-return array{0: 'content-id'|'id-content', 1?: 'content-id'|'id-content'} |
4367
|
|
|
*/ |
4368
|
592 |
|
private function setForeignKeyDropdownOrder(array $settings): array |
4369
|
|
|
{ |
4370
|
|
|
if ( |
4371
|
592 |
|
! isset($settings['ForeignKeyDropdownOrder']) |
4372
|
32 |
|
|| ! is_array($settings['ForeignKeyDropdownOrder']) |
4373
|
28 |
|
|| ! isset($settings['ForeignKeyDropdownOrder'][0]) |
4374
|
592 |
|
|| ! in_array($settings['ForeignKeyDropdownOrder'][0], ['content-id', 'id-content'], true) |
4375
|
|
|
) { |
4376
|
572 |
|
return ['content-id', 'id-content']; |
4377
|
|
|
} |
4378
|
|
|
|
4379
|
|
|
if ( |
4380
|
20 |
|
! isset($settings['ForeignKeyDropdownOrder'][1]) |
4381
|
20 |
|
|| ! in_array($settings['ForeignKeyDropdownOrder'][1], ['content-id', 'id-content'], true) |
4382
|
|
|
) { |
4383
|
12 |
|
return [$settings['ForeignKeyDropdownOrder'][0]]; |
4384
|
|
|
} |
4385
|
|
|
|
4386
|
8 |
|
return [$settings['ForeignKeyDropdownOrder'][0], $settings['ForeignKeyDropdownOrder'][1]]; |
4387
|
|
|
} |
4388
|
|
|
|
4389
|
|
|
/** |
4390
|
|
|
* @param array<int|string, mixed> $settings |
4391
|
|
|
* |
4392
|
|
|
* @psalm-return positive-int |
4393
|
|
|
*/ |
4394
|
592 |
|
private function setForeignKeyMaxLimit(array $settings): int |
4395
|
|
|
{ |
4396
|
592 |
|
if (! isset($settings['ForeignKeyMaxLimit'])) { |
4397
|
580 |
|
return 100; |
4398
|
|
|
} |
4399
|
|
|
|
4400
|
12 |
|
$foreignKeyMaxLimit = (int) $settings['ForeignKeyMaxLimit']; |
4401
|
|
|
|
4402
|
12 |
|
return $foreignKeyMaxLimit >= 1 ? $foreignKeyMaxLimit : 100; |
4403
|
|
|
} |
4404
|
|
|
|
4405
|
|
|
/** |
4406
|
|
|
* @param array<int|string, mixed> $settings |
4407
|
|
|
* |
4408
|
|
|
* @psalm-return 'default'|'enable'|'disable' |
4409
|
|
|
*/ |
4410
|
592 |
|
private function setDefaultForeignKeyChecks(array $settings): string |
4411
|
|
|
{ |
4412
|
|
|
if ( |
4413
|
592 |
|
! isset($settings['DefaultForeignKeyChecks']) |
4414
|
592 |
|
|| ! in_array($settings['DefaultForeignKeyChecks'], ['enable', 'disable'], true) |
4415
|
|
|
) { |
4416
|
584 |
|
return 'default'; |
4417
|
|
|
} |
4418
|
|
|
|
4419
|
8 |
|
return $settings['DefaultForeignKeyChecks']; |
4420
|
|
|
} |
4421
|
|
|
|
4422
|
|
|
/** @param array<int|string, mixed> $settings */ |
4423
|
592 |
|
private function setZipDump(array $settings): bool |
4424
|
|
|
{ |
4425
|
592 |
|
if (! isset($settings['ZipDump'])) { |
4426
|
584 |
|
return true; |
4427
|
|
|
} |
4428
|
|
|
|
4429
|
8 |
|
return (bool) $settings['ZipDump']; |
4430
|
|
|
} |
4431
|
|
|
|
4432
|
|
|
/** @param array<int|string, mixed> $settings */ |
4433
|
592 |
|
private function setGZipDump(array $settings): bool |
4434
|
|
|
{ |
4435
|
592 |
|
if (! isset($settings['GZipDump'])) { |
4436
|
584 |
|
return true; |
4437
|
|
|
} |
4438
|
|
|
|
4439
|
8 |
|
return (bool) $settings['GZipDump']; |
4440
|
|
|
} |
4441
|
|
|
|
4442
|
|
|
/** @param array<int|string, mixed> $settings */ |
4443
|
592 |
|
private function setBZipDump(array $settings): bool |
4444
|
|
|
{ |
4445
|
592 |
|
if (! isset($settings['BZipDump'])) { |
4446
|
584 |
|
return true; |
4447
|
|
|
} |
4448
|
|
|
|
4449
|
8 |
|
return (bool) $settings['BZipDump']; |
4450
|
|
|
} |
4451
|
|
|
|
4452
|
|
|
/** @param array<int|string, mixed> $settings */ |
4453
|
592 |
|
private function setCompressOnFly(array $settings): bool |
4454
|
|
|
{ |
4455
|
592 |
|
if (! isset($settings['CompressOnFly'])) { |
4456
|
584 |
|
return true; |
4457
|
|
|
} |
4458
|
|
|
|
4459
|
8 |
|
return (bool) $settings['CompressOnFly']; |
4460
|
|
|
} |
4461
|
|
|
|
4462
|
|
|
/** |
4463
|
|
|
* @param array<int|string, mixed> $settings |
4464
|
|
|
* |
4465
|
|
|
* @psalm-return 'icons'|'text'|'both' |
4466
|
|
|
*/ |
4467
|
592 |
|
private function setTabsMode(array $settings): string |
4468
|
|
|
{ |
4469
|
592 |
|
if (! isset($settings['TabsMode']) || ! in_array($settings['TabsMode'], ['icons', 'text'], true)) { |
4470
|
584 |
|
return 'both'; |
4471
|
|
|
} |
4472
|
|
|
|
4473
|
8 |
|
return $settings['TabsMode']; |
4474
|
|
|
} |
4475
|
|
|
|
4476
|
|
|
/** |
4477
|
|
|
* @param array<int|string, mixed> $settings |
4478
|
|
|
* |
4479
|
|
|
* @psalm-return 'icons'|'text'|'both' |
4480
|
|
|
*/ |
4481
|
592 |
|
private function setActionLinksMode(array $settings): string |
4482
|
|
|
{ |
4483
|
|
|
if ( |
4484
|
592 |
|
! isset($settings['ActionLinksMode']) |
4485
|
592 |
|
|| ! in_array($settings['ActionLinksMode'], ['icons', 'text'], true) |
4486
|
|
|
) { |
4487
|
584 |
|
return 'both'; |
4488
|
|
|
} |
4489
|
|
|
|
4490
|
8 |
|
return $settings['ActionLinksMode']; |
4491
|
|
|
} |
4492
|
|
|
|
4493
|
|
|
/** |
4494
|
|
|
* @param array<int|string, mixed> $settings |
4495
|
|
|
* |
4496
|
|
|
* @psalm-return positive-int |
4497
|
|
|
*/ |
4498
|
592 |
|
private function setPropertiesNumColumns(array $settings): int |
4499
|
|
|
{ |
4500
|
592 |
|
if (! isset($settings['PropertiesNumColumns'])) { |
4501
|
580 |
|
return 1; |
4502
|
|
|
} |
4503
|
|
|
|
4504
|
12 |
|
$propertiesNumColumns = (int) $settings['PropertiesNumColumns']; |
4505
|
|
|
|
4506
|
12 |
|
return $propertiesNumColumns >= 2 ? $propertiesNumColumns : 1; |
4507
|
|
|
} |
4508
|
|
|
|
4509
|
|
|
/** |
4510
|
|
|
* @param array<int|string, mixed> $settings |
4511
|
|
|
* |
4512
|
|
|
* @psalm-return 'welcome'|'databases'|'status'|'variables'|'privileges' |
4513
|
|
|
*/ |
4514
|
592 |
|
private function setDefaultTabServer(array $settings): string |
4515
|
|
|
{ |
4516
|
592 |
|
if (! isset($settings['DefaultTabServer'])) { |
4517
|
548 |
|
return 'welcome'; |
4518
|
|
|
} |
4519
|
|
|
|
4520
|
44 |
|
return match ($settings['DefaultTabServer']) { |
4521
|
44 |
|
'databases', 'server_databases.php' => 'databases', |
4522
|
44 |
|
'status', 'server_status.php' => 'status', |
4523
|
44 |
|
'variables', 'server_variables.php' => 'variables', |
4524
|
44 |
|
'privileges', 'server_privileges.php' => 'privileges', |
4525
|
44 |
|
default => 'welcome', |
4526
|
44 |
|
}; |
4527
|
|
|
} |
4528
|
|
|
|
4529
|
|
|
/** |
4530
|
|
|
* @param array<int|string, mixed> $settings |
4531
|
|
|
* |
4532
|
|
|
* @psalm-return 'structure'|'sql'|'search'|'operations' |
4533
|
|
|
*/ |
4534
|
592 |
|
private function setDefaultTabDatabase(array $settings): string |
4535
|
|
|
{ |
4536
|
592 |
|
if (! isset($settings['DefaultTabDatabase'])) { |
4537
|
556 |
|
return 'structure'; |
4538
|
|
|
} |
4539
|
|
|
|
4540
|
36 |
|
return match ($settings['DefaultTabDatabase']) { |
4541
|
36 |
|
'sql', 'db_sql.php' => 'sql', |
4542
|
36 |
|
'search', 'db_search.php' => 'search', |
4543
|
36 |
|
'operations', 'db_operations.php' => 'operations', |
4544
|
36 |
|
default => 'structure', |
4545
|
36 |
|
}; |
4546
|
|
|
} |
4547
|
|
|
|
4548
|
|
|
/** |
4549
|
|
|
* @param array<int|string, mixed> $settings |
4550
|
|
|
* |
4551
|
|
|
* @psalm-return 'structure'|'sql'|'search'|'insert'|'browse' |
4552
|
|
|
*/ |
4553
|
592 |
|
private function setDefaultTabTable(array $settings): string |
4554
|
|
|
{ |
4555
|
592 |
|
if (! isset($settings['DefaultTabTable'])) { |
4556
|
548 |
|
return 'browse'; |
4557
|
|
|
} |
4558
|
|
|
|
4559
|
44 |
|
return match ($settings['DefaultTabTable']) { |
4560
|
44 |
|
'structure', 'tbl_structure.php' => 'structure', |
4561
|
44 |
|
'sql', 'tbl_sql.php' => 'sql', |
4562
|
44 |
|
'search', 'tbl_select.php' => 'search', |
4563
|
44 |
|
'insert', 'tbl_change.php' => 'insert', |
4564
|
44 |
|
default => 'browse', |
4565
|
44 |
|
}; |
4566
|
|
|
} |
4567
|
|
|
|
4568
|
|
|
/** |
4569
|
|
|
* @param array<int|string, mixed> $settings |
4570
|
|
|
* |
4571
|
|
|
* @psalm-return 'icons'|'text'|'both' |
4572
|
|
|
*/ |
4573
|
592 |
|
private function setRowActionType(array $settings): string |
4574
|
|
|
{ |
4575
|
592 |
|
if (! isset($settings['RowActionType']) || ! in_array($settings['RowActionType'], ['icons', 'text'], true)) { |
4576
|
584 |
|
return 'both'; |
4577
|
|
|
} |
4578
|
|
|
|
4579
|
8 |
|
return $settings['RowActionType']; |
4580
|
|
|
} |
4581
|
|
|
|
4582
|
|
|
/** @param array<int|string, mixed> $settings */ |
4583
|
592 |
|
private function setExport(array $settings): Export |
4584
|
|
|
{ |
4585
|
592 |
|
if (isset($settings['Export']) && is_array($settings['Export'])) { |
4586
|
4 |
|
return new Export($settings['Export']); |
4587
|
|
|
} |
4588
|
|
|
|
4589
|
588 |
|
return new Export(); |
4590
|
|
|
} |
4591
|
|
|
|
4592
|
|
|
/** @param array<int|string, mixed> $settings */ |
4593
|
592 |
|
private function setImport(array $settings): Import |
4594
|
|
|
{ |
4595
|
592 |
|
if (isset($settings['Import']) && is_array($settings['Import'])) { |
4596
|
4 |
|
return new Import($settings['Import']); |
4597
|
|
|
} |
4598
|
|
|
|
4599
|
588 |
|
return new Import(); |
4600
|
|
|
} |
4601
|
|
|
|
4602
|
|
|
/** @param array<int|string, mixed> $settings */ |
4603
|
592 |
|
private function setSchema(array $settings): Schema |
4604
|
|
|
{ |
4605
|
592 |
|
if (isset($settings['Schema']) && is_array($settings['Schema'])) { |
4606
|
4 |
|
return new Schema($settings['Schema']); |
4607
|
|
|
} |
4608
|
|
|
|
4609
|
588 |
|
return new Schema(); |
4610
|
|
|
} |
4611
|
|
|
|
4612
|
|
|
/** |
4613
|
|
|
* @param array<int|string, mixed> $settings |
4614
|
|
|
* |
4615
|
|
|
* @return string[] |
4616
|
|
|
*/ |
4617
|
592 |
|
private function setPDFPageSizes(array $settings): array |
4618
|
|
|
{ |
4619
|
|
|
if ( |
4620
|
592 |
|
! isset($settings['PDFPageSizes']) |
4621
|
12 |
|
|| ! is_array($settings['PDFPageSizes']) |
4622
|
592 |
|
|| $settings['PDFPageSizes'] === [] |
4623
|
|
|
) { |
4624
|
584 |
|
return ['A3', 'A4', 'A5', 'letter', 'legal']; |
4625
|
|
|
} |
4626
|
|
|
|
4627
|
8 |
|
$pdfPageSizes = []; |
4628
|
|
|
/** @var mixed $pageSize */ |
4629
|
8 |
|
foreach ($settings['PDFPageSizes'] as $pageSize) { |
4630
|
8 |
|
$pdfPageSizes[] = (string) $pageSize; |
4631
|
|
|
} |
4632
|
|
|
|
4633
|
8 |
|
return $pdfPageSizes; |
4634
|
|
|
} |
4635
|
|
|
|
4636
|
|
|
/** @param array<int|string, mixed> $settings */ |
4637
|
592 |
|
private function setPDFDefaultPageSize(array $settings): string |
4638
|
|
|
{ |
4639
|
592 |
|
if (! isset($settings['PDFDefaultPageSize'])) { |
4640
|
584 |
|
return 'A4'; |
4641
|
|
|
} |
4642
|
|
|
|
4643
|
8 |
|
return (string) $settings['PDFDefaultPageSize']; |
4644
|
|
|
} |
4645
|
|
|
|
4646
|
|
|
/** @param array<int|string, mixed> $settings */ |
4647
|
592 |
|
private function setDefaultLang(array $settings): string |
4648
|
|
|
{ |
4649
|
592 |
|
if (! isset($settings['DefaultLang'])) { |
4650
|
584 |
|
return 'en'; |
4651
|
|
|
} |
4652
|
|
|
|
4653
|
8 |
|
return (string) $settings['DefaultLang']; |
4654
|
|
|
} |
4655
|
|
|
|
4656
|
|
|
/** @param array<int|string, mixed> $settings */ |
4657
|
592 |
|
private function setDefaultConnectionCollation(array $settings): string |
4658
|
|
|
{ |
4659
|
592 |
|
if (! isset($settings['DefaultConnectionCollation'])) { |
4660
|
584 |
|
return 'utf8mb4_unicode_ci'; |
4661
|
|
|
} |
4662
|
|
|
|
4663
|
8 |
|
return (string) $settings['DefaultConnectionCollation']; |
4664
|
|
|
} |
4665
|
|
|
|
4666
|
|
|
/** @param array<int|string, mixed> $settings */ |
4667
|
592 |
|
private function setLang(array $settings): string |
4668
|
|
|
{ |
4669
|
592 |
|
if (! isset($settings['Lang'])) { |
4670
|
584 |
|
return ''; |
4671
|
|
|
} |
4672
|
|
|
|
4673
|
8 |
|
return (string) $settings['Lang']; |
4674
|
|
|
} |
4675
|
|
|
|
4676
|
|
|
/** @param array<int|string, mixed> $settings */ |
4677
|
592 |
|
private function setFilterLanguages(array $settings): string |
4678
|
|
|
{ |
4679
|
592 |
|
if (! isset($settings['FilterLanguages'])) { |
4680
|
584 |
|
return ''; |
4681
|
|
|
} |
4682
|
|
|
|
4683
|
8 |
|
return (string) $settings['FilterLanguages']; |
4684
|
|
|
} |
4685
|
|
|
|
4686
|
|
|
/** |
4687
|
|
|
* @param array<int|string, mixed> $settings |
4688
|
|
|
* |
4689
|
|
|
* @psalm-return 'auto'|'iconv'|'mb'|'none' |
4690
|
|
|
*/ |
4691
|
592 |
|
private function setRecodingEngine(array $settings): string |
4692
|
|
|
{ |
4693
|
|
|
if ( |
4694
|
592 |
|
! isset($settings['RecodingEngine']) |
4695
|
592 |
|
|| ! in_array($settings['RecodingEngine'], ['iconv', 'mb', 'none'], true) |
4696
|
|
|
) { |
4697
|
580 |
|
return 'auto'; |
4698
|
|
|
} |
4699
|
|
|
|
4700
|
12 |
|
return $settings['RecodingEngine']; |
4701
|
|
|
} |
4702
|
|
|
|
4703
|
|
|
/** @param array<int|string, mixed> $settings */ |
4704
|
592 |
|
private function setIconvExtraParams(array $settings): string |
4705
|
|
|
{ |
4706
|
592 |
|
if (! isset($settings['IconvExtraParams'])) { |
4707
|
584 |
|
return '//TRANSLIT'; |
4708
|
|
|
} |
4709
|
|
|
|
4710
|
8 |
|
return (string) $settings['IconvExtraParams']; |
4711
|
|
|
} |
4712
|
|
|
|
4713
|
|
|
/** |
4714
|
|
|
* @param array<int|string, mixed> $settings |
4715
|
|
|
* |
4716
|
|
|
* @return string[] |
4717
|
|
|
*/ |
4718
|
592 |
|
private function setAvailableCharsets(array $settings): array |
4719
|
|
|
{ |
4720
|
592 |
|
if (! isset($settings['AvailableCharsets']) || ! is_array($settings['AvailableCharsets'])) { |
4721
|
584 |
|
return [ |
4722
|
584 |
|
'iso-8859-1', |
4723
|
584 |
|
'iso-8859-2', |
4724
|
584 |
|
'iso-8859-3', |
4725
|
584 |
|
'iso-8859-4', |
4726
|
584 |
|
'iso-8859-5', |
4727
|
584 |
|
'iso-8859-6', |
4728
|
584 |
|
'iso-8859-7', |
4729
|
584 |
|
'iso-8859-8', |
4730
|
584 |
|
'iso-8859-9', |
4731
|
584 |
|
'iso-8859-10', |
4732
|
584 |
|
'iso-8859-11', |
4733
|
584 |
|
'iso-8859-12', |
4734
|
584 |
|
'iso-8859-13', |
4735
|
584 |
|
'iso-8859-14', |
4736
|
584 |
|
'iso-8859-15', |
4737
|
584 |
|
'windows-1250', |
4738
|
584 |
|
'windows-1251', |
4739
|
584 |
|
'windows-1252', |
4740
|
584 |
|
'windows-1256', |
4741
|
584 |
|
'windows-1257', |
4742
|
584 |
|
'koi8-r', |
4743
|
584 |
|
'big5', |
4744
|
584 |
|
'gb2312', |
4745
|
584 |
|
'utf-16', |
4746
|
584 |
|
'utf-8', |
4747
|
584 |
|
'utf-7', |
4748
|
584 |
|
'x-user-defined', |
4749
|
584 |
|
'euc-jp', |
4750
|
584 |
|
'ks_c_5601-1987', |
4751
|
584 |
|
'tis-620', |
4752
|
584 |
|
'SHIFT_JIS', |
4753
|
584 |
|
'SJIS', |
4754
|
584 |
|
'SJIS-win', |
4755
|
584 |
|
]; |
4756
|
|
|
} |
4757
|
|
|
|
4758
|
8 |
|
$availableCharsets = []; |
4759
|
|
|
/** @var mixed $availableCharset */ |
4760
|
8 |
|
foreach ($settings['AvailableCharsets'] as $availableCharset) { |
4761
|
8 |
|
$availableCharsets[] = (string) $availableCharset; |
4762
|
|
|
} |
4763
|
|
|
|
4764
|
8 |
|
return $availableCharsets; |
4765
|
|
|
} |
4766
|
|
|
|
4767
|
|
|
/** @param array<int|string, mixed> $settings */ |
4768
|
592 |
|
private function setNavigationTreePointerEnable(array $settings): bool |
4769
|
|
|
{ |
4770
|
592 |
|
if (! isset($settings['NavigationTreePointerEnable'])) { |
4771
|
584 |
|
return true; |
4772
|
|
|
} |
4773
|
|
|
|
4774
|
8 |
|
return (bool) $settings['NavigationTreePointerEnable']; |
4775
|
|
|
} |
4776
|
|
|
|
4777
|
|
|
/** @param array<int|string, mixed> $settings */ |
4778
|
592 |
|
private function setBrowsePointerEnable(array $settings): bool |
4779
|
|
|
{ |
4780
|
592 |
|
if (! isset($settings['BrowsePointerEnable'])) { |
4781
|
584 |
|
return true; |
4782
|
|
|
} |
4783
|
|
|
|
4784
|
8 |
|
return (bool) $settings['BrowsePointerEnable']; |
4785
|
|
|
} |
4786
|
|
|
|
4787
|
|
|
/** @param array<int|string, mixed> $settings */ |
4788
|
592 |
|
private function setBrowseMarkerEnable(array $settings): bool |
4789
|
|
|
{ |
4790
|
592 |
|
if (! isset($settings['BrowseMarkerEnable'])) { |
4791
|
584 |
|
return true; |
4792
|
|
|
} |
4793
|
|
|
|
4794
|
8 |
|
return (bool) $settings['BrowseMarkerEnable']; |
4795
|
|
|
} |
4796
|
|
|
|
4797
|
|
|
/** |
4798
|
|
|
* @param array<int|string, mixed> $settings |
4799
|
|
|
* |
4800
|
|
|
* @psalm-return positive-int |
4801
|
|
|
*/ |
4802
|
592 |
|
private function setTextareaCols(array $settings): int |
4803
|
|
|
{ |
4804
|
592 |
|
if (! isset($settings['TextareaCols'])) { |
4805
|
580 |
|
return 40; |
4806
|
|
|
} |
4807
|
|
|
|
4808
|
12 |
|
$textareaCols = (int) $settings['TextareaCols']; |
4809
|
|
|
|
4810
|
12 |
|
return $textareaCols >= 1 ? $textareaCols : 40; |
4811
|
|
|
} |
4812
|
|
|
|
4813
|
|
|
/** |
4814
|
|
|
* @param array<int|string, mixed> $settings |
4815
|
|
|
* |
4816
|
|
|
* @psalm-return positive-int |
4817
|
|
|
*/ |
4818
|
592 |
|
private function setTextareaRows(array $settings): int |
4819
|
|
|
{ |
4820
|
592 |
|
if (! isset($settings['TextareaRows'])) { |
4821
|
580 |
|
return 15; |
4822
|
|
|
} |
4823
|
|
|
|
4824
|
12 |
|
$textareaRows = (int) $settings['TextareaRows']; |
4825
|
|
|
|
4826
|
12 |
|
return $textareaRows >= 1 ? $textareaRows : 15; |
4827
|
|
|
} |
4828
|
|
|
|
4829
|
|
|
/** @param array<int|string, mixed> $settings */ |
4830
|
592 |
|
private function setLongtextDoubleTextarea(array $settings): bool |
4831
|
|
|
{ |
4832
|
592 |
|
if (! isset($settings['LongtextDoubleTextarea'])) { |
4833
|
584 |
|
return true; |
4834
|
|
|
} |
4835
|
|
|
|
4836
|
8 |
|
return (bool) $settings['LongtextDoubleTextarea']; |
4837
|
|
|
} |
4838
|
|
|
|
4839
|
|
|
/** @param array<int|string, mixed> $settings */ |
4840
|
592 |
|
private function setTextareaAutoSelect(array $settings): bool |
4841
|
|
|
{ |
4842
|
592 |
|
if (! isset($settings['TextareaAutoSelect'])) { |
4843
|
584 |
|
return false; |
4844
|
|
|
} |
4845
|
|
|
|
4846
|
8 |
|
return (bool) $settings['TextareaAutoSelect']; |
4847
|
|
|
} |
4848
|
|
|
|
4849
|
|
|
/** |
4850
|
|
|
* @param array<int|string, mixed> $settings |
4851
|
|
|
* |
4852
|
|
|
* @psalm-return positive-int |
4853
|
|
|
*/ |
4854
|
592 |
|
private function setCharTextareaCols(array $settings): int |
4855
|
|
|
{ |
4856
|
592 |
|
if (! isset($settings['CharTextareaCols'])) { |
4857
|
580 |
|
return 40; |
4858
|
|
|
} |
4859
|
|
|
|
4860
|
12 |
|
$charTextareaCols = (int) $settings['CharTextareaCols']; |
4861
|
|
|
|
4862
|
12 |
|
return $charTextareaCols >= 1 ? $charTextareaCols : 40; |
4863
|
|
|
} |
4864
|
|
|
|
4865
|
|
|
/** |
4866
|
|
|
* @param array<int|string, mixed> $settings |
4867
|
|
|
* |
4868
|
|
|
* @psalm-return positive-int |
4869
|
|
|
*/ |
4870
|
592 |
|
private function setCharTextareaRows(array $settings): int |
4871
|
|
|
{ |
4872
|
592 |
|
if (! isset($settings['CharTextareaRows'])) { |
4873
|
580 |
|
return 7; |
4874
|
|
|
} |
4875
|
|
|
|
4876
|
12 |
|
$charTextareaRows = (int) $settings['CharTextareaRows']; |
4877
|
|
|
|
4878
|
12 |
|
return $charTextareaRows >= 1 ? $charTextareaRows : 7; |
4879
|
|
|
} |
4880
|
|
|
|
4881
|
|
|
/** |
4882
|
|
|
* @param array<int|string, mixed> $settings |
4883
|
|
|
* |
4884
|
|
|
* @psalm-return positive-int |
4885
|
|
|
*/ |
4886
|
592 |
|
private function setLimitChars(array $settings): int |
4887
|
|
|
{ |
4888
|
592 |
|
if (! isset($settings['LimitChars'])) { |
4889
|
580 |
|
return 50; |
4890
|
|
|
} |
4891
|
|
|
|
4892
|
12 |
|
$limitChars = (int) $settings['LimitChars']; |
4893
|
|
|
|
4894
|
12 |
|
return $limitChars >= 1 ? $limitChars : 50; |
4895
|
|
|
} |
4896
|
|
|
|
4897
|
|
|
/** |
4898
|
|
|
* @param array<int|string, mixed> $settings |
4899
|
|
|
* |
4900
|
|
|
* @psalm-return 'left'|'right'|'both'|'none' |
4901
|
|
|
*/ |
4902
|
592 |
|
private function setRowActionLinks(array $settings): string |
4903
|
|
|
{ |
4904
|
|
|
if ( |
4905
|
592 |
|
! isset($settings['RowActionLinks']) |
4906
|
592 |
|
|| ! in_array($settings['RowActionLinks'], ['right', 'both', 'none'], true) |
4907
|
|
|
) { |
4908
|
580 |
|
return 'left'; |
4909
|
|
|
} |
4910
|
|
|
|
4911
|
12 |
|
return $settings['RowActionLinks']; |
4912
|
|
|
} |
4913
|
|
|
|
4914
|
|
|
/** @param array<int|string, mixed> $settings */ |
4915
|
592 |
|
private function setRowActionLinksWithoutUnique(array $settings): bool |
4916
|
|
|
{ |
4917
|
592 |
|
if (! isset($settings['RowActionLinksWithoutUnique'])) { |
4918
|
584 |
|
return false; |
4919
|
|
|
} |
4920
|
|
|
|
4921
|
8 |
|
return (bool) $settings['RowActionLinksWithoutUnique']; |
4922
|
|
|
} |
4923
|
|
|
|
4924
|
|
|
/** |
4925
|
|
|
* @param array<int|string, mixed> $settings |
4926
|
|
|
* |
4927
|
|
|
* @psalm-return 'NONE'|'ASC'|'DESC' |
4928
|
|
|
*/ |
4929
|
592 |
|
private function setTablePrimaryKeyOrder(array $settings): string |
4930
|
|
|
{ |
4931
|
|
|
if ( |
4932
|
592 |
|
! isset($settings['TablePrimaryKeyOrder']) |
4933
|
592 |
|
|| ! in_array($settings['TablePrimaryKeyOrder'], ['ASC', 'DESC'], true) |
4934
|
|
|
) { |
4935
|
584 |
|
return 'NONE'; |
4936
|
|
|
} |
4937
|
|
|
|
4938
|
8 |
|
return $settings['TablePrimaryKeyOrder']; |
4939
|
|
|
} |
4940
|
|
|
|
4941
|
|
|
/** @param array<int|string, mixed> $settings */ |
4942
|
592 |
|
private function setRememberSorting(array $settings): bool |
4943
|
|
|
{ |
4944
|
592 |
|
if (! isset($settings['RememberSorting'])) { |
4945
|
584 |
|
return true; |
4946
|
|
|
} |
4947
|
|
|
|
4948
|
8 |
|
return (bool) $settings['RememberSorting']; |
4949
|
|
|
} |
4950
|
|
|
|
4951
|
|
|
/** @param array<int|string, mixed> $settings */ |
4952
|
592 |
|
private function setShowBrowseComments(array $settings): bool |
4953
|
|
|
{ |
4954
|
592 |
|
if (! isset($settings['ShowBrowseComments'])) { |
4955
|
584 |
|
return true; |
4956
|
|
|
} |
4957
|
|
|
|
4958
|
8 |
|
return (bool) $settings['ShowBrowseComments']; |
4959
|
|
|
} |
4960
|
|
|
|
4961
|
|
|
/** @param array<int|string, mixed> $settings */ |
4962
|
592 |
|
private function setShowPropertyComments(array $settings): bool |
4963
|
|
|
{ |
4964
|
592 |
|
if (! isset($settings['ShowPropertyComments'])) { |
4965
|
584 |
|
return true; |
4966
|
|
|
} |
4967
|
|
|
|
4968
|
8 |
|
return (bool) $settings['ShowPropertyComments']; |
4969
|
|
|
} |
4970
|
|
|
|
4971
|
|
|
/** |
4972
|
|
|
* @param array<int|string, mixed> $settings |
4973
|
|
|
* |
4974
|
|
|
* @psalm-return 0|positive-int |
4975
|
|
|
*/ |
4976
|
592 |
|
private function setRepeatCells(array $settings): int |
4977
|
|
|
{ |
4978
|
592 |
|
if (! isset($settings['RepeatCells'])) { |
4979
|
580 |
|
return 100; |
4980
|
|
|
} |
4981
|
|
|
|
4982
|
12 |
|
$repeatCells = (int) $settings['RepeatCells']; |
4983
|
|
|
|
4984
|
12 |
|
return $repeatCells >= 0 ? $repeatCells : 100; |
4985
|
|
|
} |
4986
|
|
|
|
4987
|
|
|
/** @param array<int|string, mixed> $settings */ |
4988
|
592 |
|
private function setQueryHistoryDB(array $settings): bool |
4989
|
|
|
{ |
4990
|
592 |
|
if (! isset($settings['QueryHistoryDB'])) { |
4991
|
584 |
|
return false; |
4992
|
|
|
} |
4993
|
|
|
|
4994
|
8 |
|
return (bool) $settings['QueryHistoryDB']; |
4995
|
|
|
} |
4996
|
|
|
|
4997
|
|
|
/** |
4998
|
|
|
* @param array<int|string, mixed> $settings |
4999
|
|
|
* |
5000
|
|
|
* @psalm-return positive-int |
5001
|
|
|
*/ |
5002
|
592 |
|
private function setQueryHistoryMax(array $settings): int |
5003
|
|
|
{ |
5004
|
592 |
|
if (! isset($settings['QueryHistoryMax'])) { |
5005
|
580 |
|
return 25; |
5006
|
|
|
} |
5007
|
|
|
|
5008
|
12 |
|
$queryHistoryMax = (int) $settings['QueryHistoryMax']; |
5009
|
|
|
|
5010
|
12 |
|
return $queryHistoryMax >= 1 ? $queryHistoryMax : 25; |
5011
|
|
|
} |
5012
|
|
|
|
5013
|
|
|
/** @param array<int|string, mixed> $settings */ |
5014
|
592 |
|
private function setAllowSharedBookmarks(array $settings): bool |
5015
|
|
|
{ |
5016
|
592 |
|
if (! isset($settings['AllowSharedBookmarks'])) { |
5017
|
584 |
|
return true; |
5018
|
|
|
} |
5019
|
|
|
|
5020
|
8 |
|
return (bool) $settings['AllowSharedBookmarks']; |
5021
|
|
|
} |
5022
|
|
|
|
5023
|
|
|
/** @param array<int|string, mixed> $settings */ |
5024
|
592 |
|
private function setBrowseMIME(array $settings): bool |
5025
|
|
|
{ |
5026
|
592 |
|
if (! isset($settings['BrowseMIME'])) { |
5027
|
584 |
|
return true; |
5028
|
|
|
} |
5029
|
|
|
|
5030
|
8 |
|
return (bool) $settings['BrowseMIME']; |
5031
|
|
|
} |
5032
|
|
|
|
5033
|
|
|
/** |
5034
|
|
|
* @param array<int|string, mixed> $settings |
5035
|
|
|
* |
5036
|
|
|
* @psalm-return positive-int |
5037
|
|
|
*/ |
5038
|
592 |
|
private function setMaxExactCount(array $settings): int |
5039
|
|
|
{ |
5040
|
592 |
|
if (! isset($settings['MaxExactCount'])) { |
5041
|
580 |
|
return 50000; |
5042
|
|
|
} |
5043
|
|
|
|
5044
|
12 |
|
$maxExactCount = (int) $settings['MaxExactCount']; |
5045
|
|
|
|
5046
|
12 |
|
return $maxExactCount >= 1 ? $maxExactCount : 50000; |
5047
|
|
|
} |
5048
|
|
|
|
5049
|
|
|
/** |
5050
|
|
|
* @param array<int|string, mixed> $settings |
5051
|
|
|
* |
5052
|
|
|
* @psalm-return 0|positive-int |
5053
|
|
|
*/ |
5054
|
592 |
|
private function setMaxExactCountViews(array $settings): int |
5055
|
|
|
{ |
5056
|
592 |
|
if (! isset($settings['MaxExactCountViews'])) { |
5057
|
580 |
|
return 0; |
5058
|
|
|
} |
5059
|
|
|
|
5060
|
12 |
|
$maxExactCountViews = (int) $settings['MaxExactCountViews']; |
5061
|
|
|
|
5062
|
12 |
|
return $maxExactCountViews >= 1 ? $maxExactCountViews : 0; |
5063
|
|
|
} |
5064
|
|
|
|
5065
|
|
|
/** @param array<int|string, mixed> $settings */ |
5066
|
592 |
|
private function setNaturalOrder(array $settings): bool |
5067
|
|
|
{ |
5068
|
592 |
|
if (! isset($settings['NaturalOrder'])) { |
5069
|
584 |
|
return true; |
5070
|
|
|
} |
5071
|
|
|
|
5072
|
8 |
|
return (bool) $settings['NaturalOrder']; |
5073
|
|
|
} |
5074
|
|
|
|
5075
|
|
|
/** |
5076
|
|
|
* @param array<int|string, mixed> $settings |
5077
|
|
|
* |
5078
|
|
|
* @psalm-return 'open'|'closed'|'disabled' |
5079
|
|
|
*/ |
5080
|
592 |
|
private function setInitialSlidersState(array $settings): string |
5081
|
|
|
{ |
5082
|
|
|
if ( |
5083
|
592 |
|
! isset($settings['InitialSlidersState']) |
5084
|
592 |
|
|| ! in_array($settings['InitialSlidersState'], ['open', 'disabled'], true) |
5085
|
|
|
) { |
5086
|
584 |
|
return 'closed'; |
5087
|
|
|
} |
5088
|
|
|
|
5089
|
8 |
|
return $settings['InitialSlidersState']; |
5090
|
|
|
} |
5091
|
|
|
|
5092
|
|
|
/** |
5093
|
|
|
* @param array<int|string, mixed> $settings |
5094
|
|
|
* |
5095
|
|
|
* @return string[] |
5096
|
|
|
*/ |
5097
|
592 |
|
private function setUserprefsDisallow(array $settings): array |
5098
|
|
|
{ |
5099
|
592 |
|
if (! isset($settings['UserprefsDisallow']) || ! is_array($settings['UserprefsDisallow'])) { |
5100
|
584 |
|
return []; |
5101
|
|
|
} |
5102
|
|
|
|
5103
|
8 |
|
$userprefsDisallow = []; |
5104
|
|
|
/** @var mixed $userPreference */ |
5105
|
8 |
|
foreach ($settings['UserprefsDisallow'] as $userPreference) { |
5106
|
8 |
|
$userprefsDisallow[] = (string) $userPreference; |
5107
|
|
|
} |
5108
|
|
|
|
5109
|
8 |
|
return $userprefsDisallow; |
5110
|
|
|
} |
5111
|
|
|
|
5112
|
|
|
/** @param array<int|string, mixed> $settings */ |
5113
|
592 |
|
private function setUserprefsDeveloperTab(array $settings): bool |
5114
|
|
|
{ |
5115
|
592 |
|
if (! isset($settings['UserprefsDeveloperTab'])) { |
5116
|
584 |
|
return false; |
5117
|
|
|
} |
5118
|
|
|
|
5119
|
8 |
|
return (bool) $settings['UserprefsDeveloperTab']; |
5120
|
|
|
} |
5121
|
|
|
|
5122
|
|
|
/** @param array<int|string, mixed> $settings */ |
5123
|
592 |
|
private function setTitleTable(array $settings): string |
5124
|
|
|
{ |
5125
|
592 |
|
if (! isset($settings['TitleTable'])) { |
5126
|
584 |
|
return '@HTTP_HOST@ / @VSERVER@ / @DATABASE@ / @TABLE@ | @PHPMYADMIN@'; |
5127
|
|
|
} |
5128
|
|
|
|
5129
|
8 |
|
return (string) $settings['TitleTable']; |
5130
|
|
|
} |
5131
|
|
|
|
5132
|
|
|
/** @param array<int|string, mixed> $settings */ |
5133
|
592 |
|
private function setTitleDatabase(array $settings): string |
5134
|
|
|
{ |
5135
|
592 |
|
if (! isset($settings['TitleDatabase'])) { |
5136
|
584 |
|
return '@HTTP_HOST@ / @VSERVER@ / @DATABASE@ | @PHPMYADMIN@'; |
5137
|
|
|
} |
5138
|
|
|
|
5139
|
8 |
|
return (string) $settings['TitleDatabase']; |
5140
|
|
|
} |
5141
|
|
|
|
5142
|
|
|
/** @param array<int|string, mixed> $settings */ |
5143
|
592 |
|
private function setTitleServer(array $settings): string |
5144
|
|
|
{ |
5145
|
592 |
|
if (! isset($settings['TitleServer'])) { |
5146
|
584 |
|
return '@HTTP_HOST@ / @VSERVER@ | @PHPMYADMIN@'; |
5147
|
|
|
} |
5148
|
|
|
|
5149
|
8 |
|
return (string) $settings['TitleServer']; |
5150
|
|
|
} |
5151
|
|
|
|
5152
|
|
|
/** @param array<int|string, mixed> $settings */ |
5153
|
592 |
|
private function setTitleDefault(array $settings): string |
5154
|
|
|
{ |
5155
|
592 |
|
if (! isset($settings['TitleDefault'])) { |
5156
|
584 |
|
return '@HTTP_HOST@ | @PHPMYADMIN@'; |
5157
|
|
|
} |
5158
|
|
|
|
5159
|
8 |
|
return (string) $settings['TitleDefault']; |
5160
|
|
|
} |
5161
|
|
|
|
5162
|
|
|
/** @param array<int|string, mixed> $settings */ |
5163
|
592 |
|
private function setThemeManager(array $settings): bool |
5164
|
|
|
{ |
5165
|
592 |
|
if (! isset($settings['ThemeManager'])) { |
5166
|
584 |
|
return true; |
5167
|
|
|
} |
5168
|
|
|
|
5169
|
8 |
|
return (bool) $settings['ThemeManager']; |
5170
|
|
|
} |
5171
|
|
|
|
5172
|
|
|
/** @param array<int|string, mixed> $settings */ |
5173
|
592 |
|
private function setThemeDefault(array $settings): string |
5174
|
|
|
{ |
5175
|
592 |
|
if (! isset($settings['ThemeDefault'])) { |
5176
|
584 |
|
return 'pmahomme'; |
5177
|
|
|
} |
5178
|
|
|
|
5179
|
8 |
|
return (string) $settings['ThemeDefault']; |
5180
|
|
|
} |
5181
|
|
|
|
5182
|
|
|
/** @param array<int|string, mixed> $settings */ |
5183
|
592 |
|
private function setThemePerServer(array $settings): bool |
5184
|
|
|
{ |
5185
|
592 |
|
if (! isset($settings['ThemePerServer'])) { |
5186
|
584 |
|
return false; |
5187
|
|
|
} |
5188
|
|
|
|
5189
|
8 |
|
return (bool) $settings['ThemePerServer']; |
5190
|
|
|
} |
5191
|
|
|
|
5192
|
|
|
/** @param array<int|string, mixed> $settings */ |
5193
|
592 |
|
private function setDefaultQueryTable(array $settings): string |
5194
|
|
|
{ |
5195
|
592 |
|
if (! isset($settings['DefaultQueryTable'])) { |
5196
|
584 |
|
return 'SELECT * FROM @TABLE@ WHERE 1'; |
5197
|
|
|
} |
5198
|
|
|
|
5199
|
8 |
|
return (string) $settings['DefaultQueryTable']; |
5200
|
|
|
} |
5201
|
|
|
|
5202
|
|
|
/** @param array<int|string, mixed> $settings */ |
5203
|
592 |
|
private function setDefaultQueryDatabase(array $settings): string |
5204
|
|
|
{ |
5205
|
592 |
|
if (! isset($settings['DefaultQueryDatabase'])) { |
5206
|
584 |
|
return ''; |
5207
|
|
|
} |
5208
|
|
|
|
5209
|
8 |
|
return (string) $settings['DefaultQueryDatabase']; |
5210
|
|
|
} |
5211
|
|
|
|
5212
|
|
|
/** @param array<int|string, mixed> $settings */ |
5213
|
592 |
|
private function setSQLQuery(array $settings): SqlQueryBox |
5214
|
|
|
{ |
5215
|
592 |
|
if (isset($settings['SQLQuery']) && is_array($settings['SQLQuery'])) { |
5216
|
4 |
|
return new SqlQueryBox($settings['SQLQuery']); |
5217
|
|
|
} |
5218
|
|
|
|
5219
|
588 |
|
return new SqlQueryBox(); |
5220
|
|
|
} |
5221
|
|
|
|
5222
|
|
|
/** @param array<int|string, mixed> $settings */ |
5223
|
592 |
|
private function setEnableAutocompleteForTablesAndColumns(array $settings): bool |
5224
|
|
|
{ |
5225
|
592 |
|
if (! isset($settings['EnableAutocompleteForTablesAndColumns'])) { |
5226
|
584 |
|
return true; |
5227
|
|
|
} |
5228
|
|
|
|
5229
|
8 |
|
return (bool) $settings['EnableAutocompleteForTablesAndColumns']; |
5230
|
|
|
} |
5231
|
|
|
|
5232
|
|
|
/** @param array<int|string, mixed> $settings */ |
5233
|
592 |
|
private function setUploadDir(array $settings): string |
5234
|
|
|
{ |
5235
|
592 |
|
if (! isset($settings['UploadDir'])) { |
5236
|
584 |
|
return ''; |
5237
|
|
|
} |
5238
|
|
|
|
5239
|
8 |
|
return (string) $settings['UploadDir']; |
5240
|
|
|
} |
5241
|
|
|
|
5242
|
|
|
/** @param array<int|string, mixed> $settings */ |
5243
|
592 |
|
private function setSaveDir(array $settings): string |
5244
|
|
|
{ |
5245
|
592 |
|
if (! isset($settings['SaveDir'])) { |
5246
|
584 |
|
return ''; |
5247
|
|
|
} |
5248
|
|
|
|
5249
|
8 |
|
return (string) $settings['SaveDir']; |
5250
|
|
|
} |
5251
|
|
|
|
5252
|
|
|
/** @param array<int|string, mixed> $settings */ |
5253
|
592 |
|
private function setTempDir(array $settings): string |
5254
|
|
|
{ |
5255
|
592 |
|
$tempDir = ROOT_PATH . 'tmp' . DIRECTORY_SEPARATOR; |
5256
|
592 |
|
if (defined('TEMP_DIR')) { |
5257
|
592 |
|
$tempDir = TEMP_DIR; |
5258
|
|
|
} |
5259
|
|
|
|
5260
|
592 |
|
if (! isset($settings['TempDir'])) { |
5261
|
584 |
|
return $tempDir; |
5262
|
|
|
} |
5263
|
|
|
|
5264
|
8 |
|
return (string) $settings['TempDir']; |
5265
|
|
|
} |
5266
|
|
|
|
5267
|
|
|
/** |
5268
|
|
|
* @param array<int|string, mixed> $settings |
5269
|
|
|
* |
5270
|
|
|
* @psalm-return 'auto'|'yes'|'no' |
5271
|
|
|
*/ |
5272
|
592 |
|
private function setGD2Available(array $settings): string |
5273
|
|
|
{ |
5274
|
592 |
|
if (! isset($settings['GD2Available']) || ! in_array($settings['GD2Available'], ['yes', 'no'], true)) { |
5275
|
584 |
|
return 'auto'; |
5276
|
|
|
} |
5277
|
|
|
|
5278
|
8 |
|
return $settings['GD2Available']; |
5279
|
|
|
} |
5280
|
|
|
|
5281
|
|
|
/** |
5282
|
|
|
* @param array<int|string, mixed> $settings |
5283
|
|
|
* |
5284
|
|
|
* @return array<string, string> |
5285
|
|
|
*/ |
5286
|
592 |
|
private function setTrustedProxies(array $settings): array |
5287
|
|
|
{ |
5288
|
592 |
|
if (! isset($settings['TrustedProxies']) || ! is_array($settings['TrustedProxies'])) { |
5289
|
576 |
|
return []; |
5290
|
|
|
} |
5291
|
|
|
|
5292
|
16 |
|
$trustedProxies = []; |
5293
|
|
|
/** |
5294
|
|
|
* @var int|string $proxy |
5295
|
|
|
* @var mixed $header |
5296
|
|
|
*/ |
5297
|
16 |
|
foreach ($settings['TrustedProxies'] as $proxy => $header) { |
5298
|
12 |
|
if (! is_string($proxy)) { |
5299
|
4 |
|
continue; |
5300
|
|
|
} |
5301
|
|
|
|
5302
|
12 |
|
$trustedProxies[$proxy] = (string) $header; |
5303
|
|
|
} |
5304
|
|
|
|
5305
|
16 |
|
return $trustedProxies; |
5306
|
|
|
} |
5307
|
|
|
|
5308
|
|
|
/** @param array<int|string, mixed> $settings */ |
5309
|
592 |
|
private function setCheckConfigurationPermissions(array $settings): bool |
5310
|
|
|
{ |
5311
|
592 |
|
if (! isset($settings['CheckConfigurationPermissions'])) { |
5312
|
584 |
|
return true; |
5313
|
|
|
} |
5314
|
|
|
|
5315
|
8 |
|
return (bool) $settings['CheckConfigurationPermissions']; |
5316
|
|
|
} |
5317
|
|
|
|
5318
|
|
|
/** |
5319
|
|
|
* @param array<int|string, mixed> $settings |
5320
|
|
|
* |
5321
|
|
|
* @psalm-return positive-int |
5322
|
|
|
*/ |
5323
|
592 |
|
private function setLinkLengthLimit(array $settings): int |
5324
|
|
|
{ |
5325
|
592 |
|
if (! isset($settings['LinkLengthLimit'])) { |
5326
|
580 |
|
return 1000; |
5327
|
|
|
} |
5328
|
|
|
|
5329
|
12 |
|
$linkLengthLimit = (int) $settings['LinkLengthLimit']; |
5330
|
|
|
|
5331
|
12 |
|
return $linkLengthLimit >= 1 ? $linkLengthLimit : 1000; |
5332
|
|
|
} |
5333
|
|
|
|
5334
|
|
|
/** @param array<int|string, mixed> $settings */ |
5335
|
592 |
|
private function setCSPAllow(array $settings): string |
5336
|
|
|
{ |
5337
|
592 |
|
if (! isset($settings['CSPAllow'])) { |
5338
|
584 |
|
return ''; |
5339
|
|
|
} |
5340
|
|
|
|
5341
|
8 |
|
return (string) $settings['CSPAllow']; |
5342
|
|
|
} |
5343
|
|
|
|
5344
|
|
|
/** @param array<int|string, mixed> $settings */ |
5345
|
592 |
|
private function setDisableMultiTableMaintenance(array $settings): bool |
5346
|
|
|
{ |
5347
|
592 |
|
if (! isset($settings['DisableMultiTableMaintenance'])) { |
5348
|
584 |
|
return false; |
5349
|
|
|
} |
5350
|
|
|
|
5351
|
8 |
|
return (bool) $settings['DisableMultiTableMaintenance']; |
5352
|
|
|
} |
5353
|
|
|
|
5354
|
|
|
/** |
5355
|
|
|
* @param array<int|string, mixed> $settings |
5356
|
|
|
* |
5357
|
|
|
* @psalm-return 'ask'|'always'|'never' |
5358
|
|
|
*/ |
5359
|
592 |
|
private function setSendErrorReports(array $settings): string |
5360
|
|
|
{ |
5361
|
|
|
if ( |
5362
|
592 |
|
! isset($settings['SendErrorReports']) |
5363
|
592 |
|
|| ! in_array($settings['SendErrorReports'], ['always', 'never'], true) |
5364
|
|
|
) { |
5365
|
584 |
|
return 'ask'; |
5366
|
|
|
} |
5367
|
|
|
|
5368
|
8 |
|
return $settings['SendErrorReports']; |
5369
|
|
|
} |
5370
|
|
|
|
5371
|
|
|
/** @param array<int|string, mixed> $settings */ |
5372
|
592 |
|
private function setConsoleEnterExecutes(array $settings): bool |
5373
|
|
|
{ |
5374
|
592 |
|
if (! isset($settings['ConsoleEnterExecutes'])) { |
5375
|
584 |
|
return false; |
5376
|
|
|
} |
5377
|
|
|
|
5378
|
8 |
|
return (bool) $settings['ConsoleEnterExecutes']; |
5379
|
|
|
} |
5380
|
|
|
|
5381
|
|
|
/** @param array<int|string, mixed> $settings */ |
5382
|
592 |
|
private function setZeroConf(array $settings): bool |
5383
|
|
|
{ |
5384
|
592 |
|
if (! isset($settings['ZeroConf'])) { |
5385
|
580 |
|
return true; |
5386
|
|
|
} |
5387
|
|
|
|
5388
|
12 |
|
return (bool) $settings['ZeroConf']; |
5389
|
|
|
} |
5390
|
|
|
|
5391
|
|
|
/** @param array<int|string, mixed> $settings */ |
5392
|
592 |
|
private function setDebug(array $settings): Debug |
5393
|
|
|
{ |
5394
|
592 |
|
if (isset($settings['DBG']) && is_array($settings['DBG'])) { |
5395
|
8 |
|
return new Debug($settings['DBG']); |
5396
|
|
|
} |
5397
|
|
|
|
5398
|
584 |
|
return new Debug(); |
5399
|
|
|
} |
5400
|
|
|
|
5401
|
|
|
/** |
5402
|
|
|
* @param array<int|string, mixed> $settings |
5403
|
|
|
* |
5404
|
|
|
* @psalm-return 'production'|'development' |
5405
|
|
|
*/ |
5406
|
592 |
|
private function setEnvironment(array $settings): string |
5407
|
|
|
{ |
5408
|
592 |
|
if (! isset($settings['environment']) || $settings['environment'] !== 'development') { |
5409
|
588 |
|
return 'production'; |
5410
|
|
|
} |
5411
|
|
|
|
5412
|
4 |
|
return 'development'; |
5413
|
|
|
} |
5414
|
|
|
|
5415
|
|
|
/** |
5416
|
|
|
* @param array<int|string, mixed> $settings |
5417
|
|
|
* |
5418
|
|
|
* @return array<string, string> |
5419
|
|
|
*/ |
5420
|
592 |
|
private function setDefaultFunctions(array $settings): array |
5421
|
|
|
{ |
5422
|
592 |
|
if (! isset($settings['DefaultFunctions']) || ! is_array($settings['DefaultFunctions'])) { |
5423
|
576 |
|
return [ |
5424
|
576 |
|
'FUNC_CHAR' => '', |
5425
|
576 |
|
'FUNC_DATE' => '', |
5426
|
576 |
|
'FUNC_NUMBER' => '', |
5427
|
576 |
|
'FUNC_SPATIAL' => 'GeomFromText', |
5428
|
576 |
|
'FUNC_UUID' => 'UUID', |
5429
|
576 |
|
'first_timestamp' => 'NOW', |
5430
|
576 |
|
]; |
5431
|
|
|
} |
5432
|
|
|
|
5433
|
16 |
|
$defaultFunctions = []; |
5434
|
|
|
/** |
5435
|
|
|
* @var int|string $key |
5436
|
|
|
* @var mixed $value |
5437
|
|
|
*/ |
5438
|
16 |
|
foreach ($settings['DefaultFunctions'] as $key => $value) { |
5439
|
12 |
|
if (! is_string($key)) { |
5440
|
4 |
|
continue; |
5441
|
|
|
} |
5442
|
|
|
|
5443
|
12 |
|
$defaultFunctions[$key] = (string) $value; |
5444
|
|
|
} |
5445
|
|
|
|
5446
|
16 |
|
return $defaultFunctions; |
5447
|
|
|
} |
5448
|
|
|
|
5449
|
|
|
/** |
5450
|
|
|
* @param array<int|string, mixed> $settings |
5451
|
|
|
* |
5452
|
|
|
* @psalm-return positive-int |
5453
|
|
|
*/ |
5454
|
592 |
|
private function setMaxRowPlotLimit(array $settings): int |
5455
|
|
|
{ |
5456
|
592 |
|
if (! isset($settings['maxRowPlotLimit'])) { |
5457
|
580 |
|
return 500; |
5458
|
|
|
} |
5459
|
|
|
|
5460
|
12 |
|
$maxRowPlotLimit = (int) $settings['maxRowPlotLimit']; |
5461
|
|
|
|
5462
|
12 |
|
return $maxRowPlotLimit >= 1 ? $maxRowPlotLimit : 500; |
5463
|
|
|
} |
5464
|
|
|
|
5465
|
|
|
/** @param array<int|string, mixed> $settings */ |
5466
|
592 |
|
private function setShowGitRevision(array $settings): bool |
5467
|
|
|
{ |
5468
|
592 |
|
if (! isset($settings['ShowGitRevision'])) { |
5469
|
584 |
|
return true; |
5470
|
|
|
} |
5471
|
|
|
|
5472
|
8 |
|
return (bool) $settings['ShowGitRevision']; |
5473
|
|
|
} |
5474
|
|
|
|
5475
|
|
|
/** |
5476
|
|
|
* @param array<int|string, mixed> $settings |
5477
|
|
|
* |
5478
|
|
|
* @return array<string, int|string> |
5479
|
|
|
* @psalm-return array{internal: int, human: string} |
5480
|
|
|
*/ |
5481
|
592 |
|
private function setMysqlMinVersion(array $settings): array |
5482
|
|
|
{ |
5483
|
592 |
|
$mysqlMinVersion = ['internal' => 50500, 'human' => '5.5.0']; |
5484
|
592 |
|
if (! isset($settings['MysqlMinVersion']) || ! is_array($settings['MysqlMinVersion'])) { |
5485
|
580 |
|
return $mysqlMinVersion; |
5486
|
|
|
} |
5487
|
|
|
|
5488
|
12 |
|
if (isset($settings['MysqlMinVersion']['internal'])) { |
5489
|
8 |
|
$mysqlMinVersion['internal'] = (int) $settings['MysqlMinVersion']['internal']; |
5490
|
|
|
} |
5491
|
|
|
|
5492
|
12 |
|
if (! isset($settings['MysqlMinVersion']['human'])) { |
5493
|
4 |
|
return $mysqlMinVersion; |
5494
|
|
|
} |
5495
|
|
|
|
5496
|
8 |
|
$mysqlMinVersion['human'] = (string) $settings['MysqlMinVersion']['human']; |
5497
|
|
|
|
5498
|
8 |
|
return $mysqlMinVersion; |
5499
|
|
|
} |
5500
|
|
|
|
5501
|
|
|
/** @param array<int|string, mixed> $settings */ |
5502
|
592 |
|
private function setDisableShortcutKeys(array $settings): bool |
5503
|
|
|
{ |
5504
|
592 |
|
if (! isset($settings['DisableShortcutKeys'])) { |
5505
|
584 |
|
return false; |
5506
|
|
|
} |
5507
|
|
|
|
5508
|
8 |
|
return (bool) $settings['DisableShortcutKeys']; |
5509
|
|
|
} |
5510
|
|
|
|
5511
|
|
|
/** @param array<int|string, mixed> $settings */ |
5512
|
592 |
|
private function setConsole(array $settings): Console |
5513
|
|
|
{ |
5514
|
592 |
|
if (isset($settings['Console']) && is_array($settings['Console'])) { |
5515
|
4 |
|
return new Console($settings['Console']); |
5516
|
|
|
} |
5517
|
|
|
|
5518
|
588 |
|
return new Console(); |
5519
|
|
|
} |
5520
|
|
|
|
5521
|
|
|
/** @param array<int|string, mixed> $settings */ |
5522
|
592 |
|
private function setDefaultTransformations(array $settings): Transformations |
5523
|
|
|
{ |
5524
|
592 |
|
if (isset($settings['DefaultTransformations']) && is_array($settings['DefaultTransformations'])) { |
5525
|
4 |
|
return new Transformations($settings['DefaultTransformations']); |
5526
|
|
|
} |
5527
|
|
|
|
5528
|
588 |
|
return new Transformations(); |
5529
|
|
|
} |
5530
|
|
|
|
5531
|
|
|
/** |
5532
|
|
|
* @param array<int|string, mixed> $settings |
5533
|
|
|
* |
5534
|
|
|
* @psalm-return 0|positive-int |
5535
|
|
|
*/ |
5536
|
592 |
|
private function setFirstDayOfCalendar(array $settings): int |
5537
|
|
|
{ |
5538
|
592 |
|
if (! isset($settings['FirstDayOfCalendar'])) { |
5539
|
572 |
|
return 0; |
5540
|
|
|
} |
5541
|
|
|
|
5542
|
20 |
|
$firstDayOfCalendar = (int) $settings['FirstDayOfCalendar']; |
5543
|
|
|
|
5544
|
20 |
|
return $firstDayOfCalendar >= 1 && $firstDayOfCalendar <= 7 ? $firstDayOfCalendar : 0; |
5545
|
|
|
} |
5546
|
|
|
} |
5547
|
|
|
|