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 'extension' => array('mysql', 'mysqli'),
28 'auth_type' => array('config', 'http', 'signon', 'cookie'),
30 'order' => array('', 'deny,allow', 'allow,deny', 'explicit')
35 $cfg_db['RecodingEngine'] = array('auto', 'iconv', 'recode', 'none');
36 $cfg_db['OBGzip'] = array('auto', true, false);
37 $cfg_db['MemoryLimit'] = 'short_string';
38 $cfg_db['NavigationLogoLinkWindow'] = array('main', 'new');
39 $cfg_db['NavigationTreeDefaultTabTable'] = array(
40 'tbl_structure.php', // fields list
41 'tbl_sql.php', // SQL form
42 'tbl_select.php', // search page
43 'tbl_change.php', // insert row page
44 'sql.php' // browse page
46 $cfg_db['NavigationTreeDbSeparator'] = 'short_string';
47 $cfg_db['NavigationTreeTableSeparator'] = 'short_string';
48 $cfg_db['NavigationBarIconic'] = array(
53 $cfg_db['Order'] = array('ASC', 'DESC', 'SMART');
54 $cfg_db['RowActionLinks'] = array(
55 'none' => __('Nowhere'),
57 'right' => __('Right'),
60 $cfg_db['ProtectBinary'] = array(false, 'blob', 'noblob', 'all');
61 $cfg_db['DefaultDisplay'] = array('horizontal', 'vertical', 'horizontalflipped');
62 $cfg_db['CharEditing'] = array('input', 'textarea');
63 $cfg_db['PropertiesIconic'] = array(
68 $cfg_db['GridEditing'] = array(
69 'click' => __('Click'),
70 'double-click' => __('Double click'),
71 'disabled' => __('Disabled'),
73 $cfg_db['DefaultTabServer'] = array(
74 'index.php', // the welcome page (recommended for multiuser setups)
75 'server_databases.php', // list of databases
76 'server_status.php', // runtime information
77 'server_variables.php', // MySQL server variables
78 'server_privileges.php' // user management
80 $cfg_db['DefaultTabDatabase'] = array(
81 'db_structure.php', // tables list
82 'db_sql.php', // SQL form
83 'db_search.php', // search query
84 'db_operations.php' // operations on database
86 $cfg_db['DefaultTabTable'] = array(
87 'tbl_structure.php', // fields list
88 'tbl_sql.php', // SQL form
89 'tbl_select.php', // search page
90 'tbl_change.php', // insert row page
91 'sql.php' // browse page
93 $cfg_db['QueryWindowDefTab'] = array(
95 'files', // Import files
96 'history', // SQL history
97 'full' // All (SQL and SQL history)
99 $cfg_db['InitialSlidersState'] = array(
100 'open' => __('Open'),
101 'closed' => __('Closed'),
102 'disabled' => __('Disabled')
104 $cfg_db['Import']['format'] = array(
107 'ldi', // CSV using LOAD DATA
110 $cfg_db['Import']['charset'] = array_merge(
112 $GLOBALS['cfg']['AvailableCharsets']
114 $cfg_db['Import']['sql_compatibility']
115 = $cfg_db['Export']['sql_compatibility'] = array(
116 'NONE', 'ANSI', 'DB2', 'MAXDB', 'MYSQL323',
117 'MYSQL40', 'MSSQL', 'ORACLE',
118 // removed; in MySQL 5.0.33, this produces exports that
119 // can't be read by POSTGRESQL (see our bug #1596328)
123 $cfg_db['Import']['csv_terminated'] = 'short_string';
124 $cfg_db['Import']['csv_enclosed'] = 'short_string';
125 $cfg_db['Import']['csv_escaped'] = 'short_string';
126 $cfg_db['Import']['ldi_terminated'] = 'short_string';
127 $cfg_db['Import']['ldi_enclosed'] = 'short_string';
128 $cfg_db['Import']['ldi_escaped'] = 'short_string';
129 $cfg_db['Import']['ldi_local_option'] = array('auto', true, false);
130 $cfg_db['Export']['_sod_select'] = array(
131 'structure' => __('structure'),
132 'data' => __('data'),
133 'structure_and_data' => __('structure and data')
135 $cfg_db['Export']['method'] = array(
136 'quick' => __('Quick - display only the minimal options to configure'),
137 'custom' => __('Custom - display all possible options to configure'),
138 'custom-no-form' => __('Custom - like above, but without the quick/custom choice')
140 $cfg_db['Export']['format'] = array(
141 'codegen', 'csv', 'excel', 'htmlexcel','htmlword', 'latex', 'ods',
142 'odt', 'pdf', 'sql', 'texytext', 'xls', 'xml', 'yaml'
144 $cfg_db['Export']['compression'] = array('none', 'zip', 'gzip', 'bzip2');
145 $cfg_db['Export']['charset'] = array_merge(
147 $GLOBALS['cfg']['AvailableCharsets']
149 $cfg_db['Export']['codegen_format'] = array(
150 '#', 'NHibernate C# DO', 'NHibernate XML'
152 $cfg_db['Export']['csv_separator'] = 'short_string';
153 $cfg_db['Export']['csv_terminated'] = 'short_string';
154 $cfg_db['Export']['csv_enclosed'] = 'short_string';
155 $cfg_db['Export']['csv_escaped'] = 'short_string';
156 $cfg_db['Export']['csv_null'] = 'short_string';
157 $cfg_db['Export']['excel_null'] = 'short_string';
158 $cfg_db['Export']['excel_edition'] = array(
160 'mac_excel2003' => 'Excel 2003 / Macintosh',
161 'mac_excel2008' => 'Excel 2008 / Macintosh'
163 $cfg_db['Export']['sql_structure_or_data'] = $cfg_db['Export']['_sod_select'];
164 $cfg_db['Export']['sql_type'] = array('INSERT', 'UPDATE', 'REPLACE');
165 $cfg_db['Export']['sql_insert_syntax'] = array(
166 'complete' => __('complete inserts'),
167 'extended' => __('extended inserts'),
168 'both' => __('both of the above'),
169 'none' => __('neither of the above')
171 $cfg_db['Export']['xls_null'] = 'short_string';
172 $cfg_db['Export']['xlsx_null'] = 'short_string';
173 $cfg_db['Export']['htmlword_structure_or_data'] = $cfg_db['Export']['_sod_select'];
174 $cfg_db['Export']['htmlword_null'] = 'short_string';
175 $cfg_db['Export']['ods_null'] = 'short_string';
176 $cfg_db['Export']['odt_null'] = 'short_string';
177 $cfg_db['Export']['odt_structure_or_data'] = $cfg_db['Export']['_sod_select'];
178 $cfg_db['Export']['texytext_structure_or_data'] = $cfg_db['Export']['_sod_select'];
179 $cfg_db['Export']['texytext_null'] = 'short_string';
182 * Default values overrides
183 * Use only full paths
185 $cfg_db['_overrides'] = array();
186 $cfg_db['_overrides']['Servers/1/extension'] = extension_loaded('mysqli')
187 ?
'mysqli' : 'mysql';
190 * Basic validator assignments (functions from libraries/config/validate.lib.php
191 * and 'validators' object in js/config.js)
192 * Use only full paths and form ids
194 $cfg_db['_validators'] = array(
195 'CharTextareaCols' => 'validate_positive_number',
196 'CharTextareaRows' => 'validate_positive_number',
197 'ExecTimeLimit' => 'validate_non_negative_number',
198 'Export/sql_max_query_size' => 'validate_positive_number',
199 'ForeignKeyMaxLimit' => 'validate_positive_number',
200 'Import/csv_enclosed' => array(array('validate_by_regex', '/^.?$/')),
201 'Import/csv_escaped' => array(array('validate_by_regex', '/^.$/')),
202 'Import/csv_terminated' => array(array('validate_by_regex', '/^.$/')),
203 'Import/ldi_enclosed' => array(array('validate_by_regex', '/^.?$/')),
204 'Import/ldi_escaped' => array(array('validate_by_regex', '/^.$/')),
205 'Import/ldi_terminated' => array(array('validate_by_regex', '/^.$/')),
206 'Import/skip_queries' => 'validate_non_negative_number',
207 'InsertRows' => 'validate_positive_number',
208 'NumRecentTables' => 'validate_non_negative_number',
209 'LimitChars' => 'validate_positive_number',
210 'LoginCookieValidity' => 'validate_positive_number',
211 'LoginCookieStore' => 'validate_non_negative_number',
212 'MaxDbList' => 'validate_positive_number',
213 'MaxNavigationItems' => 'validate_positive_number',
214 'MaxCharactersInDisplayedSQL' => 'validate_positive_number',
215 'MaxRows' => 'validate_positive_number',
216 'MaxTableList' => 'validate_positive_number',
217 'MemoryLimit' => array(array('validate_by_regex', '/^\d+(?:[kmg])?$/i')),
218 'NavigationTreeTableLevel' => 'validate_positive_number',
219 'QueryHistoryMax' => 'validate_positive_number',
220 'QueryWindowWidth' => 'validate_positive_number',
221 'QueryWindowHeight' => 'validate_positive_number',
222 'RepeatCells' => 'validate_non_negative_number',
223 'Server' => 'validate_server',
224 'Server_pmadb' => 'validate_pmadb',
225 'Servers/1/port' => 'validate_port_number',
226 'Servers/1/hide_db' => 'validate_regex',
227 'TextareaCols' => 'validate_positive_number',
228 'TextareaRows' => 'validate_positive_number',
229 'TrustedProxies' => 'validate_trusted_proxies');
232 * Additional validators used for user preferences
234 $cfg_db['_userValidators'] = array(
235 'MaxDbList' => array(array('validate_upper_bound', 'value:MaxDbList')),
236 'MaxTableList' => array(array('validate_upper_bound', 'value:MaxTableList')),
237 'QueryHistoryMax' => array(array('validate_upper_bound', 'value:QueryHistoryMax'))