Translation update done using Pootle.
[phpmyadmin/ammar_yasir.git] / libraries / config.values.php
blobdea8a233726be38ffbb2cfe225153ea439e5dcba
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Database with allowed values for configuration stored in the $cfg array,
5 * used by setup script and user preferences to generate forms.
7 * @package phpMyAdmin
8 */
10 if (!defined('PHPMYADMIN')) {
11 exit;
14 /**
15 * Value meaning:
16 * o array - select field, array contains allowed values
17 * o string - type override
19 * Use normal array, paths won't be expanded
21 $cfg_db = array();
23 $cfg_db['Servers'] = array(1 => array(
24 'port' => 'integer',
25 'connect_type' => array('tcp', 'socket'),
26 'extension' => array('mysql', 'mysqli'),
27 'auth_type' => array('config', 'http', 'signon', 'cookie'),
28 'AllowDeny' => array(
29 'order' => array('', 'deny,allow', 'allow,deny', 'explicit')),
30 'only_db' => 'array'));
31 $cfg_db['RecodingEngine'] = array('auto', 'iconv', 'recode', 'none');
32 $cfg_db['OBGzip'] = array('auto', true, false);
33 $cfg_db['MemoryLimit'] = 'short_string';
34 $cfg_db['ShowTooltipAliasTB'] = array('nested', true, false);
35 $cfg_db['DisplayDatabasesList'] = array('auto', true, false);
36 $cfg_db['LeftLogoLinkWindow'] = array('main', 'new');
37 $cfg_db['LeftDefaultTabTable'] = array(
38 'tbl_structure.php', // fields list
39 'tbl_sql.php', // SQL form
40 'tbl_select.php', // search page
41 'tbl_change.php', // insert row page
42 'sql.php'); // browse page
43 $cfg_db['LeftFrameDBSeparator'] = 'short_string';
44 $cfg_db['LeftFrameTableSeparator'] = 'short_string';
45 $cfg_db['NavigationBarIconic'] = array(true, false, 'both');
46 $cfg_db['Order'] = array('ASC', 'DESC', 'SMART');
47 $cfg_db['ProtectBinary'] = array(false, 'blob', 'all');
48 $cfg_db['DefaultDisplay'] = array('horizontal', 'vertical', 'horizontalflipped');
49 $cfg_db['CharEditing'] = array('input', 'textarea');
50 $cfg_db['PropertiesIconic'] = array(true, false, 'both');
51 $cfg_db['DefaultTabServer'] = array(
52 'main.php', // the welcome page (recommended for multiuser setups)
53 'server_databases.php', // list of databases
54 'server_status.php', // runtime information
55 'server_variables.php', // MySQL server variables
56 'server_privileges.php', // user management
57 'server_processlist.php'); // process list
58 $cfg_db['DefaultTabDatabase'] = array(
59 'db_structure.php', // tables list
60 'db_sql.php', // SQL form
61 'db_search.php', // search query
62 'db_operations.php'); // operations on database
63 $cfg_db['DefaultTabTable'] = array(
64 'tbl_structure.php', // fields list
65 'tbl_sql.php', // SQL form
66 'tbl_select.php', // search page
67 'tbl_change.php', // insert row page
68 'sql.php'); // browse page
69 $cfg_db['QueryWindowDefTab'] = array(
70 'sql', // SQL
71 'files', // Import files
72 'history', // SQL history
73 'full'); // All (SQL and SQL history)
74 $cfg_db['InitialSlidersState'] = array('open', 'closed');
75 $cfg_db['Import']['format'] = array(
76 'csv', // CSV
77 'docsql', // DocSQL
78 'ldi', // CSV using LOAD DATA
79 'sql'); // SQL
80 $cfg_db['Import']['charset'] = array_merge(array(''), $GLOBALS['cfg']['AvailableCharsets']);
81 $cfg_db['Import']['sql_compatibility'] = $cfg_db['Export']['sql_compatibility'] = array(
82 'NONE', 'ANSI', 'DB2', 'MAXDB', 'MYSQL323', 'MYSQL40', 'MSSQL', 'ORACLE',
83 // removed; in MySQL 5.0.33, this produces exports that
84 // can't be read by POSTGRESQL (see our bug #1596328)
85 //'POSTGRESQL',
86 'TRADITIONAL');
87 $cfg_db['Import']['csv_terminated'] = 'short_string';
88 $cfg_db['Import']['csv_enclosed'] = 'short_string';
89 $cfg_db['Import']['csv_escaped'] = 'short_string';
90 $cfg_db['Import']['ldi_terminated'] = 'short_string';
91 $cfg_db['Import']['ldi_enclosed'] = 'short_string';
92 $cfg_db['Import']['ldi_escaped'] = 'short_string';
93 $cfg_db['Import']['ldi_local_option'] = array('auto', true, false);
94 $cfg_db['Export']['_sod_select'] = array(
95 'structure' => __('structure'),
96 'data' => __('data'),
97 'structure_and_data' => __('structure and data'));
98 $cfg_db['Export']['method'] = array(
99 'quick' => __('Quick - display only the minimal options to configure'),
100 'custom' => __('Custom - display all possible options to configure'),
101 'custom-no-form' => __('Custom - like above, but without the quick/custom choice'));
102 $cfg_db['Export']['format'] = array('codegen', 'csv', 'excel', 'htmlexcel',
103 'htmlword', 'latex', 'ods', 'odt', 'pdf', 'sql', 'texytext', 'xls', 'xml',
104 'yaml');
105 $cfg_db['Export']['compression'] = array('none', 'zip', 'gzip', 'bzip2');
106 $cfg_db['Export']['charset'] = array_merge(array(''), $GLOBALS['cfg']['AvailableCharsets']);
107 $cfg_db['Export']['codegen_format'] = array('#', 'NHibernate C# DO', 'NHibernate XML');
108 $cfg_db['Export']['csv_separator'] = 'short_string';
109 $cfg_db['Export']['csv_terminated'] = 'short_string';
110 $cfg_db['Export']['csv_enclosed'] = 'short_string';
111 $cfg_db['Export']['csv_escaped'] = 'short_string';
112 $cfg_db['Export']['csv_null'] = 'short_string';
113 $cfg_db['Export']['excel_null'] = 'short_string';
114 $cfg_db['Export']['excel_edition'] = array('win' => 'Windows',
115 'mac_excel2003' => 'Excel 2003 / Macintosh', 'mac_excel2008' => 'Excel 2008 / Macintosh');
116 $cfg_db['Export']['sql_structure_or_data'] = $cfg_db['Export']['_sod_select'];
117 $cfg_db['Export']['sql_type'] = array('INSERT', 'UPDATE', 'REPLACE');
118 $cfg_db['Export']['sql_insert_syntax'] = array(
119 'complete' => __('complete inserts'),
120 'extended' => __('extended inserts'),
121 'both' => __('both of the above'),
122 'none' => __('neither of the above'));
123 $cfg_db['Export']['xls_null'] = 'short_string';
124 $cfg_db['Export']['xlsx_null'] = 'short_string';
125 $cfg_db['Export']['htmlword_structure_or_data'] = $cfg_db['Export']['_sod_select'];
126 $cfg_db['Export']['htmlword_null'] = 'short_string';
127 $cfg_db['Export']['ods_null'] = 'short_string';
128 $cfg_db['Export']['odt_null'] = 'short_string';
129 $cfg_db['Export']['odt_structure_or_data'] = $cfg_db['Export']['_sod_select'];
130 $cfg_db['Export']['texytext_structure_or_data'] = $cfg_db['Export']['_sod_select'];
131 $cfg_db['Export']['texytext_null'] = 'short_string';
134 * Default values overrides
135 * Use only full paths
137 $cfg_db['_overrides'] = array();
138 $cfg_db['_overrides']['Servers/1/extension'] = extension_loaded('mysqli')
139 ? 'mysqli' : 'mysql';
142 * Basic validator assignments (functions from libraries/config/validate.lib.php and 'validators'
143 * object in js/config.js)
144 * Use only full paths and form ids
146 $cfg_db['_validators'] = array(
147 'CharTextareaCols' => 'validate_positive_number',
148 'CharTextareaRows' => 'validate_positive_number',
149 'DefaultPropDisplay' => array(array('validate_by_regex', '/^(?:horizontal|vertical|\d+)$/')),
150 'ExecTimeLimit' => 'validate_non_negative_number',
151 'Export/sql_max_query_size' => 'validate_positive_number',
152 'ForeignKeyMaxLimit' => 'validate_positive_number',
153 'Import/csv_enclosed' => array(array('validate_by_regex', '/^.?$/')),
154 'Import/csv_escaped' => array(array('validate_by_regex', '/^.$/')),
155 'Import/csv_terminated' => array(array('validate_by_regex', '/^.$/')),
156 'Import/ldi_enclosed' => array(array('validate_by_regex', '/^.?$/')),
157 'Import/ldi_escaped' => array(array('validate_by_regex', '/^.$/')),
158 'Import/ldi_terminated' => array(array('validate_by_regex', '/^.$/')),
159 'Import/skip_queries' => 'validate_non_negative_number',
160 'InsertRows' => 'validate_positive_number',
161 'LeftFrameTableLevel' => 'validate_positive_number',
162 'LimitChars' => 'validate_positive_number',
163 'LoginCookieValidity' => 'validate_positive_number',
164 'LoginCookieStore' => 'validate_non_negative_number',
165 'MaxDbList' => 'validate_positive_number',
166 'MaxCharactersInDisplayedSQL' => 'validate_positive_number',
167 'MaxRows' => 'validate_positive_number',
168 'MaxTableList' => 'validate_positive_number',
169 'MemoryLimit' => array(array('validate_by_regex', '/^\d+(?:[kmg])?$/i')),
170 'QueryHistoryMax' => 'validate_positive_number',
171 'QueryWindowWidth' => 'validate_positive_number',
172 'QueryWindowHeight' => 'validate_positive_number',
173 'RepeatCells' => 'validate_non_negative_number',
174 'Server' => 'validate_server',
175 'Server_pmadb' => 'validate_pmadb',
176 'Servers/1/port' => 'validate_port_number',
177 'Servers/1/hide_db' => 'validate_regex',
178 'TextareaCols' => 'validate_positive_number',
179 'TextareaRows' => 'validate_positive_number',
180 'TrustedProxies' => 'validate_trusted_proxies');
183 * Additional validators used for user preferences
185 $cfg_db['_userValidators'] = array(
186 'MaxDbList' => array(array('validate_upper_bound', 'value:MaxDbList')),
187 'MaxTableList' => array(array('validate_upper_bound', 'value:MaxTableList')),
188 'QueryHistoryMax' => array(array('validate_upper_bound', 'value:QueryHistoryMax')),);