3 * Database with allowed values for configuration stored in the $cfg array,
4 * used by setup script and user preferences to generate forms.
7 declare(strict_types
=1);
9 if (! defined('PHPMYADMIN')) {
15 * o array - select field, array contains allowed values
16 * o string - type override
18 * Use normal array, paths won't be expanded
53 'MemoryLimit' => 'short_string',
54 'NavigationLogoLinkWindow' => [
58 'NavigationTreeDefaultTabTable' => [
60 'structure' => __('Structure'),
64 'search' => __('Search'),
66 'insert' => __('Insert'),
68 'browse' => __('Browse'),
70 'NavigationTreeDefaultTabTable2' => [
74 'structure' => __('Structure'),
78 'search' => __('Search'),
80 'insert' => __('Insert'),
82 'browse' => __('Browse'),
84 'NavigationTreeDbSeparator' => 'short_string',
85 'NavigationTreeTableSeparator' => 'short_string',
86 'NavigationWidth' => 'integer',
87 'TableNavigationLinksMode' => [
88 'icons' => __('Icons'),
104 'RowActionLinks' => [
105 'none' => __('Nowhere'),
106 'left' => __('Left'),
107 'right' => __('Right'),
108 'both' => __('Both'),
110 'TablePrimaryKeyOrder' => [
111 'NONE' => __('None'),
112 'ASC' => __('Ascending'),
113 'DESC' => __('Descending'),
126 'icons' => __('Icons'),
127 'text' => __('Text'),
128 'both' => __('Both'),
130 'PDFDefaultPageSize' => [
134 'letter' => 'letter',
137 'ActionLinksMode' => [
138 'icons' => __('Icons'),
139 'text' => __('Text'),
140 'both' => __('Both'),
143 'click' => __('Click'),
144 'double-click' => __('Double click'),
145 'disabled' => __('Disabled'),
147 'RelationalDisplay' => [
149 'D' => __('display column'),
151 'DefaultTabServer' => [
152 // the welcome page (recommended for multiuser setups)
153 'welcome' => __('Welcome'),
155 'databases' => __('Databases'),
156 // runtime information
157 'status' => __('Status'),
158 // MySQL server variables
159 'variables' => __('Variables'),
161 'privileges' => __('Privileges'),
163 'DefaultTabDatabase' => [
165 'structure' => __('Structure'),
169 'search' => __('Search'),
170 // operations on database
171 'operations' => __('Operations'),
173 'DefaultTabTable' => [
175 'structure' => __('Structure'),
179 'search' => __('Search'),
181 'insert' => __('Insert'),
183 'browse' => __('Browse'),
185 'InitialSlidersState' => [
186 'open' => __('Open'),
187 'closed' => __('Closed'),
188 'disabled' => __('Disabled'),
190 'FirstDayOfCalendar' => [
192 '2' => __('Tuesday'),
193 '3' => __('Wednesday'),
194 '4' => __('Thursday'),
196 '6' => __('Saturday'),
199 'SendErrorReports' => [
200 'ask' => __('Ask before sending error reports'),
201 'always' => __('Always send error reports'),
202 'never' => __('Never send error reports'),
204 'DefaultForeignKeyChecks' => [
205 'default' => __('Server default'),
206 'enable' => __('Enable'),
207 'disable' => __('Disable'),
216 // CSV using LOAD DATA
221 'charset' => array_merge(
223 $GLOBALS['cfg']['AvailableCharsets']
225 'sql_compatibility' => [
234 // removed; in MySQL 5.0.33, this produces exports that
235 // can't be read by POSTGRESQL (see our bug #1596328)
239 'csv_terminated' => 'short_string',
240 'csv_enclosed' => 'short_string',
241 'csv_escaped' => 'short_string',
242 'ldi_terminated' => 'short_string',
243 'ldi_enclosed' => 'short_string',
244 'ldi_escaped' => 'short_string',
245 'ldi_local_option' => [
254 'structure' => __('structure'),
255 'data' => __('data'),
256 'structure_and_data' => __('structure and data'),
259 'quick' => __('Quick - display only the minimal options to configure'),
260 'custom' => __('Custom - display all possible options to configure'),
261 'custom-no-form' => __(
262 'Custom - like above, but without the quick/custom choice'
285 'charset' => array_merge(
287 $GLOBALS['cfg']['AvailableCharsets']
289 'sql_compatibility' => [
298 // removed; in MySQL 5.0.33, this produces exports that
299 // can't be read by POSTGRESQL (see our bug #1596328)
303 'codegen_format' => [
308 'csv_separator' => 'short_string',
309 'csv_terminated' => 'short_string',
310 'csv_enclosed' => 'short_string',
311 'csv_escaped' => 'short_string',
312 'csv_null' => 'short_string',
313 'excel_null' => 'short_string',
316 'mac_excel2003' => 'Excel 2003 / Macintosh',
317 'mac_excel2008' => 'Excel 2008 / Macintosh',
319 'sql_structure_or_data' => [
320 'structure' => __('structure'),
321 'data' => __('data'),
322 'structure_and_data' => __('structure and data'),
329 'sql_insert_syntax' => [
330 'complete' => __('complete inserts'),
331 'extended' => __('extended inserts'),
332 'both' => __('both of the above'),
333 'none' => __('neither of the above'),
335 'htmlword_structure_or_data' => [
336 'structure' => __('structure'),
337 'data' => __('data'),
338 'structure_and_data' => __('structure and data'),
340 'htmlword_null' => 'short_string',
341 'ods_null' => 'short_string',
342 'odt_null' => 'short_string',
343 'odt_structure_or_data' => [
344 'structure' => __('structure'),
345 'data' => __('data'),
346 'structure_and_data' => __('structure and data'),
348 'texytext_structure_or_data' => [
349 'structure' => __('structure'),
350 'data' => __('data'),
351 'structure_and_data' => __('structure and data'),
353 'texytext_null' => 'short_string',
374 * Default values overrides
375 * Use only full paths
380 * Basic validator assignments (functions from libraries/config/Validator.php
381 * and 'validators' object in js/config.js)
382 * Use only full paths and form ids
385 'Console/Height' => 'validateNonNegativeNumber',
386 'CharTextareaCols' => 'validatePositiveNumber',
387 'CharTextareaRows' => 'validatePositiveNumber',
388 'ExecTimeLimit' => 'validateNonNegativeNumber',
389 'Export/sql_max_query_size' => 'validatePositiveNumber',
390 'FirstLevelNavigationItems' => 'validatePositiveNumber',
391 'ForeignKeyMaxLimit' => 'validatePositiveNumber',
392 'Import/csv_enclosed' => [
398 'Import/csv_escaped' => [
404 'Import/csv_terminated' => [
410 'Import/ldi_enclosed' => [
416 'Import/ldi_escaped' => [
422 'Import/ldi_terminated' => [
428 'Import/skip_queries' => 'validateNonNegativeNumber',
429 'InsertRows' => 'validatePositiveNumber',
430 'NumRecentTables' => 'validateNonNegativeNumber',
431 'NumFavoriteTables' => 'validateNonNegativeNumber',
432 'LimitChars' => 'validatePositiveNumber',
433 'LoginCookieValidity' => 'validatePositiveNumber',
434 'LoginCookieStore' => 'validateNonNegativeNumber',
435 'MaxDbList' => 'validatePositiveNumber',
436 'MaxNavigationItems' => 'validatePositiveNumber',
437 'MaxCharactersInDisplayedSQL' => 'validatePositiveNumber',
438 'MaxRows' => 'validatePositiveNumber',
439 'MaxSizeForInputField' => 'validatePositiveNumber',
440 'MinSizeForInputField' => 'validateNonNegativeNumber',
441 'MaxTableList' => 'validatePositiveNumber',
445 '/^(-1|(\d+(?:[kmg])?))$/i',
448 'NavigationTreeDisplayItemFilterMinimum' => 'validatePositiveNumber',
449 'NavigationTreeTableLevel' => 'validatePositiveNumber',
450 'NavigationWidth' => 'validateNonNegativeNumber',
451 'QueryHistoryMax' => 'validatePositiveNumber',
452 'RepeatCells' => 'validateNonNegativeNumber',
453 'Server' => 'validateServer',
454 'Server_pmadb' => 'validatePMAStorage',
455 'Servers/1/port' => 'validatePortNumber',
456 'Servers/1/hide_db' => 'validateRegex',
457 'TextareaCols' => 'validatePositiveNumber',
458 'TextareaRows' => 'validatePositiveNumber',
459 'TrustedProxies' => 'validateTrustedProxies',
463 * Additional validators used for user preferences
465 '_userValidators' => [
468 'validateUpperBound',
474 'validateUpperBound',
475 'value:MaxTableList',
478 'QueryHistoryMax' => [
480 'validateUpperBound',
481 'value:QueryHistoryMax',