3 * Database with allowed values for configuration stored in the $cfg array,
4 * used by setup script and user preferences to generate forms.
6 declare(strict_types
=1);
8 if (! defined('PHPMYADMIN')) {
14 * o array - select field, array contains allowed values
15 * o string - type override
17 * Use normal array, paths won't be expanded
52 'MemoryLimit' => 'short_string',
53 'NavigationLogoLinkWindow' => [
57 'NavigationTreeDefaultTabTable' => [
59 'structure' => __('Structure'),
63 'search' => __('Search'),
65 'insert' => __('Insert'),
67 'browse' => __('Browse'),
69 'NavigationTreeDefaultTabTable2' => [
73 'structure' => __('Structure'),
77 'search' => __('Search'),
79 'insert' => __('Insert'),
81 'browse' => __('Browse'),
83 'NavigationTreeDbSeparator' => 'short_string',
84 'NavigationTreeTableSeparator' => 'short_string',
85 'NavigationWidth' => 'integer',
86 'TableNavigationLinksMode' => [
87 'icons' => __('Icons'),
103 'RowActionLinks' => [
104 'none' => __('Nowhere'),
105 'left' => __('Left'),
106 'right' => __('Right'),
107 'both' => __('Both'),
109 'TablePrimaryKeyOrder' => [
110 'NONE' => __('None'),
111 'ASC' => __('Ascending'),
112 'DESC' => __('Descending'),
125 'icons' => __('Icons'),
126 'text' => __('Text'),
127 'both' => __('Both'),
129 'PDFDefaultPageSize' => [
133 'letter' => 'letter',
136 'ActionLinksMode' => [
137 'icons' => __('Icons'),
138 'text' => __('Text'),
139 'both' => __('Both'),
142 'click' => __('Click'),
143 'double-click' => __('Double click'),
144 'disabled' => __('Disabled'),
146 'RelationalDisplay' => [
148 'D' => __('display column'),
150 'DefaultTabServer' => [
151 // the welcome page (recommended for multiuser setups)
152 'welcome' => __('Welcome'),
154 'databases' => __('Databases'),
155 // runtime information
156 'status' => __('Status'),
157 // MySQL server variables
158 'variables' => __('Variables'),
160 'privileges' => __('Privileges'),
162 'DefaultTabDatabase' => [
164 'structure' => __('Structure'),
168 'search' => __('Search'),
169 // operations on database
170 'operations' => __('Operations'),
172 'DefaultTabTable' => [
174 'structure' => __('Structure'),
178 'search' => __('Search'),
180 'insert' => __('Insert'),
182 'browse' => __('Browse'),
184 'InitialSlidersState' => [
185 'open' => __('Open'),
186 'closed' => __('Closed'),
187 'disabled' => __('Disabled'),
189 'FirstDayOfCalendar' => [
191 '2' => __('Tuesday'),
192 '3' => __('Wednesday'),
193 '4' => __('Thursday'),
195 '6' => __('Saturday'),
198 'SendErrorReports' => [
199 'ask' => __('Ask before sending error reports'),
200 'always' => __('Always send error reports'),
201 'never' => __('Never send error reports'),
203 'DefaultForeignKeyChecks' => [
204 'default' => __('Server default'),
205 'enable' => __('Enable'),
206 'disable' => __('Disable'),
215 // CSV using LOAD DATA
220 'charset' => array_merge(
222 $GLOBALS['cfg']['AvailableCharsets']
224 'sql_compatibility' => [
233 // removed; in MySQL 5.0.33, this produces exports that
234 // can't be read by POSTGRESQL (see our bug #1596328)
238 'csv_terminated' => 'short_string',
239 'csv_enclosed' => 'short_string',
240 'csv_escaped' => 'short_string',
241 'ldi_terminated' => 'short_string',
242 'ldi_enclosed' => 'short_string',
243 'ldi_escaped' => 'short_string',
244 'ldi_local_option' => [
253 'structure' => __('structure'),
254 'data' => __('data'),
255 'structure_and_data' => __('structure and data'),
258 'quick' => __('Quick - display only the minimal options to configure'),
259 'custom' => __('Custom - display all possible options to configure'),
260 'custom-no-form' => __(
261 'Custom - like above, but without the quick/custom choice'
284 'charset' => array_merge(
286 $GLOBALS['cfg']['AvailableCharsets']
288 'sql_compatibility' => [
297 // removed; in MySQL 5.0.33, this produces exports that
298 // can't be read by POSTGRESQL (see our bug #1596328)
302 'codegen_format' => [
307 'csv_separator' => 'short_string',
308 'csv_terminated' => 'short_string',
309 'csv_enclosed' => 'short_string',
310 'csv_escaped' => 'short_string',
311 'csv_null' => 'short_string',
312 'excel_null' => 'short_string',
315 'mac_excel2003' => 'Excel 2003 / Macintosh',
316 'mac_excel2008' => 'Excel 2008 / Macintosh',
318 'sql_structure_or_data' => [
319 'structure' => __('structure'),
320 'data' => __('data'),
321 'structure_and_data' => __('structure and data'),
328 'sql_insert_syntax' => [
329 'complete' => __('complete inserts'),
330 'extended' => __('extended inserts'),
331 'both' => __('both of the above'),
332 'none' => __('neither of the above'),
334 'htmlword_structure_or_data' => [
335 'structure' => __('structure'),
336 'data' => __('data'),
337 'structure_and_data' => __('structure and data'),
339 'htmlword_null' => 'short_string',
340 'ods_null' => 'short_string',
341 'odt_null' => 'short_string',
342 'odt_structure_or_data' => [
343 'structure' => __('structure'),
344 'data' => __('data'),
345 'structure_and_data' => __('structure and data'),
347 'texytext_structure_or_data' => [
348 'structure' => __('structure'),
349 'data' => __('data'),
350 'structure_and_data' => __('structure and data'),
352 'texytext_null' => 'short_string',
373 * Default values overrides
374 * Use only full paths
379 * Basic validator assignments (functions from libraries/config/Validator.php
380 * and 'validators' object in js/config.js)
381 * Use only full paths and form ids
384 'Console/Height' => 'validateNonNegativeNumber',
385 'CharTextareaCols' => 'validatePositiveNumber',
386 'CharTextareaRows' => 'validatePositiveNumber',
387 'ExecTimeLimit' => 'validateNonNegativeNumber',
388 'Export/sql_max_query_size' => 'validatePositiveNumber',
389 'FirstLevelNavigationItems' => 'validatePositiveNumber',
390 'ForeignKeyMaxLimit' => 'validatePositiveNumber',
391 'Import/csv_enclosed' => [
397 'Import/csv_escaped' => [
403 'Import/csv_terminated' => [
409 'Import/ldi_enclosed' => [
415 'Import/ldi_escaped' => [
421 'Import/ldi_terminated' => [
427 'Import/skip_queries' => 'validateNonNegativeNumber',
428 'InsertRows' => 'validatePositiveNumber',
429 'NumRecentTables' => 'validateNonNegativeNumber',
430 'NumFavoriteTables' => 'validateNonNegativeNumber',
431 'LimitChars' => 'validatePositiveNumber',
432 'LoginCookieValidity' => 'validatePositiveNumber',
433 'LoginCookieStore' => 'validateNonNegativeNumber',
434 'MaxDbList' => 'validatePositiveNumber',
435 'MaxNavigationItems' => 'validatePositiveNumber',
436 'MaxCharactersInDisplayedSQL' => 'validatePositiveNumber',
437 'MaxRows' => 'validatePositiveNumber',
438 'MaxSizeForInputField' => 'validatePositiveNumber',
439 'MinSizeForInputField' => 'validateNonNegativeNumber',
440 'MaxTableList' => 'validatePositiveNumber',
444 '/^(-1|(\d+(?:[kmg])?))$/i',
447 'NavigationTreeDisplayItemFilterMinimum' => 'validatePositiveNumber',
448 'NavigationTreeTableLevel' => 'validatePositiveNumber',
449 'NavigationWidth' => 'validateNonNegativeNumber',
450 'QueryHistoryMax' => 'validatePositiveNumber',
451 'RepeatCells' => 'validateNonNegativeNumber',
452 'Server' => 'validateServer',
453 'Server_pmadb' => 'validatePMAStorage',
454 'Servers/1/port' => 'validatePortNumber',
455 'Servers/1/hide_db' => 'validateRegex',
456 'TextareaCols' => 'validatePositiveNumber',
457 'TextareaRows' => 'validatePositiveNumber',
458 'TrustedProxies' => 'validateTrustedProxies',
462 * Additional validators used for user preferences
464 '_userValidators' => [
467 'validateUpperBound',
473 'validateUpperBound',
474 'value:MaxTableList',
477 'QueryHistoryMax' => [
479 'validateUpperBound',
480 'value:QueryHistoryMax',