added files for database format-upgrade
[core.git] / inc / config.php
1 <?php
2 /**
3  * General configuration. Do not touch this file! If you need different settings
4  * create a config-local.php in this directory at and set your changed
5  * configuration entries there.
6  *
7  * @author              Roland Haeder <webmaster@shipsimu.org>
8  * @version             0.0.0
9  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2016 Core Developer Team
10  * @license             GNU GPL 3.0 or any newer version
11  * @link                http://www.shipsimu.org
12  *
13  * This program is free software: you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation, either version 3 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program. If not, see <http://www.gnu.org/licenses/>.
25  */
26
27 // Load very basic classes, required to bootstrap
28 require(ApplicationEntryPoint::detectCorePath() . '/inc/main/interfaces/class_FrameworkInterface.php');
29 require(ApplicationEntryPoint::detectCorePath() . '/inc/main/interfaces/registry/class_Registerable.php');
30 require(ApplicationEntryPoint::detectCorePath() . '/inc/config/class_FrameworkConfiguration.php');
31
32 // Get a new configuration instance
33 $cfg = FrameworkConfiguration::getSelfInstance();
34
35 // CFG: SERVER-PATH
36 $cfg->setConfigEntry('base_path', ApplicationEntryPoint::detectCorePath() . '/');
37
38 // CFG: BASE-URL
39 $cfg->setConfigEntry('base_url', $cfg->detectBaseUrl());
40
41 // CFG: DATABASE-TYPE
42 $cfg->setConfigEntry('db_type', 'local');
43
44 // CFG: LOCAL-DB-PATH
45 $cfg->setConfigEntry('local_db_path', $cfg->getConfigEntry('base_path') . 'db/');
46
47 // CFG: TIME-ZONE
48 $cfg->setDefaultTimezone('Europe/Berlin');
49
50 // CFG: MAGIC-QUOTES-RUNTIME
51 $cfg->setMagicQuotesRuntime(FALSE);
52
53 // CFG: CLASS-PREFIX
54 $cfg->setConfigEntry('class_prefix', 'class_');
55
56 // CFG: CLASS-SUFFIX
57 $cfg->setConfigEntry('class_suffix', '.php');
58
59 // CFG: RAW-TEMPLATE-EXTENSION
60 $cfg->setConfigEntry('raw_template_extension', '.tpl');
61
62 // CFG: CODE-TEMPLATE-EXTENSION
63 $cfg->setConfigEntry('code_template_extension', '.ctp');
64
65 // CFG: SELECTOR-PATH
66 $cfg->setConfigEntry('selector_path', 'selector');
67
68 // CFG: APPLICATION-HELPER-CLASS
69 $cfg->setConfigEntry('app_helper_class', 'ApplicationHelper');
70
71 // CFG: LAUNCH-METHOD
72 $cfg->setConfigEntry('entry_method', 'entryPoint');
73
74 // CFG: TEMPLATE-BASE-PATH
75 $cfg->setConfigEntry('tpl_base_path', 'templates/');
76
77 // CFG: LANGUAGE-BASE-PATH
78 $cfg->setConfigEntry('lang_base_path', 'inc/language/');
79
80 // CFG: COMPRESSOR-BASE-PATH
81 $cfg->setConfigEntry('compressor_base_path', 'inc/main/classes/compressor/');
82
83 // CFG: APPLICATION-BASE-PATH
84 $cfg->setConfigEntry('application_base_path', 'application/');
85
86 // CFG: APPLICATION-PATH
87 $cfg->setConfigEntry('application_path', $cfg->getConfigEntry('base_path') . $cfg->getConfigEntry('application_base_path'));
88
89 // CFG: COMPILE-OUTPUT-PATH
90 $cfg->setConfigEntry('compile_output_path', 'templates/_compiled/');
91
92 // CFG: HTML-TEMPLATE-CLASS
93 $cfg->setConfigEntry('html_template_class', 'HtmlTemplateEngine');
94
95 // CFG: DECO-XML-REWRITER-TEMPLATE-CLASS
96 $cfg->setConfigEntry('deco_xml_rewriter_template_class', 'XmlRewriterTemplateDecorator');
97
98 // CFG: DEBUG-HTML-CLASS
99 $cfg->setConfigEntry('debug_html_class', 'DebugWebOutput');
100
101 // CFG: DEBUG-CONSOLE-CLASS
102 $cfg->setConfigEntry('debug_console_class', 'DebugConsoleOutput');
103
104 // CFG: DEFAULT-LANGUAGE
105 $cfg->setConfigEntry('default_lang', 'de'); // A two-char language string: de for german, en for english and so on
106
107 // CFG: HTML-TEMPLATE-TYPE
108 $cfg->setConfigEntry('html_template_type', 'html');
109
110 // CFG: EMAIL-TEMPLATE-TYPE
111 $cfg->setConfigEntry('email_template_type', 'emails');
112
113 // CFG: CODE-HTML-TEMPLATE-TYPE
114 $cfg->setConfigEntry('code_html_template_type', 'code');
115
116 // CFG: CODE-CONSOLE-TEMPLATE-TYPE
117 $cfg->setConfigEntry('code_console_template_type', 'xml');
118
119 // CFG: IMAGE-TEMPLATE-TYPE
120 $cfg->setConfigEntry('image_template_type', 'image');
121
122 // CFG: MENU-TEMPLATE-TYPE
123 $cfg->setConfigEntry('menu_template_type', 'menu');
124
125 // CFG: OUTPUT-CLASS
126 $cfg->setConfigEntry('output_class', 'WebOutput');
127
128 // CFG: LANGUAGE-SYSTEM-CLASS
129 $cfg->setConfigEntry('language_system_class', 'LanguageSystem');
130
131 // CFG: SELECTOR-TEMPLATE-PREFIX
132 $cfg->setConfigEntry('tpl_selector_prefix', 'selector');
133
134 // CFG: WEB-CONTENT-TYPE
135 $cfg->setConfigEntry('web_content_type', 'text/html');
136
137 // CFG: VALID-TEMPLATE-VARIABLE
138 $cfg->setConfigEntry('tpl_valid_var', 'content');
139
140 // CFG: META-AUTHOR
141 $cfg->setConfigEntry('meta_author', 'Your-name-here');
142
143 // CFG: META-PUBLISHER
144 $cfg->setConfigEntry('meta_publisher', 'Your-name-here');
145
146 // CFG: META-KEYWORDS
147 $cfg->setConfigEntry('meta_keywords', 'test,test,test');
148
149 // CFG: META-DESCRIPTION
150 $cfg->setConfigEntry('meta_description', 'A description for your website');
151
152 // CFG: SELECTOR-MAIN-TEMPLATE
153 $cfg->setConfigEntry('selector_main_tpl', 'selector_main');
154
155 // CFG: SELECTOR-APPS-TEMPLATE
156 $cfg->setConfigEntry('selector_apps_tpl', 'selector_apps');
157
158 // CFG: SELECTOR-NAME
159 $cfg->setConfigEntry('selector_name', 'selector');
160
161 // CFG: DEFAULT-APPLICATION
162 $cfg->setConfigEntry('default_application', 'selector');
163
164 // CFG: VERBOSE-LEVEL
165 $cfg->setConfigEntry('verbose_level', 0);
166
167 // CFG: CACHE-CLASS
168 $cfg->setConfigEntry('cache_class', 'MemoryCache');
169
170 // CFG: SEARCH-CRITERIA-CLASS
171 $cfg->setConfigEntry('search_criteria_class', 'SearchCriteria');
172
173 // CFG: DATASET-CRITERIA-CLASS
174 $cfg->setConfigEntry('dataset_criteria_class', 'DataSetCriteria');
175
176 // CFG: UPDATE-CRITERIA-CLASS
177 $cfg->setConfigEntry('update_criteria_class', 'UpdateCriteria');
178
179 // CFG: FILE-IO-CLASS
180 $cfg->setConfigEntry('file_io_class', 'FileIoHandler');
181
182 // CFG: DATABASE-RESULT-CLASS
183 $cfg->setConfigEntry('database_result_class', 'CachedDatabaseResult');
184
185 // CFG: FILTER-CHAIN-CLASS
186 $cfg->setConfigEntry('filter_chain_class', 'FilterChain');
187
188 // CFG: FILE-INPUT-CLASS
189 $cfg->setConfigEntry('file_input_class', 'FileIoStream');
190
191 // CFG: FILE-OUTPUT-CLASS
192 $cfg->setConfigEntry('file_output_class', 'FileIoStream');
193
194 // CFG: EMAIL-VALIDATOR-FILTER
195 $cfg->setConfigEntry('email_validator_filter', 'EmailValidatorFilter');
196
197 // CFG: USERNAME-VALIDATOR-FILTER
198 $cfg->setConfigEntry('username_validator_filter', 'UserNameValidatorFilter');
199
200 // CFG: USERNAME-IS-GUEST-FILTER
201 $cfg->setConfigEntry('username_is_guest_filter', 'UserNameIsGuestFilter');
202
203 // CFG: PASSWORD-VALIDATOR-FILTER
204 $cfg->setConfigEntry('password_validator_filter', 'PasswordValidatorFilter');
205
206 // CFG: RULES-ACCEPTED-FILTER
207 $cfg->setConfigEntry('rules_accepted_filter', 'RulesAcceptedFilter');
208
209 // CFG: USERNAME-VERIFIER-FILTER
210 $cfg->setConfigEntry('username_verifier_filter', 'UserNameVerifierFilter');
211
212 // CFG: USER-GUEST-VERIFIER-FILTER
213 $cfg->setConfigEntry('user_guest_verifier_filter', 'UserGuestVerifierFilter');
214
215 // CFG: EMAIL-VERIFIER-FILTER
216 $cfg->setConfigEntry('email_verifier_filter', 'EmailVerifierFilter');
217
218 // CFG: PASSWORD-VERIFIER-FILTER
219 $cfg->setConfigEntry('password_verifier_filter', 'PasswordVerifierFilter');
220
221 // CFG: PASSWD-GUEST-VERIFIER-FILTER
222 $cfg->setConfigEntry('passwd_guest_verifier_filter', 'PasswordGuestVerifierFilter');
223
224 // CFG: EMAIL-CHANGE-FILTER
225 $cfg->setConfigEntry('email_change_filter', 'EmailChangeFilter');
226
227 // CFG: PASSWORD-CHANGE-FILTER
228 $cfg->setConfigEntry('password_change_filter', 'PasswordChangeFilter');
229
230 // CFG: ACCOUNT-PASSWORD-FILTER
231 $cfg->setConfigEntry('account_password_filter', 'AccountPasswordVerifierFilter');
232
233 // CFG: USER-STATUS-FILTER
234 $cfg->setConfigEntry('user_status_filter', 'UserStatusVerifierFilter');
235
236 // CFG: USER-UNCONFIRMED-FILTER
237 $cfg->setConfigEntry('user_unconfirmed_filter', 'UserUnconfirmedVerifierFilter');
238
239 // CFG: CRYPTO-CLASS
240 $cfg->setConfigEntry('crypto_class', 'CryptoHelper');
241
242 // CFG: RNG-CLASS
243 $cfg->setConfigEntry('rng_class', 'RandomNumberGenerator');
244
245 // CFG: USER-DB-WRAPPER-CLASS
246 $cfg->setConfigEntry('user_db_wrapper_class', 'UserDatabaseWrapper');
247
248 // CFG: NEWS-DB-WRAPPER-CLASS
249 $cfg->setConfigEntry('news_db_wrapper_class', 'NewsDatabaseWrapper');
250
251 // CFG: HTML-CMD-RESOLVER-CLASS
252 $cfg->setConfigEntry('html_cmd_resolver_class', 'HtmlCommandResolver');
253
254 // CFG: HTML-CMD-LOGIN-RESOLVER-CLASS
255 $cfg->setConfigEntry('html_cmd_login_resolver_class', 'HtmlCommandResolver');
256
257 // CFG: IMAGE-CMD-RESOLVER-CLASS
258 $cfg->setConfigEntry('image_cmd_resolver_class', 'ImageCommandResolver');
259
260 // CFG: IMAGE-CMD-CODE-CAPTCHA-RESOLVER-CLASS
261 $cfg->setConfigEntry('image_cmd_code_captcha_resolver_class', 'ImageCommandResolver');
262
263 // CFG: MAILER-CLASS
264 $cfg->setConfigEntry('mailer_class', 'DebugMailer');
265
266 // CFG: XML-PARSER-CLASS
267 $cfg->setConfigEntry('xml_parser_class', 'XmlParser');
268
269 // CFG: DECO-COMPACTING-XML-PARSER-CLASS
270 $cfg->setConfigEntry('deco_compacting_xml_parser_class', 'XmlCompactorDecorator');
271
272 // CFG: MATH-PRIME
273 $cfg->setConfigEntry('math_prime', 591623);
274
275 // CFG: DATE-KEY
276 $cfg->setConfigEntry('date_key', date('d-m-Y (l-F-T)', time()));
277
278 // CFG: SALT-LENGTH
279 $cfg->setConfigEntry('salt_length', 10);
280
281 // CFG: RND-STR-LENGTH
282 $cfg->setConfigEntry('rnd_str_length', 128);
283
284 // CFG: HASH-EXTRA-MASK
285 $cfg->setConfigEntry('hash_extra_mask', "%1s:%2s:%3s"); // 1=salt, 2=extra salt, 3=plain password/string
286
287 // CFG: HASH-NORMAL-MASK
288 $cfg->setConfigEntry('hash_normal_mask', "%1s:%2s"); // 1=salt, 2=plain password/string
289
290 // CFG: IS-SINGLE-SERVER
291 $cfg->setConfigEntry('is_single_server', 'Y');
292
293 // CFG: POST-REGISTRATION-CLASS
294 $cfg->setConfigEntry('post_registration_class', 'LoginAfterRegistrationAction');
295
296 // CFG: USER-CLASS
297 $cfg->setConfigEntry('user_class', 'Member');
298
299 // CFG: GUEST-CLASS
300 $cfg->setConfigEntry('guest_class', 'Guest');
301
302 // CFG: COOKIE-EXPIRE
303 $cfg->setConfigEntry('cookie_expire', (60*60*2)); // Two hours!
304
305 // CFG: COOKIE-PATH
306 $cfg->setConfigEntry('cookie_path', $cfg->detectScriptPath() . '/');
307
308 // CFG: COOKIE-DOMAIN
309 $cfg->setConfigEntry('cookie_domain', $cfg->detectDomain()); // Is mostly the same...
310
311 // CFG: COOKIE-SSL
312 $cfg->setConfigEntry('cookie_ssl', $cfg->isHttpSecured());
313
314 // CFG: CRYPT-FIXED-SALT
315 $cfg->setConfigEntry('crypt_fixed_salt', 'N');
316
317 // CFG: DB-UPDATE-PRIMARY-FORCED
318 $cfg->setConfigEntry('db_update_primary_forced', 'Y');
319
320 // CFG: GERMAN-DATE-TIME
321 $cfg->setConfigEntry('german_date_time', "%3\$s.%2\$s.%1\$s, %4\$s:%5\$s:%6\$s");
322
323 // CFG: PRODUCT-INSTALL-MODE
324 $cfg->setConfigEntry('product_install_mode', 'debug');
325
326 // CFG: DECIMALS
327 $cfg->setConfigEntry('decimals', 3);
328
329 // CFG: MENU-STACKER-CLASS
330 $cfg->setConfigEntry('menu_stacker_class', 'FiLoStacker');
331
332 // CFG: STACKER-GENERIC-MAX-SIZE
333 $cfg->setConfigEntry('stacker_generic_max_size', 100);
334
335 // CFG: STACKER-CURRENT-NODE-MAX-SIZE
336 $cfg->setConfigEntry('stacker_current_node_max_size', 20);
337
338 // CFG: LOCAL-FILE-DATABASE-CLASS
339 $cfg->setConfigEntry('local_file_database_class', 'CachedLocalFileDatabase');
340
341 // CFG: COMPRESSOR-CHANNEL-CLASS
342 $cfg->setConfigEntry('compressor_channel_class', 'CompressorChannel');
343
344 // CFG: DEBUG-HTML-OUTPUT-TIMINGS
345 $cfg->setConfigEntry('debug_html_output_timings', 'N');
346
347 // CFG: DEBUG-CONSOLE-OUTPUT-TIMINGS
348 $cfg->setConfigEntry('debug_console_output_timings', 'Y');
349
350 // CFG: PROXY-HOST
351 $cfg->setConfigEntry('proxy_host', '');
352
353 // CFG: PROXY-PORT
354 $cfg->setConfigEntry('proxy_port', '');
355
356 // CFG: PROXY-USERNAME
357 $cfg->setConfigEntry('proxy_username', '');
358
359 // CFG: PROXY-PASSWORD
360 $cfg->setConfigEntry('proxy_password', '');
361
362 // CFG: PROXY-CONNECT-METHOD
363 $cfg->setConfigEntry('proxy_connect_method', 'Y');
364
365 // CFG: HOSTNAME-FILE
366 $cfg->setConfigEntry('hostname_file', '/etc/hostname');
367
368 // CFG: DATABASE-CACHE-ENABLED
369 $cfg->setConfigEntry('database_cache_enabled', FALSE);
370
371 // CFG: DIRECTORY-CLASS
372 $cfg->setConfigEntry('directory_class', 'FrameworkDirectoryPointer');
373
374 // CFG: FILE-RAW-INPUT-CLASS
375 $cfg->setConfigEntry('file_raw_input_class', 'FrameworkRawFileInputPointer');
376
377 // CFG: FILE-RAW-OUTPUT-CLASS
378 $cfg->setConfigEntry('file_raw_output_class', 'FrameworkRawFileOutputPointer');
379
380 // CFG: FILE-RAW-INPUT-OUTPUT-CLASS
381 $cfg->setConfigEntry('file_raw_input_output_class', 'FrameworkFileInputOutputPointer');
382
383 // CFG: TEXT-FILE-INPUT-CLASS
384 $cfg->setConfigEntry('text_file_input_class', 'FrameworkTextFileInputPointer');
385
386 // CFG: CSV-INPUT-FILE-CLASS
387 $cfg->setConfigEntry('csv_input_file_class', 'CsvInputFile');
388
389 // CFG: FILE-ITERATOR-CLASS
390 $cfg->setConfigEntry('file_iterator_class', 'FileIterator');
391
392 // CFG: FILE-STACK-PRE-ALLOCATE-ENABLED
393 $cfg->setConfigEntry('file_stack_pre_allocate_enabled', 'Y');
394
395 // CFG: FILE-STACK-PRE-ALLOCATE-COUNT
396 $cfg->setConfigEntry('file_stack_pre_allocate_count', 10000);
397
398 // CFG: INDEX-INDEX-CLASS
399 $cfg->setConfigEntry('file_stack_index_class', 'FileStackIndex');
400
401 // CFG: INDEX-PRE-ALLOCATE-ENABLED
402 $cfg->setConfigEntry('index_pre_allocate_enabled', 'Y');
403
404 // CFG: INDEX-PRE-ALLOCATE-COUNT
405 $cfg->setConfigEntry('index_pre_allocate_count', 10000);
406
407 // CFG: STACK-FILE-CLASS
408 $cfg->setConfigEntry('stack_file_class', 'StackFile');
409
410 // CFG: INDEX-FILE-CLASS
411 $cfg->setConfigEntry('index_file_class', 'IndexFile');
412
413 // CFG: TASK-HANDLER-CLASS
414 $cfg->setConfigEntry('task_handler_class', 'TaskHandler');
415
416 // CFG: TASK-LIST-CLASS
417 $cfg->setConfigEntry('task_list_class', 'TaskList');
418
419 // CFG: LIST-GROUP-CLASS
420 $cfg->setConfigEntry('list_group_class', 'ListGroupList');
421
422 // CFG: DEFAULT-ITERATOR-CLASS
423 $cfg->setConfigEntry('default_iterator_class', 'DefaultIterator');
424
425 // CFG: ACTIVE-TASK-VISITOR-CLASS
426 $cfg->setConfigEntry('active_task_visitor_class', 'ActiveTaskVisitor');
427
428 // CFG: IDLE-TASK-CLASS
429 $cfg->setConfigEntry('idle_task_class', 'IdleLoopTask');
430
431 // CFG: TASK-IDLE-LOOP-STARTUP-DELAY
432 $cfg->setConfigEntry('task_idle_loop_startup_delay', 0);
433
434 // CFG: TASK-IDLE-LOOP-INTERVAL-DELAY
435 $cfg->setConfigEntry('task_idle_loop_interval_delay', 0);
436
437 // CFG: TASK-IDLE-LOOP-MAX-RUNS
438 $cfg->setConfigEntry('task_idle_loop_max_runs', 0);
439
440 // CFG: IDLE-LOOP-TIME (5 milli seconds)
441 $cfg->setConfigEntry('idle_loop_time', 5);
442
443 // CFG: SHUTDOWN-TASK-VISITOR-CLASS
444 $cfg->setConfigEntry('shutdown_task_visitor_class', 'ShutdownTaskVisitor');
445
446 // CFG: DEFAULT-IMAGE-COMMAND
447 $cfg->setConfigEntry('default_image_command', 'build');
448
449 // CFG: DEFAULT-IMAGE-CONTROLLER
450 $cfg->setConfigEntry('default_image_controller', 'build');
451
452 // CFG: MENU-TEMPLATE-CLASS
453 $cfg->setConfigEntry('menu_template_class', 'MenuTemplateEngine');
454
455 // CFG: MENU-TEMPLATE-EXTENSION
456 $cfg->setConfigEntry('menu_template_extension', '.xml');
457
458 // CFG: FEATURE-FUSE-CLASS
459 $cfg->setConfigEntry('feature_fuse_class', 'FuseFeature');
460
461 // CFG: TEMP-FILE-PATH
462 $cfg->setConfigEntry('temp_file_path', sys_get_temp_dir());
463
464 // CFG: IPC-SOCKET-FILE-NAME
465 $cfg->setConfigEntry('ipc_socket_file_name', 'php_ipc_socket');
466
467 // CFG: EXTENSION-SCRYPT-LOADED (By default scrypt is assumed absent and later tested being there)
468 $cfg->setConfigEntry('extension_scrypt_loaded', FALSE);
469
470 // CFG: EXTENSION-UUID-LOADED (By default uuid is assumed absent and later tested being there)
471 $cfg->setConfigEntry('extension_uuid_loaded', FALSE);