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' => __('Custom - like above, but without the quick/custom choice'),
283 'charset' => array_merge(
285 $GLOBALS['cfg']['AvailableCharsets']
287 'sql_compatibility' => [
296 // removed; in MySQL 5.0.33, this produces exports that
297 // can't be read by POSTGRESQL (see our bug #1596328)
301 'codegen_format' => [
306 'csv_separator' => 'short_string',
307 'csv_terminated' => 'short_string',
308 'csv_enclosed' => 'short_string',
309 'csv_escaped' => 'short_string',
310 'csv_null' => 'short_string',
311 'excel_null' => 'short_string',
314 'mac_excel2003' => 'Excel 2003 / Macintosh',
315 'mac_excel2008' => 'Excel 2008 / Macintosh',
317 'sql_structure_or_data' => [
318 'structure' => __('structure'),
319 'data' => __('data'),
320 'structure_and_data' => __('structure and data'),
327 'sql_insert_syntax' => [
328 'complete' => __('complete inserts'),
329 'extended' => __('extended inserts'),
330 'both' => __('both of the above'),
331 'none' => __('neither of the above'),
333 'htmlword_structure_or_data' => [
334 'structure' => __('structure'),
335 'data' => __('data'),
336 'structure_and_data' => __('structure and data'),
338 'htmlword_null' => 'short_string',
339 'ods_null' => 'short_string',
340 'odt_null' => 'short_string',
341 'odt_structure_or_data' => [
342 'structure' => __('structure'),
343 'data' => __('data'),
344 'structure_and_data' => __('structure and data'),
346 'texytext_structure_or_data' => [
347 'structure' => __('structure'),
348 'data' => __('data'),
349 'structure_and_data' => __('structure and data'),
351 'texytext_null' => 'short_string',
372 * Default values overrides
373 * Use only full paths
378 * Basic validator assignments (functions from libraries/config/Validator.php
379 * and 'validators' object in js/config.js)
380 * Use only full paths and form ids
383 'Console/Height' => 'validateNonNegativeNumber',
384 'CharTextareaCols' => 'validatePositiveNumber',
385 'CharTextareaRows' => 'validatePositiveNumber',
386 'ExecTimeLimit' => 'validateNonNegativeNumber',
387 'Export/sql_max_query_size' => 'validatePositiveNumber',
388 'FirstLevelNavigationItems' => 'validatePositiveNumber',
389 'ForeignKeyMaxLimit' => 'validatePositiveNumber',
390 'Import/csv_enclosed' => [
396 'Import/csv_escaped' => [
402 'Import/csv_terminated' => [
408 'Import/ldi_enclosed' => [
414 'Import/ldi_escaped' => [
420 'Import/ldi_terminated' => [
426 'Import/skip_queries' => 'validateNonNegativeNumber',
427 'InsertRows' => 'validatePositiveNumber',
428 'NumRecentTables' => 'validateNonNegativeNumber',
429 'NumFavoriteTables' => 'validateNonNegativeNumber',
430 'LimitChars' => 'validatePositiveNumber',
431 'LoginCookieValidity' => 'validatePositiveNumber',
432 'LoginCookieStore' => 'validateNonNegativeNumber',
433 'MaxDbList' => 'validatePositiveNumber',
434 'MaxNavigationItems' => 'validatePositiveNumber',
435 'MaxCharactersInDisplayedSQL' => 'validatePositiveNumber',
436 'MaxRows' => 'validatePositiveNumber',
437 'MaxSizeForInputField' => 'validatePositiveNumber',
438 'MinSizeForInputField' => 'validateNonNegativeNumber',
439 'MaxTableList' => 'validatePositiveNumber',
443 '/^(-1|(\d+(?:[kmg])?))$/i',
446 'NavigationTreeDisplayItemFilterMinimum' => 'validatePositiveNumber',
447 'NavigationTreeTableLevel' => 'validatePositiveNumber',
448 'NavigationWidth' => 'validateNonNegativeNumber',
449 'QueryHistoryMax' => 'validatePositiveNumber',
450 'RepeatCells' => 'validateNonNegativeNumber',
451 'Server' => 'validateServer',
452 'Server_pmadb' => 'validatePMAStorage',
453 'Servers/1/port' => 'validatePortNumber',
454 'Servers/1/hide_db' => 'validateRegex',
455 'TextareaCols' => 'validatePositiveNumber',
456 'TextareaRows' => 'validatePositiveNumber',
457 'TrustedProxies' => 'validateTrustedProxies',
461 * Additional validators used for user preferences
463 '_userValidators' => [
466 'validateUpperBound',
472 'validateUpperBound',
473 'value:MaxTableList',
476 'QueryHistoryMax' => [
478 'validateUpperBound',
479 'value:QueryHistoryMax',