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.
10 if (!defined('PHPMYADMIN')) {
16 * o array - select field, array contains allowed values
17 * o string - type override
19 * Use normal array, paths won't be expanded
23 $cfg_db['Servers'] = array(
26 'connect_type' => array('tcp', 'socket'),
27 'auth_type' => array('config', 'http', 'signon', 'cookie'),
29 'order' => array('', 'deny,allow', 'allow,deny', 'explicit')
34 $cfg_db['RecodingEngine'] = array('auto', 'iconv', 'recode', 'mb', 'none');
35 $cfg_db['OBGzip'] = array('auto', true, false);
36 $cfg_db['MemoryLimit'] = 'short_string';
37 $cfg_db['NavigationLogoLinkWindow'] = array('main', 'new');
38 $cfg_db['NavigationTreeDefaultTabTable'] = array(
39 'structure' => __('Structure'), // fields list
40 'sql' => __('SQL'), // SQL form
41 'search' => __('Search'), // search page
42 'insert' => __('Insert'), // insert row page
43 'browse' => __('Browse') // browse page
45 $cfg_db['NavigationTreeDefaultTabTable2'] = array(
46 '' => '', //don't display
47 'structure' => __('Structure'), // fields list
48 'sql' => __('SQL'), // SQL form
49 'search' => __('Search'), // search page
50 'insert' => __('Insert'), // insert row page
51 'browse' => __('Browse') // browse page
53 $cfg_db['NavigationTreeDbSeparator'] = 'short_string';
54 $cfg_db['NavigationTreeTableSeparator'] = 'short_string';
55 $cfg_db['TableNavigationLinksMode'] = array(
56 'icons' => __('Icons'),
60 $cfg_db['MaxRows'] = array(25, 50, 100, 250, 500);
61 $cfg_db['Order'] = array('ASC', 'DESC', 'SMART');
62 $cfg_db['RowActionLinks'] = array(
63 'none' => __('Nowhere'),
65 'right' => __('Right'),
68 $cfg_db['TablePrimaryKeyOrder'] = array(
70 'ASC' => __('Ascending'),
71 'DESC' => __('Descending')
73 $cfg_db['ProtectBinary'] = array(false, 'blob', 'noblob', 'all');
74 $cfg_db['CharEditing'] = array('input', 'textarea');
75 $cfg_db['TabsMode'] = array(
76 'icons' => __('Icons'),
80 $cfg_db['PDFDefaultPageSize'] = array(
87 $cfg_db['ActionLinksMode'] = array(
88 'icons' => __('Icons'),
92 $cfg_db['GridEditing'] = array(
93 'click' => __('Click'),
94 'double-click' => __('Double click'),
95 'disabled' => __('Disabled'),
97 $cfg_db['RelationalDisplay'] = array(
99 'D' => __('display column')
101 $cfg_db['DefaultTabServer'] = array(
102 'welcome' => __('Welcome'), // the welcome page (recommended for multiuser setups)
103 'databases' => __('Databases'), // list of databases
104 'status' => __('Status'), // runtime information
105 'variables' => __('Variables'), // MySQL server variables
106 'privileges' => __('Privileges') // user management
108 $cfg_db['DefaultTabDatabase'] = array(
109 'structure' => __('Structure'), // tables list
110 'sql' => __('SQL'), // SQL form
111 'search' => __('Search'), // search query
112 'operations' => __('Operations') // operations on database
114 $cfg_db['DefaultTabTable'] = array(
115 'structure' => __('Structure'), // fields list
116 'sql' => __('SQL'), // SQL form
117 'search' => __('Search'), // search page
118 'insert' => __('Insert'), // insert row page
119 'browse' => __('Browse') // browse page
121 $cfg_db['InitialSlidersState'] = array(
122 'open' => __('Open'),
123 'closed' => __('Closed'),
124 'disabled' => __('Disabled')
126 $cfg_db['SendErrorReports'] = array(
127 'ask' => __('Ask before sending error reports'),
128 'always' => __('Always send error reports'),
129 'never' => __('Never send error reports')
131 $cfg_db['DefaultForeignKeyChecks'] = array(
132 'default' => __('Server default'),
133 'enable' => __('Enable'),
134 'disable' => __('Disable')
136 $cfg_db['Import']['format'] = array(
139 'ldi', // CSV using LOAD DATA
142 $cfg_db['Import']['charset'] = array_merge(
144 $GLOBALS['cfg']['AvailableCharsets']
146 $cfg_db['Import']['sql_compatibility']
147 = $cfg_db['Export']['sql_compatibility'] = array(
148 'NONE', 'ANSI', 'DB2', 'MAXDB', 'MYSQL323',
149 'MYSQL40', 'MSSQL', 'ORACLE',
150 // removed; in MySQL 5.0.33, this produces exports that
151 // can't be read by POSTGRESQL (see our bug #1596328)
155 $cfg_db['Import']['csv_terminated'] = 'short_string';
156 $cfg_db['Import']['csv_enclosed'] = 'short_string';
157 $cfg_db['Import']['csv_escaped'] = 'short_string';
158 $cfg_db['Import']['ldi_terminated'] = 'short_string';
159 $cfg_db['Import']['ldi_enclosed'] = 'short_string';
160 $cfg_db['Import']['ldi_escaped'] = 'short_string';
161 $cfg_db['Import']['ldi_local_option'] = array('auto', true, false);
162 $cfg_db['Export']['_sod_select'] = array(
163 'structure' => __('structure'),
164 'data' => __('data'),
165 'structure_and_data' => __('structure and data')
167 $cfg_db['Export']['method'] = array(
168 'quick' => __('Quick - display only the minimal options to configure'),
169 'custom' => __('Custom - display all possible options to configure'),
170 'custom-no-form' => __(
171 'Custom - like above, but without the quick/custom choice'
174 $cfg_db['Export']['format'] = array(
175 'codegen', 'csv', 'excel', 'htmlexcel','htmlword', 'latex', 'ods',
176 'odt', 'pdf', 'sql', 'texytext', 'xls', 'xml', 'yaml'
178 $cfg_db['Export']['compression'] = array('none', 'zip', 'gzip');
179 $cfg_db['Export']['charset'] = array_merge(
181 $GLOBALS['cfg']['AvailableCharsets']
183 $cfg_db['Export']['codegen_format'] = array(
184 '#', 'NHibernate C# DO', 'NHibernate XML'
186 $cfg_db['Export']['csv_separator'] = 'short_string';
187 $cfg_db['Export']['csv_terminated'] = 'short_string';
188 $cfg_db['Export']['csv_enclosed'] = 'short_string';
189 $cfg_db['Export']['csv_escaped'] = 'short_string';
190 $cfg_db['Export']['csv_null'] = 'short_string';
191 $cfg_db['Export']['excel_null'] = 'short_string';
192 $cfg_db['Export']['excel_edition'] = array(
194 'mac_excel2003' => 'Excel 2003 / Macintosh',
195 'mac_excel2008' => 'Excel 2008 / Macintosh'
197 $cfg_db['Export']['sql_structure_or_data'] = $cfg_db['Export']['_sod_select'];
198 $cfg_db['Export']['sql_type'] = array('INSERT', 'UPDATE', 'REPLACE');
199 $cfg_db['Export']['sql_insert_syntax'] = array(
200 'complete' => __('complete inserts'),
201 'extended' => __('extended inserts'),
202 'both' => __('both of the above'),
203 'none' => __('neither of the above')
205 $cfg_db['Export']['xls_null'] = 'short_string';
206 $cfg_db['Export']['xlsx_null'] = 'short_string';
207 $cfg_db['Export']['htmlword_structure_or_data'] = $cfg_db['Export']['_sod_select'];
208 $cfg_db['Export']['htmlword_null'] = 'short_string';
209 $cfg_db['Export']['ods_null'] = 'short_string';
210 $cfg_db['Export']['odt_null'] = 'short_string';
211 $cfg_db['Export']['odt_structure_or_data'] = $cfg_db['Export']['_sod_select'];
212 $cfg_db['Export']['texytext_structure_or_data'] = $cfg_db['Export']['_sod_select'];
213 $cfg_db['Export']['texytext_null'] = 'short_string';
216 * Default values overrides
217 * Use only full paths
219 $cfg_db['_overrides'] = array();
222 * Basic validator assignments (functions from libraries/config/Validator.class.php
223 * and 'validators' object in js/config.js)
224 * Use only full paths and form ids
226 $cfg_db['_validators'] = array(
227 'CharTextareaCols' => 'validatePositiveNumber',
228 'CharTextareaRows' => 'validatePositiveNumber',
229 'ExecTimeLimit' => 'validateNonNegativeNumber',
230 'Export/sql_max_query_size' => 'validatePositiveNumber',
231 'FirstLevelNavigationItems' => 'validatePositiveNumber',
232 'ForeignKeyMaxLimit' => 'validatePositiveNumber',
233 'Import/csv_enclosed' => array(array('validateByRegex', '/^.?$/')),
234 'Import/csv_escaped' => array(array('validateByRegex', '/^.$/')),
235 'Import/csv_terminated' => array(array('validateByRegex', '/^.$/')),
236 'Import/ldi_enclosed' => array(array('validateByRegex', '/^.?$/')),
237 'Import/ldi_escaped' => array(array('validateByRegex', '/^.$/')),
238 'Import/ldi_terminated' => array(array('validateByRegex', '/^.$/')),
239 'Import/skip_queries' => 'validateNonNegativeNumber',
240 'InsertRows' => 'validatePositiveNumber',
241 'NumRecentTables' => 'validateNonNegativeNumber',
242 'NumFavoriteTables' => 'validateNonNegativeNumber',
243 'LimitChars' => 'validatePositiveNumber',
244 'LoginCookieValidity' => 'validatePositiveNumber',
245 'LoginCookieStore' => 'validateNonNegativeNumber',
246 'MaxDbList' => 'validatePositiveNumber',
247 'MaxNavigationItems' => 'validatePositiveNumber',
248 'MaxCharactersInDisplayedSQL' => 'validatePositiveNumber',
249 'MaxRows' => 'validatePositiveNumber',
250 'MaxTableList' => 'validatePositiveNumber',
251 'MemoryLimit' => array(array('validateByRegex', '/^(-1|(\d+(?:[kmg])?))$/i')),
252 'NavigationTreeTableLevel' => 'validatePositiveNumber',
253 'QueryHistoryMax' => 'validatePositiveNumber',
254 'RepeatCells' => 'validateNonNegativeNumber',
255 'Server' => 'validateServer',
256 'Server_pmadb' => 'validatePMAStorage',
257 'Servers/1/port' => 'validatePortNumber',
258 'Servers/1/hide_db' => 'validateRegex',
259 'TextareaCols' => 'validatePositiveNumber',
260 'TextareaRows' => 'validatePositiveNumber',
261 'TrustedProxies' => 'validateTrustedProxies');
264 * Additional validators used for user preferences
266 $cfg_db['_userValidators'] = array(
267 'MaxDbList' => array(
268 array('validateUpperBound', 'value:MaxDbList')
270 'MaxTableList' => array(
271 array('validateUpperBound', 'value:MaxTableList')
273 'QueryHistoryMax' => array(
274 array('validateUpperBound', 'value:QueryHistoryMax')