Merge branch 'origin/master' into Weblate.
[phpmyadmin.git] / libraries / config.values.php
blob6b7a4307ccd5bb448aeb8e8281cd61623681fc3c
1 <?php
2 /**
3 * Database with allowed values for configuration stored in the $cfg array,
4 * used by setup script and user preferences to generate forms.
5 */
7 declare(strict_types=1);
9 if (! defined('PHPMYADMIN')) {
10 exit;
13 /**
14 * Value meaning:
15 * o array - select field, array contains allowed values
16 * o string - type override
18 * Use normal array, paths won't be expanded
20 return [
21 'Servers' => [
22 1 => [
23 'port' => 'integer',
24 'auth_type' => [
25 'config',
26 'http',
27 'signon',
28 'cookie',
30 'AllowDeny' => [
31 'order' => [
32 '',
33 'deny,allow',
34 'allow,deny',
35 'explicit',
38 'only_db' => 'array',
41 'RecodingEngine' => [
42 'auto',
43 'iconv',
44 'recode',
45 'mb',
46 'none',
48 'OBGzip' => [
49 'auto',
50 true,
51 false,
53 'MemoryLimit' => 'short_string',
54 'NavigationLogoLinkWindow' => [
55 'main',
56 'new',
58 'NavigationTreeDefaultTabTable' => [
59 // fields list
60 'structure' => __('Structure'),
61 // SQL form
62 'sql' => __('SQL'),
63 // search page
64 'search' => __('Search'),
65 // insert row page
66 'insert' => __('Insert'),
67 // browse page
68 'browse' => __('Browse'),
70 'NavigationTreeDefaultTabTable2' => [
71 //don't display
72 '' => '',
73 // fields list
74 'structure' => __('Structure'),
75 // SQL form
76 'sql' => __('SQL'),
77 // search page
78 'search' => __('Search'),
79 // insert row page
80 'insert' => __('Insert'),
81 // browse page
82 'browse' => __('Browse'),
84 'NavigationTreeDbSeparator' => 'short_string',
85 'NavigationTreeTableSeparator' => 'short_string',
86 'NavigationWidth' => 'integer',
87 'TableNavigationLinksMode' => [
88 'icons' => __('Icons'),
89 'text' => __('Text'),
90 'both' => __('Both'),
92 'MaxRows' => [
93 25,
94 50,
95 100,
96 250,
97 500,
99 'Order' => [
100 'ASC',
101 'DESC',
102 'SMART',
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'),
115 'ProtectBinary' => [
116 false,
117 'blob',
118 'noblob',
119 'all',
121 'CharEditing' => [
122 'input',
123 'textarea',
125 'TabsMode' => [
126 'icons' => __('Icons'),
127 'text' => __('Text'),
128 'both' => __('Both'),
130 'PDFDefaultPageSize' => [
131 'A3' => 'A3',
132 'A4' => 'A4',
133 'A5' => 'A5',
134 'letter' => 'letter',
135 'legal' => 'legal',
137 'ActionLinksMode' => [
138 'icons' => __('Icons'),
139 'text' => __('Text'),
140 'both' => __('Both'),
142 'GridEditing' => [
143 'click' => __('Click'),
144 'double-click' => __('Double click'),
145 'disabled' => __('Disabled'),
147 'RelationalDisplay' => [
148 'K' => __('key'),
149 'D' => __('display column'),
151 'DefaultTabServer' => [
152 // the welcome page (recommended for multiuser setups)
153 'welcome' => __('Welcome'),
154 // list of databases
155 'databases' => __('Databases'),
156 // runtime information
157 'status' => __('Status'),
158 // MySQL server variables
159 'variables' => __('Variables'),
160 // user management
161 'privileges' => __('Privileges'),
163 'DefaultTabDatabase' => [
164 // tables list
165 'structure' => __('Structure'),
166 // SQL form
167 'sql' => __('SQL'),
168 // search query
169 'search' => __('Search'),
170 // operations on database
171 'operations' => __('Operations'),
173 'DefaultTabTable' => [
174 // fields list
175 'structure' => __('Structure'),
176 // SQL form
177 'sql' => __('SQL'),
178 // search page
179 'search' => __('Search'),
180 // insert row page
181 'insert' => __('Insert'),
182 // browse page
183 'browse' => __('Browse'),
185 'InitialSlidersState' => [
186 'open' => __('Open'),
187 'closed' => __('Closed'),
188 'disabled' => __('Disabled'),
190 'FirstDayOfCalendar' => [
191 '1' => __('Monday'),
192 '2' => __('Tuesday'),
193 '3' => __('Wednesday'),
194 '4' => __('Thursday'),
195 '5' => __('Friday'),
196 '6' => __('Saturday'),
197 '7' => __('Sunday'),
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'),
210 'Import' => [
211 'format' => [
212 // CSV
213 'csv',
214 // DocSQL
215 'docsql',
216 // CSV using LOAD DATA
217 'ldi',
218 // SQL
219 'sql',
221 'charset' => array_merge(
222 [''],
223 $GLOBALS['cfg']['AvailableCharsets']
225 'sql_compatibility' => [
226 'NONE',
227 'ANSI',
228 'DB2',
229 'MAXDB',
230 'MYSQL323',
231 'MYSQL40',
232 'MSSQL',
233 'ORACLE',
234 // removed; in MySQL 5.0.33, this produces exports that
235 // can't be read by POSTGRESQL (see our bug #1596328)
236 //'POSTGRESQL',
237 'TRADITIONAL',
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' => [
246 'auto',
247 true,
248 false,
252 'Export' => [
253 '_sod_select' => [
254 'structure' => __('structure'),
255 'data' => __('data'),
256 'structure_and_data' => __('structure and data'),
258 'method' => [
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'
265 'format' => [
266 'codegen',
267 'csv',
268 'excel',
269 'htmlexcel',
270 'htmlword',
271 'latex',
272 'ods',
273 'odt',
274 'pdf',
275 'sql',
276 'texytext',
277 'xml',
278 'yaml',
280 'compression' => [
281 'none',
282 'zip',
283 'gzip',
285 'charset' => array_merge(
286 [''],
287 $GLOBALS['cfg']['AvailableCharsets']
289 'sql_compatibility' => [
290 'NONE',
291 'ANSI',
292 'DB2',
293 'MAXDB',
294 'MYSQL323',
295 'MYSQL40',
296 'MSSQL',
297 'ORACLE',
298 // removed; in MySQL 5.0.33, this produces exports that
299 // can't be read by POSTGRESQL (see our bug #1596328)
300 //'POSTGRESQL',
301 'TRADITIONAL',
303 'codegen_format' => [
304 '#',
305 'NHibernate C# DO',
306 'NHibernate XML',
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',
314 'excel_edition' => [
315 'win' => 'Windows',
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'),
324 'sql_type' => [
325 'INSERT',
326 'UPDATE',
327 'REPLACE',
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',
356 'Console' => [
357 'Mode' => [
358 'info',
359 'show',
360 'collapse',
362 'OrderBy' => [
363 'exec',
364 'time',
365 'count',
367 'Order' => [
368 'asc',
369 'desc',
374 * Default values overrides
375 * Use only full paths
377 '_overrides' => [],
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
384 '_validators' => [
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' => [
394 'validateByRegex',
395 '/^.?$/',
398 'Import/csv_escaped' => [
400 'validateByRegex',
401 '/^.$/',
404 'Import/csv_terminated' => [
406 'validateByRegex',
407 '/^.$/',
410 'Import/ldi_enclosed' => [
412 'validateByRegex',
413 '/^.?$/',
416 'Import/ldi_escaped' => [
418 'validateByRegex',
419 '/^.$/',
422 'Import/ldi_terminated' => [
424 'validateByRegex',
425 '/^.$/',
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',
442 'MemoryLimit' => [
444 'validateByRegex',
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' => [
466 'MaxDbList' => [
468 'validateUpperBound',
469 'value:MaxDbList',
472 'MaxTableList' => [
474 'validateUpperBound',
475 'value:MaxTableList',
478 'QueryHistoryMax' => [
480 'validateUpperBound',
481 'value:QueryHistoryMax',