2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Database with allowed values for configuration stored in the $cfg array,
5 * used by setup script and user preferences to generate forms.
9 declare(strict_types
=1);
11 if (! defined('PHPMYADMIN')) {
17 * o array - select field, array contains allowed values
18 * o string - type override
20 * Use normal array, paths won't be expanded
55 'MemoryLimit' => 'short_string',
56 'NavigationLogoLinkWindow' => [
60 'NavigationTreeDefaultTabTable' => [
62 'structure' => __('Structure'),
66 'search' => __('Search'),
68 'insert' => __('Insert'),
70 'browse' => __('Browse'),
72 'NavigationTreeDefaultTabTable2' => [
76 'structure' => __('Structure'),
80 'search' => __('Search'),
82 'insert' => __('Insert'),
84 'browse' => __('Browse'),
86 'NavigationTreeDbSeparator' => 'short_string',
87 'NavigationTreeTableSeparator' => 'short_string',
88 'NavigationWidth' => 'integer',
89 'TableNavigationLinksMode' => [
90 'icons' => __('Icons'),
106 'RowActionLinks' => [
107 'none' => __('Nowhere'),
108 'left' => __('Left'),
109 'right' => __('Right'),
110 'both' => __('Both'),
112 'TablePrimaryKeyOrder' => [
113 'NONE' => __('None'),
114 'ASC' => __('Ascending'),
115 'DESC' => __('Descending'),
128 'icons' => __('Icons'),
129 'text' => __('Text'),
130 'both' => __('Both'),
132 'PDFDefaultPageSize' => [
136 'letter' => 'letter',
139 'ActionLinksMode' => [
140 'icons' => __('Icons'),
141 'text' => __('Text'),
142 'both' => __('Both'),
145 'click' => __('Click'),
146 'double-click' => __('Double click'),
147 'disabled' => __('Disabled'),
149 'RelationalDisplay' => [
151 'D' => __('display column'),
153 'DefaultTabServer' => [
154 // the welcome page (recommended for multiuser setups)
155 'welcome' => __('Welcome'),
157 'databases' => __('Databases'),
158 // runtime information
159 'status' => __('Status'),
160 // MySQL server variables
161 'variables' => __('Variables'),
163 'privileges' => __('Privileges'),
165 'DefaultTabDatabase' => [
167 'structure' => __('Structure'),
171 'search' => __('Search'),
172 // operations on database
173 'operations' => __('Operations'),
175 'DefaultTabTable' => [
177 'structure' => __('Structure'),
181 'search' => __('Search'),
183 'insert' => __('Insert'),
185 'browse' => __('Browse'),
187 'InitialSlidersState' => [
188 'open' => __('Open'),
189 'closed' => __('Closed'),
190 'disabled' => __('Disabled'),
192 'SendErrorReports' => [
193 'ask' => __('Ask before sending error reports'),
194 'always' => __('Always send error reports'),
195 'never' => __('Never send error reports'),
197 'DefaultForeignKeyChecks' => [
198 'default' => __('Server default'),
199 'enable' => __('Enable'),
200 'disable' => __('Disable'),
209 // CSV using LOAD DATA
214 'charset' => array_merge(
216 $GLOBALS['cfg']['AvailableCharsets']
218 'sql_compatibility' => [
227 // removed; in MySQL 5.0.33, this produces exports that
228 // can't be read by POSTGRESQL (see our bug #1596328)
232 'csv_terminated' => 'short_string',
233 'csv_enclosed' => 'short_string',
234 'csv_escaped' => 'short_string',
235 'ldi_terminated' => 'short_string',
236 'ldi_enclosed' => 'short_string',
237 'ldi_escaped' => 'short_string',
238 'ldi_local_option' => [
247 'structure' => __('structure'),
248 'data' => __('data'),
249 'structure_and_data' => __('structure and data'),
252 'quick' => __('Quick - display only the minimal options to configure'),
253 'custom' => __('Custom - display all possible options to configure'),
254 'custom-no-form' => __(
255 'Custom - like above, but without the quick/custom choice'
278 'charset' => array_merge(
280 $GLOBALS['cfg']['AvailableCharsets']
282 'sql_compatibility' => [
291 // removed; in MySQL 5.0.33, this produces exports that
292 // can't be read by POSTGRESQL (see our bug #1596328)
296 'codegen_format' => [
301 'csv_separator' => 'short_string',
302 'csv_terminated' => 'short_string',
303 'csv_enclosed' => 'short_string',
304 'csv_escaped' => 'short_string',
305 'csv_null' => 'short_string',
306 'excel_null' => 'short_string',
309 'mac_excel2003' => 'Excel 2003 / Macintosh',
310 'mac_excel2008' => 'Excel 2008 / Macintosh',
312 'sql_structure_or_data' => [
313 'structure' => __('structure'),
314 'data' => __('data'),
315 'structure_and_data' => __('structure and data'),
322 'sql_insert_syntax' => [
323 'complete' => __('complete inserts'),
324 'extended' => __('extended inserts'),
325 'both' => __('both of the above'),
326 'none' => __('neither of the above'),
328 'htmlword_structure_or_data' => [
329 'structure' => __('structure'),
330 'data' => __('data'),
331 'structure_and_data' => __('structure and data'),
333 'htmlword_null' => 'short_string',
334 'ods_null' => 'short_string',
335 'odt_null' => 'short_string',
336 'odt_structure_or_data' => [
337 'structure' => __('structure'),
338 'data' => __('data'),
339 'structure_and_data' => __('structure and data'),
341 'texytext_structure_or_data' => [
342 'structure' => __('structure'),
343 'data' => __('data'),
344 'structure_and_data' => __('structure and data'),
346 'texytext_null' => 'short_string',
367 * Default values overrides
368 * Use only full paths
373 * Basic validator assignments (functions from libraries/config/Validator.php
374 * and 'validators' object in js/config.js)
375 * Use only full paths and form ids
378 'Console/Height' => 'validateNonNegativeNumber',
379 'CharTextareaCols' => 'validatePositiveNumber',
380 'CharTextareaRows' => 'validatePositiveNumber',
381 'ExecTimeLimit' => 'validateNonNegativeNumber',
382 'Export/sql_max_query_size' => 'validatePositiveNumber',
383 'FirstLevelNavigationItems' => 'validatePositiveNumber',
384 'ForeignKeyMaxLimit' => 'validatePositiveNumber',
385 'Import/csv_enclosed' => [
391 'Import/csv_escaped' => [
397 'Import/csv_terminated' => [
403 'Import/ldi_enclosed' => [
409 'Import/ldi_escaped' => [
415 'Import/ldi_terminated' => [
421 'Import/skip_queries' => 'validateNonNegativeNumber',
422 'InsertRows' => 'validatePositiveNumber',
423 'NumRecentTables' => 'validateNonNegativeNumber',
424 'NumFavoriteTables' => 'validateNonNegativeNumber',
425 'LimitChars' => 'validatePositiveNumber',
426 'LoginCookieValidity' => 'validatePositiveNumber',
427 'LoginCookieStore' => 'validateNonNegativeNumber',
428 'MaxDbList' => 'validatePositiveNumber',
429 'MaxNavigationItems' => 'validatePositiveNumber',
430 'MaxCharactersInDisplayedSQL' => 'validatePositiveNumber',
431 'MaxRows' => 'validatePositiveNumber',
432 'MaxSizeForInputField' => 'validatePositiveNumber',
433 'MinSizeForInputField' => 'validateNonNegativeNumber',
434 'MaxTableList' => 'validatePositiveNumber',
438 '/^(-1|(\d+(?:[kmg])?))$/i',
441 'NavigationTreeDisplayItemFilterMinimum' => 'validatePositiveNumber',
442 'NavigationTreeTableLevel' => 'validatePositiveNumber',
443 'NavigationWidth' => 'validateNonNegativeNumber',
444 'QueryHistoryMax' => 'validatePositiveNumber',
445 'RepeatCells' => 'validateNonNegativeNumber',
446 'Server' => 'validateServer',
447 'Server_pmadb' => 'validatePMAStorage',
448 'Servers/1/port' => 'validatePortNumber',
449 'Servers/1/hide_db' => 'validateRegex',
450 'TextareaCols' => 'validatePositiveNumber',
451 'TextareaRows' => 'validatePositiveNumber',
452 'TrustedProxies' => 'validateTrustedProxies',
456 * Additional validators used for user preferences
458 '_userValidators' => [
461 'validateUpperBound',
467 'validateUpperBound',
468 'value:MaxTableList',
471 'QueryHistoryMax' => [
473 'validateUpperBound',
474 'value:QueryHistoryMax',