· 9 years ago · May 31, 2017, 08:28 PM
1<?php
2/**
3 * TestLink Open Source Project - http://testlink.sourceforge.net/
4 * This script is distributed under the GNU General Public License 2 or later.
5 *
6 * Constants and configuration parameters used throughout TestLink
7 *
8 * There are included extra files:
9 * - your customized settings - custom_config.inc.php
10 * - DB access - config_db.inc.php
11 * - constants - const.inc.php
12 * - basic checking - configCheck.php
13 *
14 * IMPORTANT:
15 * To adapt values to your needs DO NOT EDIT THIS FILE but use custom_config.inc.php and
16 * replace values of TestLink configuration variables.
17 * It saves your changes for the next upgrade in one extra file.
18 *
19 * @filesource config.inc.php
20 * @package TestLink
21 * @copyright 2005-2011, TestLink community
22 * @link http://www.teamst.org/index.php
23 *
24 * @internal revisions
25 * 20110530 - Julian - allow to define seperate logo for generated documents including height
26 * 20110414 - franciscom - moved $g_prefix_name_for_copy BEFORE use of custom config
27 * 20110409 - franciscom - BUGID 4368: Provide WYSIWYG Editor for platform notes
28 * $tlCfg->platform_template
29 * 20110319 - franciscom - BUGID 4322: New Option to block delete of executed test cases.
30 * testcase_cfg->can_delete_executed
31 * 20110109 - franciscom - added $tlCfg->req_cfg->duplicated_name_algorithm
32 * $tlCfg->req_cfg->duplicated_docid_algorithm
33 *
34 * 20110103 - franciscom - BUGID 4131: PHPMAILER - upgrade config options to use SSL or TLS - allows use gmail
35 * 20101212 - franciscom - req_cfg->log_message_len
36 * 20101118 - asimon - BUGID 4031: added $tlCfg->req_cfg->copy_req_scope_to_tc_summary
37 * 20101109 - asimon - added $tlCfg->custom_fields->show_custom_fields_without_value
38 * 20101030 - franciscom - bullet image config removed
39 * 20101028 - Julian - BUGID 3950 - added $tlCfg->gui->dynamic_quick_tcase_search_input_size
40 * 20101014 - Julian - BUGID 3893 - added $tlCfg->metrics_dashboard->show_test_plan_status
41 * 20101010 - franciscom - BUGID 3872 - Admin should be able to set a new password for users - $tlCfg->password_reset_send_method
42 * 20100924 - asimon - added $tlCfg->enableTableExportButton
43 * 20100915 - amitkhullar - BUGID 3639 - added $tlcfg->testcase_reorder_by for Reorder Test Cases
44 * 20100915 - Julian - BUGID 3777 - added $tlCfg->req_cfg->allow_insertion_of_last_doc_id
45 * 20100901 - asimon - re-enabled filter for assigned user when assigning testcases
46 * 20100814 - franciscom - BUGID 3681 - new BTS youtrack (www.jetbrains.com)
47 * 20100810 - asimon - BUGID 3317 - added $tlCfg->req_cfg->external_req_management
48 * 20100810 - asimon - added TC ID filter for Test Cases to $tlCfg->tree_filter_cfg
49 * 20100809 - asimon - BUGID 3662 - disabled advanced filter mode choice for TC editing mode
50 * 20100808 - asimon - added requirement filtering options to $tlCfg->tree_filter_cfg
51 * 20100625 - asimon - added $tlCfg->tree_filter_cfg for configuration of available filters on JS tree
52 * and $tlCfg->exec_cfg->testcases_colouring_by_selected_build for BUGID 3450
53 * 20100620 - franciscom - fix strict messages after usign PHPDesigner.
54 * 20100619 - franciscom - define always $g_bugInterfaceOn = false,$g_bugInterface = null;
55 * 20100617 - franciscom - $tlCfg->req_cfg->importDocBook - new configuration for importing req in docbook format
56 * 20100616 - eloff - BUGID 3255 - Cleaned up bts configuration
57 * 20100527 - Julian - added $tlCfg->exec_cfg->expand_collapse->platform_description
58 * 20100504 - franciscom - BUGID 3424 Custom CSS path is being overwritten by config.inc.php value
59 * 20100311 - asimon - BUGID 1748 - $tlCfg->req_cfg->relations
60 * 20100313 - franciscom - BUGID 0003275
61 * 20100112 - asimon - BUGID 2976 - $tlCfg->req_cfg->search
62 * 20100110 - eloff - BUGID 2036 - changed $tlCfg->gui->checkNotSaved to true
63 * 20100106 - franciscom - added $tlCfg->diffEngine - diff for test case and req (Contribution)
64 * 20091227 - franciscom - REMOVED - $tlCfg->req_cfg->reqdoc_id->is_system_wide
65 * 20091217 - franciscom - $tlCfg->testcase_cfg->duplicated_name_algorithm
66 * 20091205 - franciscom - BUGID 0002469: $tlCfg->exec_cfg->expand_collapse
67 * 20091129 - franciscom - BUGID 2554 - gui->usersAssignGlobalRoleColoring
68 * 20091126 - franciscom - added contribution req internal links
69 * 20091125 - franciscom - req_cfg->expected_coverage_management added
70 * 20091121 - franciscom - added contribution by Julian - BUGID 0002968,0002961,0002962,0002963
71 * (refactored)
72 *
73 * 20091018 - franciscom - added contribution LDAP with TLS
74 * 20090926 - franciscom - new default for $tlCfg->req_cfg->child_requirements_mgmt
75 * 20090912 - franciscom - BUGID 2796 - contribution reportsCfg->start_time
76 * 20090901 - franciscom - new option exec_cfg->steps_results_layout
77 * 20090823 - franciscom - new option custom_field_max_length
78 * 20090815 - franciscom - new option exec_cfg->show_history_all_platforms
79 * 20090804 - franciscom - moved report config here
80 * 20090304 - franciscom - BUGID 2171
81 * 20090211 - franciscom - added $tlCfg->exec_cfg->enable_tree_testcases_colouring
82 * $tlCfg->exec_cfg->enable_tree_counters_colouring
83 *
84 * 20090126 - franciscom - show_config_check_warning -> config_check_warning_mode
85 * 20090103 - franciscom - $tlCfg->req_cfg->coverageStatusAlgorithm
86 * 20090103 - franciscom - BUGID 651 - $tlCfg->testcase_cfg->can_remove_executed
87 * 20090101 - franciscom - changes in regex used to validate an email address
88 *
89 **/
90
91// ----------------------------------------------------------------------------
92/* [INITIALIZATION] - DO NOT CHANGE THE SECTION */
93
94/** @global array Global configuration class */
95$tlCfg = new stdClass();
96$tlCfg->api = new stdClass();
97$tlCfg->document_generator = new stdClass();
98
99$tlCfg->spec_cfg = new stdClass();
100
101$tlCfg->exec_cfg = new stdClass();
102$tlCfg->exec_cfg->view_mode = new stdClass();
103$tlCfg->exec_cfg->exec_mode = new stdClass();
104
105$tlCfg->gui = new stdClass();
106$tlCfg->gui->custom_fields = new stdClass();
107$tlCfg->testcase_cfg = new stdClass();
108$tlCfg->req_cfg = new stdClass();
109$tlCfg->validation_cfg = new stdClass();
110$tlCfg->custom_fields = new stdClass();
111$tlCfg->req_spec_cfg = new stdClass();
112$tlCfg->diffEngine = new stdClass();
113
114/** @uses database access definition (generated automatically by TL installer) */
115
116/** @uses database access definition (generated automatically by TL installer) */
117@include_once('config_db.inc.php');
118
119if( !defined('DB_TABLE_PREFIX') )
120{
121 define('DB_TABLE_PREFIX','' );
122}
123
124/** The root dir for the testlink installation with trailing slash */
125define('TL_ABS_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
126
127/** Include constants and magic numbers (users should not change it)*/
128require_once(TL_ABS_PATH . 'cfg' . DIRECTORY_SEPARATOR . 'const.inc.php');
129
130
131// ----------------------------------------------------------------------------
132/* [LOCALIZATION] */
133
134/** @var string Default localization for users */
135// The value must be available in $g_locales (see cfg/const.inc.php).
136// Note: An attempt will be done to establish the default locale
137// automatically using $_SERVER['HTTP_ACCEPT_LANGUAGE']
138$tlCfg->default_language = 'en_GB';
139
140/**
141 * @var string Charset 'UTF-8' is only officially supported charset (Require
142 * MySQL version >= 4.1) 'ISO-8859-1' or another Charset could be set for
143 * backward compatability by experienced users. However we have not resources
144 * to support such patches.
145 **/
146$tlCfg->charset = 'UTF-8';
147
148/**
149 * @var string characters used to surround a description in the user interface
150 * (for example role)
151 **/
152$tlCfg->gui_separator_open = '[';
153$tlCfg->gui_separator_close = ']';
154
155/** @var string Title separators are used when componing an title using several strings */
156$tlCfg->gui_title_separator_1 = ' : '; // object : name (Test Specification : My best product)
157$tlCfg->gui_title_separator_2 = ' - '; // parent - child
158
159/**
160 * @var string delimiter used to create DOC ID in this way:
161 * <test_project_Prefix> . g_testcase_cfg->glue_character . <doc_id>
162 * Could not be empty
163 */
164$tlCfg->testcase_cfg->glue_character = '-';
165
166/**
167 * fonts set used to draw charts
168 **/
169$tlCfg->charts_font_path = TL_ABS_PATH . "third_party/pchart/Fonts/tahoma.ttf";
170/**
171 * font size used to draw charts
172 **/
173$tlCfg->charts_font_size = 8;
174
175
176// ----------------------------------------------------------------------------
177/* [SERVER ENVIRONMENT] */
178
179/**
180 * @var integer Set the session timeout for inactivity [minutes].
181 * Default high value disables this feature.
182 */
183$tlCfg->sessionInactivityTimeout = 9900;
184
185/**
186 * Set the session timeout value (in minutes).
187 * This will prevent sessions timing out after very short periods of time
188 * Warning: your server could block this settings
189 **/
190//ini_set('session.cache_expire',900);
191
192/**
193 * Set the session garbage collection timeout value (in seconds)
194 * The default session garbage collection in php is set to 1440 seconds (24 minutes)
195 * If you want sessions to last longer this must be set to a higher value.
196 * You may need to set this in your global php.ini if the settings don't take effect.
197 */
198//ini_set('session.gc_maxlifetime', 54000);
199
200
201// ----------------------------------------------------------------------------
202/* [LOGGING] */
203
204/** Error reporting - do we want php errors to show up for users */
205error_reporting(E_ALL);
206
207/** @var string Default level of logging (NONE, ERROR, INFO, DEBUG, EXTENDED) */
208$tlCfg->log_level = 'ERROR';
209
210/** @var boolean show smarty debug window */
211$tlCfg->smarty_debug = false;
212
213/** @var string Path to store logs */
214$tlCfg->log_path = TL_ABS_PATH . 'logs' . DIRECTORY_SEPARATOR ;
215
216
217/**
218 * @var string How to warning user when security weak points exists.
219 *
220 * 'SCREEN': messages will displayed on login screen, and tl desktop (default)
221 * 'FILE': a file with a list is created but users are not notified via GUI
222 * user will receive a message on screen.
223 * 'SILENT': same that FILE, but user will not receive message on screen.
224 */
225$tlCfg->config_check_warning_mode = 'FILE';
226
227/**
228 * Configure if individual logging data stores are enabled of disabled
229 * Possibile values to identify loggers: 'db','file'
230 * $g_loggerCfg=null; all loggers enabled (default)
231 * $g_loggerCfg['db']['enable']=true/false;
232 * $g_loggerCfg['file']['enable']=true/false;
233 */
234$g_loggerCfg = null;
235
236/** @var integer All events older this value [days] are removed from the db, during login */
237$g_removeEventsOlderThan = 30;
238
239
240// ----------------------------------------------------------------------------
241/* [Bug Tracking systems] */
242/**
243 * TestLink collaborates with bug tracking systems to check if displayed bugs resolved,
244 * verified, and closed reports.
245 *<?php
246/**
247 * TestLink Open Source Project - http://testlink.sourceforge.net/
248 * This script is distributed under the GNU General Public License 2 or later.
249 *
250 * Constants and configuration parameters used throughout TestLink
251 *
252 * There are included extra files:
253 * - your customized settings - custom_config.inc.php
254 * - DB access - config_db.inc.php
255 * - constants - const.inc.php
256 * - basic checking - configCheck.php
257 *
258 * IMPORTANT:
259 * To adapt values to your needs DO NOT EDIT THIS FILE but use custom_config.inc.php and
260 * replace values of TestLink configuration variables.
261 * It saves your changes for the next upgrade in one extra file.
262 *
263 * @filesource config.inc.php
264 * @package TestLink
265 * @copyright 2005-2015, TestLink community
266 * @link http://www.testlink.org
267 *
268 * @internal revisions
269 * @since 1.9.13
270 *
271 *
272 **/
273
274// ----------------------------------------------------------------------------
275/* [INITIALIZATION] - DO NOT CHANGE THE SECTION */
276
277/** @global array Global configuration class */
278$tlCfg = new stdClass();
279$tlCfg->api = new stdClass();
280$tlCfg->document_generator = new stdClass();
281
282$tlCfg->spec_cfg = new stdClass();
283
284$tlCfg->exec_cfg = new stdClass();
285$tlCfg->exec_cfg->view_mode = new stdClass();
286$tlCfg->exec_cfg->exec_mode = new stdClass();
287
288// allow to define additional execution types other than
289// defined in testcase.class.php
290// array(code => lblkey)
291// code int value > latest standard execution code defined.
292// lblkey => key to be used on lang_get() call.
293//
294$tlCfg->custom_execution_types = null;
295
296$tlCfg->gui = new stdClass();
297$tlCfg->gui->custom_fields = new stdClass();
298$tlCfg->testcase_cfg = new stdClass();
299$tlCfg->req_cfg = new stdClass();
300$tlCfg->validation_cfg = new stdClass();
301$tlCfg->custom_fields = new stdClass();
302$tlCfg->req_spec_cfg = new stdClass();
303$tlCfg->diffEngine = new stdClass();
304$tlCfg->tplanDesign = new stdClass();
305
306$tlCfg->notifications = new stdClass();
307$tlCfg->proxy = new stdClass();
308
309
310
311/** @uses database access definition (generated automatically by TL installer) */
312@include_once('config_db.inc.php');
313if( !defined('DB_TABLE_PREFIX') )
314{
315 define('DB_TABLE_PREFIX','' );
316}
317
318/** The root dir for the testlink installation with trailing slash */
319define('TL_ABS_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
320
321/** Include constants and magic numbers (users should not change it)*/
322require_once(TL_ABS_PATH . 'cfg' . DIRECTORY_SEPARATOR . 'const.inc.php');
323
324
325// ----------------------------------------------------------------------------
326/** @var string used to have (when needed) a possibility to identify different TL instances
327 @since 1.9.4 used on mail subject when mail logger is used
328 */
329$tlCfg->instance_id = 'Main TestLink Instance';
330
331
332/**
333 * Copied from MantisBT
334 *
335 * Specifies the path under which a cookie is visible
336 * All scripts in this directory and its sub-directories will be able
337 * to access MantisBT cookies.
338 * It is recommended to set this to the actual MantisBT path.
339 * @link http://php.net/function.setcookie
340 * @global string $tlCfg->cookie_path
341 */
342 $tlCfg->cookie_path = '/';
343
344
345/* [LOCALIZATION] */
346
347/** @var string Default localization for users */
348// The value must be available in $$tlCfg->locales (see cfg/const.inc.php).
349// Note: An attempt will be done to establish the default locale
350// automatically using $_SERVER['HTTP_ACCEPT_LANGUAGE']
351$tlCfg->default_language = 'en_GB';
352
353/**
354 * @var string Charset 'UTF-8' is only officially supported charset (Require
355 * MySQL version >= 4.1) 'ISO-8859-1' or another Charset could be set for
356 * backward compatability by experienced users. However we have not resources
357 * to support such patches.
358 **/
359$tlCfg->charset = 'UTF-8';
360
361/**
362 * @var string characters used to surround a description in the user interface
363 * (for example role)
364 **/
365$tlCfg->gui_separator_open = '[';
366$tlCfg->gui_separator_close = ']';
367$tlCfg->gui_room = '[ %s ]';
368
369/** @var string Title separators are used when componing an title using several strings */
370$tlCfg->gui_title_separator_1 = ' : '; // object : name (Test Specification : My best product)
371$tlCfg->gui_title_separator_2 = ' - '; // parent - child
372
373/**
374 * @var string delimiter used to create DOC ID in this way:
375 * <test_project_Prefix> . g_testcase_cfg->glue_character . <doc_id>
376 * Could not be empty
377 */
378$tlCfg->testcase_cfg->glue_character = '-';
379
380/**
381 * fonts set used to draw charts
382 **/
383$tlCfg->charts_font_path = TL_ABS_PATH . "third_party/pchart/Fonts/tahoma.ttf";
384/**
385 * font size used to draw charts
386 **/
387$tlCfg->charts_font_size = 8;
388
389
390// ----------------------------------------------------------------------------
391/* [SERVER ENVIRONMENT] */
392
393
394/**
395 * TICKET 4969: Add Setting to Force HTTPS
396 */
397$tlCfg->force_https = false;
398
399
400/**
401 * @var integer Set the session timeout for inactivity [minutes].
402 * Default high value disables this feature.
403 */
404$tlCfg->sessionInactivityTimeout = 9900;
405
406/**
407 * Set the session timeout value (in minutes).
408 * This will prevent sessions timing out after very short periods of time
409 * Warning: your server could block this settings
410 **/
411ini_set('session.cache_expire',2900);
412
413/**
414 * Set the session garbage collection timeout value (in seconds)
415 * The default session garbage collection in php is set to 1440 seconds (24 minutes)
416 * If you want sessions to last longer this must be set to a higher value.
417 * You may need to set this in your global php.ini if the settings don't take effect.
418 */
419//ini_set('session.gc_maxlifetime', 54000);
420
421$tlCfg->notifications->userSignUp = new stdClass();
422$tlCfg->notifications->userSignUp->enabled = TRUE; // @see notifyGlobalAdmins()
423$tlCfg->notifications->userSignUp->to = new stdClass();
424$tlCfg->notifications->userSignUp->to->roles = array(TL_ROLES_ADMIN);
425$tlCfg->notifications->userSignUp->to->users = null; // i.e. array('login01','login02');
426
427// ----------------------------------------------------------------------------
428/* [LOGGING] */
429
430/** Error reporting - do we want php errors to show up for users */
431/** configure on custom_config.inc.php */
432/** error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_WARNING); */
433/** error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING); */
434error_reporting(E_ALL);
435
436/** @var string Default level of logging (NONE, ERROR, INFO, DEBUG, EXTENDED)
437 * is not used by tlLogger, we need to change this in future.
438 */
439$tlCfg->log_level = 'ERROR';
440
441/** @var boolean show smarty debug window */
442$tlCfg->smarty_debug = false;
443
444/**
445 * @var string Path to store logs -
446 * for security reasons (see http://itsecuritysolutions.org/2012-08-13-TestLink-1.9.3-multiple-vulnerabilities/)
447 * put it out of reach via web or configure access denied.
448 */
449$tlCfg->log_path = '/var/testlink/logs/'; /* unix example */
450
451
452/**
453 * @var string How to warning user when security weak points exists.
454 *
455 * 'SCREEN': messages will displayed on login screen, and tl desktop (default)
456 * 'FILE': a file with a list is created but users are not notified via GUI
457 * user will receive a message on screen.
458 * 'SILENT': same that FILE, but user will not receive message on screen.
459 */
460$tlCfg->config_check_warning_mode = 'FILE';
461
462/**
463 * ONCE_FOR_SESSION
464 * ALWAYS
465 */
466$tlCfg->config_check_warning_frequence = 'ONCE_FOR_SESSION';
467
468/**
469 *
470 */
471$tlCfg->userDocOnDesktop = OFF;
472
473
474/**
475 * Configure if individual logging data stores are enabled of disabled
476 * Possibile values to identify loggers: 'db','file'
477 * $g_loggerCfg=null; all loggers enabled
478 * $g_loggerCfg['db']['enable']=true/false;
479 * $g_loggerCfg['file']['enable']=true/false;
480 * $g_loggerCfg['mail']['enable']=true/false;
481 */
482$g_loggerCfg = array('mail' => array('enable' => false));
483
484/** @var integer All events older this value [days] are removed from the db, during login */
485$g_removeEventsOlderThan = 30;
486
487
488/** @var map keys: 'all' + values present on proprety of logger class $loggerTypeDomain
489 * values can be only these defined on logger.class.php
490 * @since 1.9.4
491 * example array('all' => array('INFO','AUDIT'),
492 * 'mail' => array('ERROR'))
493 *
494 * $tlCfg->loggerFilter = array('db' => array('DEBUG','AUDIT','WARNING','ERROR'),
495 * 'file' => array('NONE'));
496 *
497 */
498$tlCfg->loggerFilter = null; // default defined on logger.class.php ;
499
500// ----------------------------------------------------------------------------
501/* [SMTP] */
502
503/**
504 * @var string SMTP server name or IP address ("localhost" should work in the most cases)
505 * Configure using custom_config.inc.php
506 * @uses lib/functions/email_api.php
507 */
508$g_smtp_host = 'mail.stc'; # SMTP server MUST BE configured
509
510# Configure using custom_config.inc.php
511$g_tl_admin_email = 'dovlad@speechpro.com'; # for problem/error notification
512$g_from_email = 'testlink@mail.stc'; # email sender
513$g_return_path_email = 'dovlad@speechpro.com';
514
515/**
516 * Email notification priority (low by default)
517 * Urgent = 1, Not Urgent = 5, Disable = 0
518 **/
519$g_mail_priority = 5;
520
521/**
522 * Taken from mantis for phpmailer config
523 * select the method to mail by:
524 * PHPMAILER_METHOD_MAIL - mail()
525 * PHPMAILER_METHOD_SENDMAIL - sendmail
526 * PHPMAILER_METHOD_SMTP - SMTP
527 */
528$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
529
530/** Configure only if SMTP server requires authentication */
531$g_smtp_username = ''; # user
532$g_smtp_password = ''; # password
533
534/**
535 * This control the connection mode to SMTP server.
536 * Can be '', 'ssl','tls'
537 * @global string $g_smtp_connection_mode
538 */
539$g_smtp_connection_mode = '';
540
541/**
542 * The smtp port to use. The typical SMTP ports are 25 and 587. The port to use
543 * will depend on the SMTP server configuration and hence others may be used.
544 * @global int $g_smtp_port
545 */
546$g_smtp_port = 25;
547
548
549// ----------------------------------------------------------------------------
550/* [User Authentication] */
551
552/**
553 * Login authentication method:
554 * 'MD5' => use password stored on db => will be deprecated and DB used.
555 * 'DB' => Same as MD5 use password stored on db
556 * 'LDAP' => use password from LDAP Server
557 */
558$tlCfg->authentication['domain'] = array('DB' => array('description' => 'DB', 'allowPasswordManagement' => true) ,
559 'LDAP' => array('description' => 'LDAP', 'allowPasswordManagement' => false) );
560
561
562// $tlCfg->authentication['domain'] = array('DB','LDAP')
563
564/* Default Authentication method */
565$tlCfg->authentication['method'] = 'LDAP';
566
567// Applies only if authentication methos is DB.
568// Used when:
569// 1. user sign up
570//
571// null => only check password IS NOT EMPTY
572//
573// $tlCfg->passwordChecks = array('minlen' => 8,'maxlen' => 20,'number' => true,'letter' => true,
574// 'capital' => true, 'symbol' => true);
575$tlCfg->passwordChecks = null;
576
577// Applies ONLY to the HTML input.
578// If auth method is DB, password will be stored as MD5 HASH that requires 32 chars (128 bits)
579$tlCfg->loginPagePasswordMaxLenght = 40;
580
581/**
582 * Single Sign On authentication
583 * This will be used with $tlCfg->authentication['method'] <<= INCOMPLETE COMMENT
584 *
585 * This works with apache webserver
586 */
587$tlCfg->authentication['SSO_enabled'] = false;
588$tlCfg->authentication['SSO_method'] = 'CLIENT_CERTIFICATE';
589$tlCfg->authentication['SSO_uid_field'] = 'SSL_CLIENT_S_DN_Email';
590
591
592
593/** LDAP authentication credentials */
594$tlCfg->authentication['ldap_server'] = 'dc1.stc dc2.stc';
595$tlCfg->authentication['ldap_port'] = '389';
596$tlCfg->authentication['ldap_version'] = '3'; // could be '2' in some cases
597$tlCfg->authentication['ldap_root_dn'] = 'cn=Users,dc=speechpro,dc=com';
598$tlCfg->authentication['ldap_bind_dn'] = ''; // Left empty for anonymous LDAP binding
599$tlCfg->authentication['ldap_bind_passwd'] = ''; // Left empty for anonymous LDAP binding
600$tlCfg->authentication['ldap_tls'] = false; // true -> use tls
601
602// Following configuration parameters are used to build
603// ldap filter and ldap attributes used by ldap_search()
604//
605// filter => "(&$t_ldap_organization($t_ldap_uid_field=$t_username))";
606// attributess => array( $t_ldap_uid_field, 'dn' );
607//
608// This can be used to manage situation like explained on post on forum:
609// ActiveDirectory + users in AD group
610//
611$tlCfg->authentication['ldap_organization'] = ''; // e.g. '(organizationname=*Traffic)'
612$tlCfg->authentication['ldap_uid_field'] = 'sAMAccountName'; // Use 'sAMAccountName' for Active Directory
613
614
615
616
617// Follows Mantisbt idea.
618// True if user does not exist on DB, but can be get from LDAP,
619// the user will be created AUTOMATICALLY with default user role.
620// Create user with following data from LDAP
621// mail
622// name
623// surname
624$tlCfg->authentication['ldap_automatic_user_creation'] = false;
625
626// Configure following fields in custom_config.inc.php according your configuration
627$tlCfg->authentication['ldap_email_field'] = 'mail';
628$tlCfg->authentication['ldap_firstname_field'] = 'givenname';
629$tlCfg->authentication['ldap_surname_field'] = 'sn';
630
631
632
633
634/** Enable/disable Users to create accounts on login page */
635$tlCfg->user_self_signup = TRUE;
636
637/** What happens when Administrator push the Reset Password Button
638 'send_password_by_mail'
639 'display_on_screen'
640*/
641$tlCfg->password_reset_send_method = 'send_password_by_mail';
642
643/**
644 * Validating new user login names
645 * Taken mantisbt version 1.2.5 - www.mantisbt.org and adapted
646 *
647 * The regular expression to use when validating new user login names
648 * The default regular expression allows a-z, A-Z, 0-9, +, -, dot, @ and underscore.
649 * For testing regular expressions, use http://rubular.com/.
650 * For regular expression to englihs, use http://xenon.stanford.edu/~xusch/regexp/analyzer.html
651 */
652$tlCfg->validation_cfg->user_login_valid_regex='/^([a-z\d\-.+_@]+(@[a-z\d\-.]+\.[a-z]{2,4})?)$/i';
653
654/**
655 * Validating user email addresses
656 * Example of other possibilities:
657 * <code>
658 * $regex = "/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*" .
659 * "@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i";
660 * $regex = "/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/";
661 * </code>
662 **/
663//
664// This expression does not allow Top Level Domian (last part of domain name) longer than 4
665// If you need to change this
666// Configure this on custom_config.inc.php
667$tlCfg->validation_cfg->user_email_valid_regex_js = "/^(\w+)([-+.][\w]+)*@(\w[-\w]*\.){1,5}([A-Za-z]){2,4}$/";
668$tlCfg->validation_cfg->user_email_valid_regex_php = "/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/U";
669
670
671// --------------------------------------------------------------------------------------
672/* [API] */
673
674/** XML-RPC API availability - do less than promised ;)
675 FALSE => user are not able to generate and set his/her API key.
676 XML-RPC server do not check this config in order to answer or not a call.
677 */
678
679$tlCfg->api->enabled = FALSE;
680
681// used to display API ID info in the *View pages
682$tlCfg->api->id_format = "[ID: %s ]";
683
684
685// --------------------------------------------------------------------------------------
686/* [GUI LAYOUT] */
687
688/** GUI themes (base for CSS and images)- modify if you create own one */
689$tlCfg->theme_dir = 'gui/themes/default/';
690
691/** Dir for compiled templates */
692$tlCfg->temp_dir = TL_ABS_PATH . 'gui' . DIRECTORY_SEPARATOR . 'templates_c' . DIRECTORY_SEPARATOR;
693
694/** Company logo (used by navigation bar and login page page) */
695$tlCfg->logo_login = 'stc.png';
696$tlCfg->logo_navbar = 'stc.png';
697
698
699/** Login page could show an informational text */
700$tlCfg->login_info = ''; // Empty by default
701
702
703
704/**
705 * controls if pagination (via Javascript) will be enabled
706 */
707$tlCfg->gui->projectView = new stdClass();
708$tlCfg->gui->projectView->pagination = new stdClass();
709$tlCfg->gui->projectView->pagination->enabled = true;
710$tlCfg->gui->projectView->pagination->length = '[20, 40, 60, -1], [20, 40, 60, "All"]';
711
712$tlCfg->gui->usersAssign = new stdClass();
713$tlCfg->gui->usersAssign->pagination = new stdClass();
714$tlCfg->gui->usersAssign->pagination->enabled = true;
715$tlCfg->gui->usersAssign->pagination->length = '[20, 40, 60, -1], [20, 40, 60, "All"]';
716
717$tlCfg->gui->planView = new stdClass();
718$tlCfg->gui->planView->pagination = new stdClass();
719$tlCfg->gui->planView->pagination->enabled = true;
720$tlCfg->gui->planView->pagination->length = '[20, 40, 60, -1], [20, 40, 60, "All"]';
721
722
723/**
724 * controls if operation area (buttons) starts open ('' or 'inline') or closed ('none') on:
725 * - test suite management
726 * - test case management
727 * - req. spec management
728 * - req. management
729 */
730$tlCfg->gui->op_area_display = new stdClass();
731
732// test_spec_container => test project, test suite
733$tlCfg->gui->op_area_display->test_spec_container = 'none'; // ''
734$tlCfg->gui->op_area_display->test_case = 'none'; // 'inline'
735$tlCfg->gui->op_area_display->req_spec_container = 'none'; // 'inline'
736$tlCfg->gui->op_area_display->req = 'none'; // 'inline'
737
738
739
740/**
741 * @var string Availability of Test Project specific background colour
742 * 'background' -> standard behaviour for 1.6.x you can have a different
743 * background colour for every test project.
744 * 'none' -> new behaviour no background color change
745 */
746$tlCfg->gui->testproject_coloring = 'none'; // I'm sorry default is not coloring using coloring is a pain
747 // and useless
748/** @TODO havlatm4francisco Ok, then merge these two attributes into one */
749/** default background color */
750$tlCfg->gui->background_color = '#9BD';
751
752// ENABLED: on features that assign user role to test projects and test plan, colour user name
753// according GLOBAL role
754// DISABLED: do not color [STANDARD BEHAVIOUR]
755$tlCfg->gui->usersAssignGlobalRoleColoring = DISABLED;
756
757
758// Enable/disable rounded corners via javascript
759$tlCfg->gui->round_corners = new stdClass();
760$tlCfg->gui->round_corners->exec_history = ENABLED;
761$tlCfg->gui->round_corners->tc_title = ENABLED;
762$tlCfg->gui->round_corners->tc_spec = ENABLED;
763
764/**
765 * Display name definition (used to build a human readable display name for users)
766 * Example of values:
767 * '%first% %last%' -> John Cook
768 * '%last%, %first%' -> Cook John
769 * '%first% %last% %login%' -> John Cook [ux555]
770 **/
771$tlCfg->username_format = '%login%';
772
773/** Configure the frame frmWorkArea navigator width */
774$tlCfg->frame_workarea_default_width = "30%";
775
776/** true => icon edit will be added into <a href> as indication an edit features */
777$tlCfg->gui->show_icon_edit = false;
778
779/**
780 * '' => test project name
781 * 'prefix' => prefix : test project name
782 *
783 * ATTENTION : * is used to indicate test project is INACTIVE
784 * see also $tlCfg->gui->tprojects_combo_order_by
785 */
786$tlCfg->gui->tprojects_combo_format = 'prefix';
787
788
789/**
790 * Order to use when building a testproject combobox (value must be SQL compliant)
791 * For example:
792 * 'ORDER BY name'
793 * 'ORDER_BY nodes_hierarchy.id DESC' -> similar effect to order last created firts
794 **/
795// $tlCfg->gui->tprojects_combo_order_by = 'ORDER BY nodes_hierarchy.id DESC';
796$tlCfg->gui->tprojects_combo_order_by = 'ORDER BY nodes_hierarchy.id DESC';
797
798
799
800/** Configure the input size of test case search by id on navigation bar.
801 * This value will be added to the length of the prefix to dynamically set input size.
802 * Example: prefix is "projectA-" -> length of prefix is 9
803 * Now the here defined value (default: 6) will be added to the prefix length
804 * -> Input field will have an input size of 15
805 **/
806$tlCfg->gui->dynamic_quick_tcase_search_input_size = 6;
807
808// used to round percentages on metricsDashboard.php
809$tlCfg->dashboard_precision = 2;
810
811/**
812 * Choose what kind of webeditor you want to use in every TL area. This configuration
813 * will be used if no element with search key (area) is found on this structure.
814 * Every element is a mp with this configuration keys:
815 *
816 * 'type':
817 * 'fckeditor' ==> will be deprecated in future versions
818 * 'ckeditor'
819 * 'tinymce' ==> will be deprecated in future versions
820 * 'none' -> use plain text area input field
821 * 'toolbar': only applicable for type = 'fckeditor', 'ckeditor'
822 * name of ToolbarSet (See: http://docs.fckeditor.net/ for more information about ToolbarSets)
823 * TestLink stores own definitions in <testlink_dir>/cfg/tl_fckeditor_config.js
824 * TestLink stores own definitions in <testlink_dir>/cfg/tl_ckeditor_config.js
825 *
826 * 'configFile': only applicable for type = 'fckeditor'
827 * See: http://docs.fckeditor.net/ for more information about CustomConfigurationsPath
828 * 'height': the height in px for FCKEditor
829 * 'width': the width in px for FCKEditor
830 * 'cols': the number of cols for tinymce and none
831 * 'rows': the number of rows for tinymce and none
832 *
833 * The next keys/areas are supported:
834 * 'all' (default setting),
835 * 'design', 'steps_design', 'testplan', 'build', 'testproject', 'role', 'requirement', 'requirement_spec'.
836 *
837 * Examples:
838 * <code>
839 * // Copy this to custom_config.inc.php if you want use 'tinymce' as default.
840 * $tlCfg->gui->text_editor['all'] = array( 'type' => 'tinymce');
841 * // Copy this to custom_config.inc.php if you want use 'nome' as default.
842 * $tlCfg->gui->text_editor['all'] = array( 'type' => 'none');
843 * //This configuration is useful only if default type is set to 'fckeditor'
844 * $tlCfg->gui->text_editor['design'] = array('toolbar' => 'tl_mini');
845 *
846 * $tlCfg->gui->text_editor['testplan'] = array( 'type' => 'none');
847 * $tlCfg->gui->text_editor['build'] = array( 'type' => 'fckeditor','toolbar' => 'tl_mini');
848 * $tlCfg->gui->text_editor['testproject'] = array( 'type' => 'tinymce');
849 * $tlCfg->gui->text_editor['role'] = array( 'type' => 'tinymce');
850 * $tlCfg->gui->text_editor['requirement'] = array( 'type' => 'none');
851 * $tlCfg->gui->text_editor['requirement_spec'] = array( 'type' => 'none');
852 * </code>
853 *
854 * Hint: After doing configuration changes, clean you Browser's cookies and cache
855 */
856/*
857$tlCfg->gui->text_editor = array();
858$tlCfg->gui->text_editor['all'] = array('type' => 'fckeditor',
859 'toolbar' => 'tl_default',
860 'configFile' => 'cfg/tl_fckeditor_config.js',);
861$tlCfg->gui->text_editor['execution'] = array( 'type' => 'none');
862*/
863
864$tlCfg->gui->text_editor = array();
865$tlCfg->gui->text_editor['all'] = array('type' => 'ckeditor','toolbar' => 'Testlink',
866 'configFile' => 'cfg/tl_ckeditor_config.js',
867 'height' => 150);
868
869// mini toolbar for test case steps edit
870$tlCfg->gui->text_editor['steps_design'] = array('type' => 'ckeditor','toolbar' => 'TestlinkMini',
871 'configFile' => 'cfg/tl_ckeditor_config.js',
872 'height' => 100);
873
874$tlCfg->gui->text_editor['execution'] = array( 'type' => 'none');
875$tlCfg->gui->text_editor['edit_execution'] = array( 'type' => 'none', 'cols' => 80, 'rows' => 20);
876$tlCfg->gui->text_editor['display_execution_notes'] = array('type' => 'none', 'cols' => 80, 'rows' => 20);
877
878/** User can choose order of menu areas */
879$tlCfg->gui->layoutMainPageLeft = array( 'testProject' => 1, 'userAdministration' => 2 ,
880 'requirements' => 3, 'testSpecification' => 4,
881 'general' => 5);
882$tlCfg->gui->layoutMainPageRight = array( 'testPlan' => 1, 'testExecution' => 2 ,
883 'testPlanContents' => 3);
884
885/**
886 * Enable warning on a changed content before an user leave a page.
887 *
888 * Tested in:
889 * - IE8 OK
890 * - Firefox 3 OK
891 * - Chrome FAIL
892 *
893 * Does not work in Webkit browsers (Chrome, Safari) when using frames.
894 * Bug in webkit: https://bugs.webkit.org/show_bug.cgi?id=19418
895 */
896
897// seems that with config options that will be used on javascript via smarty template variables
898// we are having problems using FALSE/TRUE => use 0/1 (or our CONSTANT DISABLED/ENABLED)
899$tlCfg->gui->checkNotSaved = ENABLED;
900
901
902// ----------------------------------------------------------------------------
903/* [GUI: TREE] */
904
905/** Default ordering value for new Test Suites and Test Cases to separate them */
906$tlCfg->treemenu_default_testsuite_order = 1;
907$tlCfg->treemenu_default_testcase_order = 100;
908
909/** show/hide testcase id on tree menu */
910$tlCfg->treemenu_show_testcase_id = TRUE;
911
912/** Reorder test cases based on TC Name or External ID in tree on
913 * test suite level using reorder button
914 */
915// 'EXTERNAL_ID' -> Sort on Test Case External ID field displayed on tree.(Default)
916// 'NAME' -> Sort on Test Case Name field
917
918$tlCfg->testcase_reorder_by = 'EXTERNAL_ID';
919// $tlCfg->testcase_reorder_by = 'NAME';
920
921// ----------------------------------------------------------------------------
922/* [GUI: Javascript libraries] */
923
924// May be in future another table sort engine will be better
925// kryogenix.org -> Stuart Langridge sortTable
926// '' (empty string) -> disable table sorting feature
927$g_sort_table_engine='kryogenix.org';
928
929
930// --------------------------------------------------------------------------------------
931/* [Reports] */
932$tlCfg->reportsCfg=new stdClass();
933
934//Displayed execution statuses to use on reports (ordered). */
935$tlCfg->reportsCfg->exec_status = $tlCfg->results['status_label_for_exec_ui'];
936
937/**
938 * Default Offset in seconds for reporting start date (reports with date range)
939 * @uses lib/results/resultsMoreBuilds.php
940 */
941$tlCfg->reportsCfg->start_date_offset = (7*24*60*60); // one week
942
943// minutes part is ignored but must be configured.
944// Hint: set always to :00
945$tlCfg->reportsCfg->start_time = '00:00';
946
947// Result matrix (resultsTC.php)
948// Shows an extra column which gives the status of the last executed build
949$tlCfg->resultMatrixReport->buildColumns['showStatusLastExecuted'] = true;
950
951// Show build columns in revers order. The latest build is to the left
952$tlCfg->resultMatrixReport->buildColumns['latestBuildOnLeft'] = false;
953
954// After having got performance and usability issue, a limit on max qty of builds
955// allowed on data extration has been set.
956// Is absolutely arbitrary
957//
958$tlCfg->resultMatrixReport->buildQtyLimit = 6;
959
960// ORDER BY sql clause, refers to builds table columns
961$tlCfg->resultMatrixReport->buildOrderByClause = " ORDER BY name ASC";
962
963
964// Show all available status details for test plans on metrics dashboard
965$tlCfg->metrics_dashboard = new stdClass();
966$tlCfg->metrics_dashboard->show_test_plan_status = false;
967
968
969
970
971// ----------------------------------------------------------------------------
972/* [GENERATED DOCUMENTATION] */
973
974/**
975 * Texts and settings for printed documents
976 * Image is expected in directory <testlink_root>/gui/themes/<your_theme>/images/
977 * Leave text values empty if you would like to hide parameters.
978 */
979$tlCfg->document_generator->company_name = 'TestLink Community [configure $tlCfg->document_generator->company_name]';
980$tlCfg->document_generator->company_copyright = '2012 © TestLink Community';
981$tlCfg->document_generator->confidential_msg = '';
982
983// Logo for generated documents
984$tlCfg->document_generator->company_logo = $tlCfg->logo_login;
985$tlCfg->document_generator->company_logo_height = '53';
986
987/** CSS used in printed html documents */
988$tlCfg->document_generator->css_template = 'css/tl_documents.css';
989
990// CSS file for Requirement Specification Document, Requirement and Requirement Spec Print View
991$tlCfg->document_generator->requirement_css_template = 'css/tl_documents.css';
992
993/** Misc settings */
994// Display test case version when creating:
995// - test spec document
996// - test reports
997$tlCfg->document_generator->tc_version_enabled = FALSE;
998
999
1000
1001// ----------------------------------------------------------------------------
1002/* [Test Executions] */
1003
1004// ENABLED -> enable XML-RPC calls to external test automation server
1005// new buttons will be displayed on execution pages
1006// DISABLED -> disable
1007$tlCfg->exec_cfg->enable_test_automation = DISABLED;
1008
1009
1010// ASCending -> last execution at bottom
1011// DESCending -> last execution on top [STANDARD BEHAVIOUR]
1012$tlCfg->exec_cfg->history_order = 'DESC';
1013
1014// TRUE -> the whole execution history for the choosen build will be showed
1015// FALSE -> just last execution for the choosen build will be showed [STANDARD BEHAVIOUR]
1016$tlCfg->exec_cfg->history_on = FALSE;
1017
1018// TRUE -> test case VERY LAST (i.e. in any build) execution status will be displayed [STANDARD BEHAVIOUR]
1019// FALSE -> only last result on current build.
1020$tlCfg->exec_cfg->show_last_exec_any_build = TRUE;
1021
1022// TRUE -> History for all builds will be shown
1023// FALSE -> Only history of the current build will be shown [STANDARD BEHAVIOUR]
1024$tlCfg->exec_cfg->show_history_all_builds = FALSE;
1025
1026// TRUE -> History for all platforms (if any exists for test plan) will be shown
1027// FALSE -> Only history of the current platform will be shown [STANDARD BEHAVIOUR]
1028$tlCfg->exec_cfg->show_history_all_platforms = FALSE;
1029
1030// different models for the attachments management on execution page
1031// $att_model_m1 -> shows upload button and title
1032// $att_model_m2 -> hides upload button and title
1033$tlCfg->exec_cfg->att_model = $att_model_m2; //defined in const.inc.php
1034
1035
1036// ENABLED -> test cases will be coloured according to test case status
1037$tlCfg->exec_cfg->enable_tree_testcases_colouring = ENABLED;
1038
1039// ENABLED -> test cases will be coloured according to execution status on build selected for execution
1040// DISABLED -> test cases will be coloured according status on latest execution regardless of selected build
1041// see http://mantis.testlink.org/view.php?id=3450 for more details
1042$tlCfg->exec_cfg->testcases_colouring_by_selected_build = ENABLED;
1043
1044// ENABLED -> test case counters will be coloured according to test case status
1045$tlCfg->exec_cfg->enable_tree_counters_colouring = ENABLED;
1046
1047
1048// This can help to avoid performance problems.
1049// Controls what happens on right frame when user clicks on a testsuite on tree.
1050// ENABLED -> show all test cases
1051// see $tlCfg->exec_cfg->show_testsuite_contents_deep
1052//
1053// DISABLED -> nothing happens, to execute a test case you need to click on test case
1054$tlCfg->exec_cfg->show_testsuite_contents = DISABLED;
1055
1056// @since 1.9.13
1057// works in 'team' with $tlCfg->exec_cfg->show_testsuite_contents
1058// children: only direct children.
1059// deep: all test cases present in test suite and test suites in any level below
1060// selected test suite.
1061// IMPORTANT NOTICE:
1062// selecting deep can create performance issues.
1063//
1064$tlCfg->exec_cfg->show_testsuite_contents_deep = 'children';
1065
1066
1067// ENABLED -> enable testcase counters by status on tree
1068$tlCfg->exec_cfg->enable_tree_testcase_counters = ENABLED;
1069
1070
1071// Define list of roles that are affected by:
1072// $tlCfg->exec_cfg->view_mode and $tlCfg->exec_cfg->exec_mode
1073// User must reconfigure if define other simple tester roles
1074//
1075// In addition (till code changes) also roles that verify this condition:
1076// $effective_role->hasRight('testplan_execute') and !$effective_role->hasRight('testplan_planning')
1077// Will be affected by:
1078// $tlCfg->exec_cfg->view_mode and $tlCfg->exec_cfg->exec_mode
1079//
1080$tlCfg->exec_cfg->simple_tester_roles=array(TL_ROLES_TESTER);
1081
1082// Filter Test cases a user with tester role can VIEW depending on
1083// test execution assignment.
1084// all: all test cases.
1085// assigned_to_me: test cases assigned to logged user.
1086// assigned_to_me_or_free: test cases assigned to logged user or not assigned
1087$tlCfg->exec_cfg->view_mode->tester='assigned_to_me';
1088
1089// Filter Test cases a user with tester role can EXECUTE depending on
1090// test execution assignment.
1091// all: all test cases.
1092// assigned_to_me: test cases assigned to logged user.
1093// assigned_to_me_or_free: test cases assigned to logged user or not assigned
1094$tlCfg->exec_cfg->exec_mode->tester='assigned_to_me';
1095
1096
1097// How to set defaut values for execution fields (standard & custom)
1098// clean => all clean
1099// latest => get as much as possible values from latest execution on
1100// same context => test plan,platform, build
1101$tlCfg->exec_cfg->exec_mode->new_exec='clean';
1102
1103
1104// @since 1.9.15
1105// Before 1.9.15 save & move to next worked JUST inside
1106// a test suite => save_and_move = 'limited'
1107// 1.9.15 will move on whole test project
1108// save_and_move = 'unlimited'
1109$tlCfg->exec_cfg->exec_mode->save_and_move='unlimited';
1110
1111/** User filter in Test Execution navigator - default value */
1112// logged_user -> combo will be set to logged user
1113// none -> no filter applied by default
1114$tlCfg->exec_cfg->user_filter_default='none';
1115
1116
1117// 'horizontal' -> step and results on the same row
1118// 'vertical' -> steps on one row, results in the row bellow
1119$tlCfg->exec_cfg->steps_results_layout = 'horizontal';
1120
1121// true => on single test case execution feature, notes and result
1122// can be provided for each step
1123// false => pre 1.9.10 behaviour
1124//
1125$tlCfg->exec_cfg->steps_exec = true;
1126
1127// this setting will work on AND mode with:
1128// $tlCfg->exec_cfg->steps_exec
1129$tlCfg->exec_cfg->steps_exec_attachments = true;
1130
1131// When textarea is displayed to allow user to write execution notes
1132// at step level, choose what to display:
1133// 'empty'
1134// 'latest' => latest execution notes.
1135$tlCfg->exec_cfg->steps_exec_notes_default = 'empty';
1136
1137// Parameters to show notes/details when entering test execution feature
1138// EXPAND: show expanded/open
1139// COLLAPSE: show collapsed/closede
1140// LAST_USER_CHOICE: get status from cookie that holds last user choice.[STANDARD BEHAVIOUR]
1141$tlCfg->exec_cfg->expand_collapse = new stdClass();
1142$tlCfg->exec_cfg->expand_collapse->testplan_notes = LAST_USER_CHOICE;
1143$tlCfg->exec_cfg->expand_collapse->platform_description = LAST_USER_CHOICE;
1144$tlCfg->exec_cfg->expand_collapse->build_description = LAST_USER_CHOICE;
1145$tlCfg->exec_cfg->expand_collapse->testsuite_details = LAST_USER_CHOICE;
1146
1147
1148
1149$tlCfg->exec_cfg->copyLatestExecIssues = new stdClass();
1150
1151// true => When saving an execution, a new option will be displayed, and user will be
1152// able to do a choice
1153// COPY OR NOT issues linked to latest execution to the new execution
1154// DEAFULT false => no option on GUI
1155
1156$tlCfg->exec_cfg->copyLatestExecIssues->enabled = FALSE;
1157
1158
1159// value to set as default
1160$tlCfg->exec_cfg->copyLatestExecIssues->default = FALSE;
1161
1162// you can choose only between this columns
1163// 'execution_id,bug_id,builds.name'
1164// (see exec.inc.php, function get_bugs_for_exec())
1165$tlCfg->exec_cfg->bugs_order_clause = ' ORDER BY builds.name,bug_id ';
1166
1167$tlCfg->exec_cfg->features = new stdClass();
1168$tlCfg->exec_cfg->features->attachments = new stdClass();
1169$tlCfg->exec_cfg->features->attachments->enabled = true;
1170$tlCfg->exec_cfg->features->exec_duration = new stdClass();
1171$tlCfg->exec_cfg->features->exec_duration->enabled = true;
1172
1173
1174// ----------------------------------------------------------------------------
1175/* [Test Specification] */
1176
1177// TRUE will be displayed when displayed a test case
1178$tlCfg->spec_cfg->show_tplan_usage = TRUE;
1179
1180// 'horizontal' -> step and results on the same row
1181// 'vertical' -> steps on one row, results in the row bellow
1182$tlCfg->spec_cfg->steps_results_layout = 'horizontal';
1183
1184
1185// ENABLED -> User will see a test suite filter while creating test specification
1186// DISABLED -> no filter available
1187// $g_spec_cfg->show_tsuite_filter = ENABLED;
1188$tlCfg->spec_cfg->show_tsuite_filter = ENABLED;
1189
1190// ENABLED -> every time user do some operation on test specification
1191// tree is updated on screen.
1192// DISABLED -> tree will not be updated, user can update it manually.
1193// Anyway on user interface user will be able to change this choice
1194// $g_spec_cfg->automatic_tree_refresh = ENABLED;
1195$tlCfg->spec_cfg->automatic_tree_refresh = ENABLED;
1196
1197
1198// To avoid perfomance problems on search test case feature,
1199// we can decide when to inform user that results can not be displayed
1200// due to too many results.
1201$tlCfg->testcase_cfg->search=new stdClass();
1202$tlCfg->testcase_cfg->search->max_qty_for_display=200;
1203
1204
1205$tlCfg->testcase_cfg->duplicated_name_algorithm = new stdClass();
1206// 'stringPrefix' => use duplicated_name_algorithm->text
1207// 'counterSuffix' => creare name as :
1208// test case title + (number of existent test cases +1)
1209// example: My Test Title 2
1210// duplicated_name_algorithm->text is used as sprintf format mask
1211$tlCfg->testcase_cfg->duplicated_name_algorithm->type = 'stringPrefix';
1212$tlCfg->testcase_cfg->duplicated_name_algorithm->text = "%Y%m%d-%H:%M:%S";
1213
1214// $tlCfg->testcase_cfg->duplicated_name_algorithm->type = 'counterSuffix';
1215// $tlCfg->testcase_cfg->duplicated_name_algorithm->text = " (%s)";
1216
1217
1218// TICKET 6422: Estimation in Test specification as mandatory field
1219// Implemented using HTML5
1220$tlCfg->testcase_cfg->estimated_execution_duration = new stdClass();
1221// $tlCfg->testcase_cfg->estimated_execution_duration->required = 'required';
1222$tlCfg->testcase_cfg->estimated_execution_duration->required = '';
1223
1224
1225
1226// There are some preconfigured standard types which you can use,
1227// additionally you can configure your own types.
1228$tlCfg->testcase_cfg->relations = new stdClass();
1229$tlCfg->testcase_cfg->relations->enable = TRUE;
1230$tlCfg->testcase_cfg->relations->interproject_linking = FALSE;
1231
1232
1233/**
1234 * Localization identifiers for test cases relation types
1235 * Types, which are configured above, have to be configured
1236 * here too with attributes "source" and "destination".
1237 *
1238 * Last value will be selected in GUI as default.
1239 *
1240 * Form has to be like this:
1241 *
1242 * ... = array(
1243 * RELATIONNAME => array(
1244 * 'source' => 'SOURCE_LOCALIZATION_KEY',
1245 * 'destination' => 'DESTINATION_LOCALIZATION_KEY'),
1246 * ...
1247 *
1248 * @since TestLink 1.9.12
1249 **/
1250
1251$tlCfg->testcase_cfg->relations->type_labels = array(
1252 TL_REL_TYPE_PARENT_CHILD => array('source' => 'parent_of','destination' => 'child_of'),
1253 TL_REL_TYPE_BLOCKS_DEPENDS => array('source' => 'blocks','destination' => 'depends'),
1254 TL_REL_TYPE_RELATED => array('source' => 'related_to','destination' => 'related_to')
1255);
1256
1257
1258
1259$tlCfg->testcase_cfg->relations->type_description = array(TL_REL_TYPE_PARENT_CHILD => 'parent_child',
1260 TL_REL_TYPE_BLOCKS_DEPENDS => 'blocks_depends',
1261 TL_REL_TYPE_RELATED => 'related_to');
1262
1263
1264
1265
1266/** text template for a new items:
1267 Test Case: summary, steps, expected_results, preconditions
1268
1269*/
1270// object members has SAME NAME that FCK editor objects.
1271// the logic present on tcEdit.php is dependent of this rule.
1272// every text object contains an object with following members: type and value
1273//
1274// Possible values for type member:
1275// none: template will not be used, default will be a clean editor screen.
1276//
1277// string: value of value member is assigned to FCK object
1278// string_id: value member is used in a lang_get() call, and return value
1279// is assigned to FCK object. Configure string_id on custom_strings.txt
1280// value: value member is used as file name.
1281// file is readed and it's contains assigned to FCK object
1282//
1283// any other value for type, results on '' assigned to FCK object
1284
1285$tlCfg->testcase_template = new stdClass();
1286
1287$tlCfg->testcase_template->summary = new stdClass();
1288$tlCfg->testcase_template->summary->type = 'none';
1289$tlCfg->testcase_template->summary->value = '';
1290
1291$tlCfg->testcase_template->steps = new stdClass();
1292$tlCfg->testcase_template->steps->type = 'none';
1293$tlCfg->testcase_template->steps->value = '';
1294
1295$tlCfg->testcase_template->expected_results = new stdClass();
1296$tlCfg->testcase_template->expected_results->type = 'none';
1297$tlCfg->testcase_template->expected_results->value = '';
1298
1299$tlCfg->testcase_template->preconditions = new stdClass();
1300$tlCfg->testcase_template->preconditions->type = 'none';
1301$tlCfg->testcase_template->preconditions->value = '';
1302
1303
1304/** text template for a new Test Suite description */
1305$tlCfg->testsuite_template = new stdClass();
1306$tlCfg->testsuite_template->details = new stdClass();
1307$tlCfg->testsuite_template->details->type = 'none';
1308$tlCfg->testsuite_template->details->value = '';
1309
1310$tlCfg->project_template = new stdClass();
1311$tlCfg->project_template->notes = new stdClass();
1312$tlCfg->project_template->notes->type = 'none';
1313$tlCfg->project_template->notes->value = '';
1314
1315$tlCfg->testplan_template = new stdClass();
1316$tlCfg->testplan_template->notes = new stdClass();
1317$tlCfg->testplan_template->notes->type = 'none';
1318$tlCfg->testplan_template->notes->value = '';
1319
1320$tlCfg->execution_template = new stdClass();
1321$tlCfg->execution_template->bulk_exec_notes = new stdClass();
1322$tlCfg->execution_template->bulk_exec_notes->type = 'none';
1323$tlCfg->execution_template->bulk_exec_notes->value = '';
1324
1325$tlCfg->execution_template->notes = new stdClass();
1326$tlCfg->execution_template->notes->type = 'none';
1327$tlCfg->execution_template->notes->value = '';
1328
1329$tlCfg->build_template = new stdClass();
1330$tlCfg->build_template->notes = new stdClass();
1331$tlCfg->build_template->notes->type = 'none';
1332$tlCfg->build_template->notes->value = '';
1333
1334$tlCfg->requirement_template = new stdClass();
1335$tlCfg->requirement_template->scope = new stdClass();
1336$tlCfg->requirement_template->scope->type = 'none';
1337$tlCfg->requirement_template->scope->value = '';
1338
1339$tlCfg->req_spec_template = new stdClass();
1340$tlCfg->req_spec_template->scope = new stdClass();
1341$tlCfg->req_spec_template->scope->type = 'none';
1342$tlCfg->req_spec_template->scope->value = '';
1343
1344$tlCfg->role_template = new stdClass();
1345$tlCfg->role_template->notes = new stdClass();
1346$tlCfg->role_template->notes->type = 'none';
1347$tlCfg->role_template->notes->value = '';
1348
1349
1350$tlCfg->platform_template = new stdClass();
1351$tlCfg->platform_template->notes = new stdClass();
1352$tlCfg->platform_template->notes->type = 'none';
1353$tlCfg->platform_template->notes->value = '';
1354
1355// ----------------------------------------------------------------------------
1356/* [ATTACHMENTS] */
1357
1358/** Attachment feature availability */
1359$g_attachments = new stdClass();
1360$g_attachments->enabled = TRUE;
1361
1362/** the type of the repository can be database or filesystem
1363 * TL_REPOSITORY_TYPE_DB => database
1364 * TL_REPOSITORY_TYPE_FS => filesystem
1365 **/
1366$g_repositoryType = TL_REPOSITORY_TYPE_FS;
1367
1368/**
1369 * TL_REPOSITORY_TYPE_FS: the where the filesystem repository should be located
1370 * We recommend to change the directory for security reason.
1371 * (see http://itsecuritysolutions.org/2012-08-13-TestLink-1.9.3-multiple-vulnerabilities/)
1372 * Put it out of reach via web or configure access denied.
1373 *
1374 **/
1375$g_repositoryPath = '/var/testlink/upload_area/'; /* unix example */
1376
1377/**
1378 * compression used within the repository
1379 * TL_REPOSITORY_COMPRESSIONTYPE_NONE => no compression
1380 * TL_REPOSITORY_COMPRESSIONTYPE_GZIP => gzip compression
1381 */
1382$g_repositoryCompressionType = TL_REPOSITORY_COMPRESSIONTYPE_NONE;
1383
1384// the maximum allowed file size for each repository entry, default 1MB.
1385// Also check your PHP settings (default is usually 2MBs)
1386$tlCfg->repository_max_filesize = 1; //MB
1387
1388// TRUE -> when you upload a file you can give no title
1389$g_attachments->allow_empty_title = TRUE;
1390
1391// $g_attachments->allow_empty_title == TRUE, you can ask the system
1392// to do something
1393//
1394// 'none' -> just write on db an empty title
1395// 'use_filename' -> use filename as title
1396//$g_attachments->action_on_save_empty_title='use_filename';
1397//
1398$g_attachments->action_on_save_empty_title = 'none';
1399
1400// Remember that title is used as link description for download
1401// then if title is empty, what the system has to do when displaying ?
1402// 'show_icon' -> the $g_attachments->access_icon will be used.
1403// 'show_label' -> the value of $g_attachments->access_string will be used .
1404$g_attachments->action_on_display_empty_title = 'show_icon';
1405
1406// need to be moved AFTER include of custom_config
1407//
1408// $g_attachments->access_icon = '<img src="' . $tlCfg->theme_dir . 'images/new_f2_16.png" style="border:none" />';
1409$g_attachments->access_string = "[*]";
1410
1411// Set display order of uploaded files
1412$g_attachments->order_by = " ORDER BY date_added DESC ";
1413
1414
1415
1416// ----------------------------------------------------------------------------
1417/* [Requirements] */
1418
1419// HAS TO BE REMOVED - > req_doc_id UNIQUE INSIDE test project
1420// true : you want req_doc_id UNIQUE IN THE WHOLE DB (system_wide)
1421// false: you want req_doc_id UNIQUE INSIDE a SRS
1422// $tlCfg->req_cfg->reqdoc_id->is_system_wide = FALSE;
1423
1424// 20101212 - truncate log message to this amount of chars for reqCompareVersions
1425$tlCfg->req_cfg->log_message_len = 200;
1426
1427/**
1428 * Test Case generation from Requirements - use_req_spec_as_testsuite_name
1429 * FALSE => test cases are created and assigned to a test suite
1430 * with name $tlCfg->req_cfg->default_testsuite_name
1431 * TRUE => REQuirement Specification Title is used as testsuite name
1432 */
1433$tlCfg->req_cfg->use_req_spec_as_testsuite_name = TRUE;
1434$tlCfg->req_cfg->default_testsuite_name = "Auto-created Test cases";
1435$tlCfg->req_cfg->testsuite_details = "Test Cases in the Test Suite are generated from Requirements. " .
1436 "A refinement of test scenario is highly recommended.";
1437$tlCfg->req_cfg->testcase_summary_prefix = "<b>The Test Case was generated from the assigned requirement.</b><br />";
1438
1439
1440// If the following value is enabled, then the summary prefix string will include the
1441// title and version number of the assigned requirement.
1442$tlCfg->req_cfg->use_testcase_summary_prefix_with_title_and_version = ENABLED;
1443
1444// If above option is enabled, the following string will be used as a template for the tc summary prefix.
1445// It has to include four variables in the form of "%s". The first and second one will be used internally by the system.
1446// The third one will then be replaced by the title of the originating Requirement,
1447// the fourth one by its version number.
1448// Attention: If there aren't exactly three variables in it, the operation will fail.
1449$tlCfg->req_cfg->testcase_summary_prefix_with_title_and_version = "<b>The Test Case was generated from the assigned" .
1450 " requirement <a href=\"javascript:openLinkedReqVersionWindow(%s,%s)\">\"%s\" (version %s)</a>.</b><br />";
1451
1452/**
1453 * ENABLED: When generating Test Cases from Requirements, copy the scope of the Requirement
1454 * to the summary of the newly created Test Case.
1455 */
1456$tlCfg->req_cfg->copy_req_scope_to_tc_summary = DISABLED;
1457
1458
1459// To avoid perfomance problems on search Requirements feature,
1460// we can decide when to inform user that results can not be displayed
1461// due to too many results.
1462$tlCfg->req_cfg->search=new stdClass();
1463$tlCfg->req_cfg->search->max_qty_for_display=200;
1464
1465
1466// ENABLED: allow N level depth tree
1467// DISABLED: just one level
1468$tlCfg->req_cfg->child_requirements_mgmt = ENABLED;
1469
1470
1471// ENABLED: ask for this value on user interface and use on several features
1472// DISABLED: do not ask, do not use
1473$tlCfg->req_cfg->expected_coverage_management = ENABLED;
1474
1475// Show Child Requirements on Requirement Specification Print View
1476// ENABLED: Requirement Specification including Child Requirements are shown
1477// DIABLED: ONLY Requirement Specification is shown
1478$tlCfg->req_cfg->show_child_reqs_on_reqspec_print_view = DISABLED;
1479
1480//
1481// Order of test cases status in this array, is used to undestand
1482// to what status set requirement in the requirements report.
1483// Standard algorithm, present in getReqCoverage(), is:
1484//
1485// if at least one of Test Cases linked to Requirement has status FAILED
1486// Requirement Coverage Status = FAILED
1487// else if at least one of Test Cases linked to Requirement has status BLOCKED
1488// Requirement Coverage Status = BLOCKED
1489// else if ALL Test Cases linked to Requirement has status NOT RUN
1490// Requirement Coverage Status = NOT RUN
1491// else if ALL Test Cases linked to Requirement has status PASSED
1492// Requirement Coverage Status = PASSED
1493// else
1494// Requirement Coverage Status = Partially Passed
1495//
1496// This logic is implemented using following config parameter
1497$tlCfg->req_cfg->coverageStatusAlgorithm['checkOrder']=array('atLeastOne','all');
1498$tlCfg->req_cfg->coverageStatusAlgorithm['checkType']['atLeastOne']=array('failed','blocked');
1499$tlCfg->req_cfg->coverageStatusAlgorithm['checkType']['all']=array('passed');
1500
1501// Configure here what status has to get requirement when check of type 'all' fails like
1502// in following situation (Mantis 2171)
1503//
1504// If particular requirement has assigned more than one test cases, and:
1505// - at least one of assigned test cases was not yet executed
1506// - the rest of assigned test cases was executed and passed
1507// then on the "Requirements based report" this particular requirement is not shown at all (in any section).
1508//
1509// $tlCfg->req_cfg->coverageStatusAlgorithm['checkFail']['all']='partially_passed';
1510// $tlCfg->req_cfg->coverageStatusAlgorithm['displayOrder']=array('passed','failed',
1511// 'blocked','not_run','partially_passed');
1512// 20100819 - asimon - fix not needed anymore after rewrite of req based report
1513//$tlCfg->req_cfg->coverageStatusAlgorithm['checkFail']['all']='failed';
1514//$tlCfg->req_cfg->coverageStatusAlgorithm['displayOrder']=array('passed','failed','blocked','not_run');
1515
1516
1517
1518
1519// truncate log message to this amount of chars for reqSpecCompareRevisions
1520$tlCfg->req_spec_cfg->log_message_len = 200;
1521
1522
1523// Linking between requirements/requirement specifications
1524//
1525$tlCfg->internal_links = new stdClass();
1526
1527//
1528// TRUE: links to other requirements/requirement specifications are
1529// automatically generated from the corresponding Document ID, enclosed by tags (like BBCode).
1530//
1531// Usage:
1532// link to requirements: [req]req_doc_id[/req]
1533// link to requirement specifications: [req_spec]req_spec_doc_id[/req_spec]
1534//
1535// The test project of the requirement / requirement specification and an anchor
1536// to jump to can also be specified:
1537// [req tproj=<tproj_prefix> anchor=<anchor_name>]req_doc_id[/req]
1538// This syntax also works for requirement specifications.
1539//
1540// FALSE: no links are automatically created.
1541//
1542$tlCfg->internal_links->enable = TRUE;
1543
1544// how a linked document (requirement/requirement specification) should be displayed.
1545// posible values:
1546// 'window': new window/tab will be used (depending on browser configuration)
1547// 'frame' : same frame as the clicked link
1548// 'popup' (default): popup window (ATTENTION to browser pop-up block).
1549//
1550$tlCfg->internal_links->target = 'popup';
1551
1552// title for automatically created link
1553// possible values:
1554// 'string': lang_get() will be used to localize
1555// 'none': no title will be generated, only link with ID
1556// 'item' (default): localized type of item (e.g. "Requirement: ", "Req Spec")
1557// will be used as title for the generated link
1558//
1559$tlCfg->internal_links->req_link_title = new stdClass();
1560$tlCfg->internal_links->req_link_title->type = 'item';
1561$tlCfg->internal_links->req_link_title->value = '';
1562
1563$tlCfg->internal_links->req_spec_link_title = new stdClass();
1564$tlCfg->internal_links->req_spec_link_title->type = 'item';
1565$tlCfg->internal_links->req_spec_link_title->value = '';
1566
1567
1568// Relations between requirement documents:
1569//
1570// The relation types have to be configured in cfg/const.inc.php
1571// and their respective localization values in locale strings.txt.
1572
1573// There are some preconfigured standard types which you can use,
1574// additionally you can configure your own types.
1575$tlCfg->req_cfg->relations = new stdClass();
1576$tlCfg->req_cfg->relations->enable = TRUE;
1577$tlCfg->req_cfg->relations->interproject_linking = FALSE;
1578
1579// Requirement/testcase diff
1580// default value of lines to show before and after each difference
1581$tlCfg->diffEngine->context = 5;
1582
1583
1584// Configuration for Requirement Import using DOCBOOK format
1585$tlCfg->req_cfg->importDocBook = new stdClass();
1586$tlCfg->req_cfg->importDocBook->requirement= "sect3";
1587$tlCfg->req_cfg->importDocBook->title= "title";
1588$tlCfg->req_cfg->importDocBook->paragraph= "para";
1589$tlCfg->req_cfg->importDocBook->ordered_list="orderedlist";
1590$tlCfg->req_cfg->importDocBook->list_item="listitem";
1591$tlCfg->req_cfg->importDocBook->table="informaltable";
1592$tlCfg->req_cfg->importDocBook->table_group="tgroup";
1593$tlCfg->req_cfg->importDocBook->table_head="thead";
1594$tlCfg->req_cfg->importDocBook->table_body="tbody";
1595$tlCfg->req_cfg->importDocBook->table_row="row";
1596$tlCfg->req_cfg->importDocBook->table_entry="entry";
1597$tlCfg->req_cfg->importDocBook->list_item_children = array('para','title');
1598$tlCfg->req_cfg->importDocBook->table_entry_children = array('para');
1599
1600
1601// If an external tool is used for requirement management, enable this setting.
1602// You will get an additional field on requirement specifications where you
1603// can enter the total count of requirements so that external requirements
1604// are also counted for metrics/statistics.
1605$tlCfg->req_cfg->external_req_management = DISABLED;
1606
1607
1608//If enabled an icon next to Document ID field will show up that allows
1609//to insert the last defined Requirement Document ID within the same Project
1610//into Document ID field
1611$tlCfg->req_cfg->allow_insertion_of_last_doc_id = DISABLED;
1612
1613
1614// used ONLY to configure the mask (text) .
1615// algorithm type is fixed HARDCODED
1616//
1617$tlCfg->req_cfg->duplicated_name_algorithm = new stdClass();
1618$tlCfg->req_cfg->duplicated_name_algorithm->text = " (%s)";
1619
1620$tlCfg->req_cfg->duplicated_docid_algorithm = new stdClass();
1621$tlCfg->req_cfg->duplicated_docid_algorithm->text = " (%s)";
1622
1623
1624// ----------------------------------------------------------------------------
1625/* [TREE FILTER CONFIGURATION] */
1626
1627/* In the following section, you can configure which filters shall be used
1628 * in combination with the tree view for testcases and requirements.
1629 * There are five available filter modes (four for the testcase tree,
1630 * one for requirement documents), which are used for the different features
1631 * as listed here:
1632 *
1633 * For Test Cases:
1634 * --> execution_mode
1635 * execution of testcases
1636 * --> edit_mode
1637 * create and edit testcases
1638 * assign keywords to testcases
1639 * assign requirements to testcases
1640 * --> plan_mode
1641 * assign testcase execution to users
1642 * update linked versions for testplan
1643 * set urgent testcases
1644 * --> plan_add_mode
1645 * add/remove testcases to/from testplan
1646 *
1647 * For Requirements:
1648 * There are no modes defined, there is only one filter configuration.
1649 * The filters configured here will be used for requirement editing.
1650 */
1651$tlCfg->tree_filter_cfg = new stdClass();
1652$tlCfg->tree_filter_cfg->testcases = new stdClass();
1653$tlCfg->tree_filter_cfg->requirements = new stdClass();
1654
1655// These are the available filter modes for testcases:
1656$tlCfg->tree_filter_cfg->testcases->execution_mode = new stdClass();
1657$tlCfg->tree_filter_cfg->testcases->edit_mode = new stdClass();
1658$tlCfg->tree_filter_cfg->testcases->plan_mode = new stdClass();
1659$tlCfg->tree_filter_cfg->testcases->plan_add_mode = new stdClass();
1660
1661// If you disable one of these items here, you switch
1662// the complete filter panel off for a specific mode/feature.
1663// You should rather do this here instead of individually disabling all the filters,
1664// if you don't want to have any filters at all for a given feature.
1665$tlCfg->tree_filter_cfg->testcases->execution_mode->show_filters = ENABLED;
1666$tlCfg->tree_filter_cfg->testcases->edit_mode->show_filters = ENABLED;
1667$tlCfg->tree_filter_cfg->testcases->plan_mode->show_filters = ENABLED;
1668$tlCfg->tree_filter_cfg->testcases->plan_add_mode->show_filters = ENABLED;
1669$tlCfg->tree_filter_cfg->requirements->show_filters = ENABLED;
1670
1671// Detailed settings for each mode.
1672// Here, the single filter fields can be disabled if not wanted.
1673// Also, the choice of advanced filter mode can be disabled.
1674$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_tc_id = ENABLED;
1675$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_testcase_name = ENABLED;
1676$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_toplevel_testsuite = ENABLED;
1677$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_keywords = ENABLED;
1678$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_priority = ENABLED;
1679$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_execution_type = ENABLED;
1680$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_assigned_user = ENABLED;
1681$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_custom_fields = ENABLED;
1682$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_result = ENABLED;
1683$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_bugs = ENABLED;
1684$tlCfg->tree_filter_cfg->testcases->execution_mode->advanced_filter_mode_choice = ENABLED;
1685
1686$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_tc_id = ENABLED;
1687$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_testcase_name = ENABLED;
1688$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_toplevel_testsuite = ENABLED;
1689$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_keywords = ENABLED;
1690$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_active_inactive = ENABLED;
1691$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_importance = ENABLED;
1692$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_execution_type = ENABLED;
1693$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_custom_fields = ENABLED;
1694$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_workflow_status = ENABLED;
1695
1696
1697$tlCfg->tree_filter_cfg->testcases->edit_mode->advanced_filter_mode_choice = ENABLED;
1698
1699$tlCfg->tree_filter_cfg->testcases->edit_mode
1700 ->filter_workflow_status_values = array();
1701
1702$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_tc_id = ENABLED;
1703$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_testcase_name = ENABLED;
1704$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_toplevel_testsuite = ENABLED;
1705$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_keywords = ENABLED;
1706$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_priority = ENABLED;
1707$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_execution_type = ENABLED;
1708$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_assigned_user = ENABLED;
1709$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_custom_fields = ENABLED;
1710$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_result = ENABLED;
1711$tlCfg->tree_filter_cfg->testcases->plan_mode->advanced_filter_mode_choice = ENABLED;
1712$tlCfg->tree_filter_cfg->testcases->plan_mode->setting_build_inactive_out = FALSE;
1713$tlCfg->tree_filter_cfg->testcases->plan_mode->setting_build_close_out = FALSE;
1714
1715
1716$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_tc_id = ENABLED;
1717$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_testcase_name = ENABLED;
1718$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_toplevel_testsuite = ENABLED;
1719$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_keywords = ENABLED;
1720$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_active_inactive = ENABLED;
1721$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_importance = ENABLED;
1722$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_execution_type = ENABLED;
1723$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_workflow_status = ENABLED;
1724$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_custom_fields = ENABLED;
1725$tlCfg->tree_filter_cfg->testcases->plan_add_mode->advanced_filter_mode_choice = ENABLED;
1726
1727$tlCfg->tree_filter_cfg->requirements->filter_doc_id = ENABLED;
1728$tlCfg->tree_filter_cfg->requirements->filter_title = ENABLED;
1729$tlCfg->tree_filter_cfg->requirements->filter_status = ENABLED;
1730$tlCfg->tree_filter_cfg->requirements->filter_type = ENABLED;
1731$tlCfg->tree_filter_cfg->requirements->filter_spec_type = ENABLED;
1732$tlCfg->tree_filter_cfg->requirements->filter_coverage = ENABLED;
1733$tlCfg->tree_filter_cfg->requirements->filter_relation = ENABLED;
1734$tlCfg->tree_filter_cfg->requirements->filter_tc_id = ENABLED;
1735$tlCfg->tree_filter_cfg->requirements->filter_custom_fields = ENABLED;
1736$tlCfg->tree_filter_cfg->requirements->advanced_filter_mode_choice = ENABLED;
1737
1738// ENABLED -> Every time the user does some operation on requirement spec,
1739// the tree will be updated on screen. [DEFAULT]
1740// DISABLED -> The tree will not be updated automatically, but the user can update it manually.
1741// On graphical user interface any user will is able to change this setting.
1742$tlCfg->tree_filter_cfg->requirements->automatic_tree_refresh = ENABLED;
1743
1744
1745
1746/* [Assign test cases to test plan] */
1747$tlCfg->tplanDesign->hideTestCaseWithStatusIn = array($tlCfg->testCaseStatus['obsolete'] => 'obsolete',
1748 $tlCfg->testCaseStatus['future'] => 'future' );
1749
1750// ----------------------------------------------------------------------------
1751/* [MISC FUNCTIONALITY] */
1752
1753/** Maximum uploadfile size to importing stuff in TL */
1754// Also check your PHP settings (default is usually 2MBs)
1755// unit BYTES is required by MAX_FILE_SIZE HTML option
1756$tlCfg->import_file_max_size_bytes = '409600';
1757
1758/** Maximum line size of the imported file */
1759$tlCfg->import_max_row = '10000'; // in chars
1760
1761/** Set the default role used for new users */
1762// - created from the login page.
1763// - created using user management features
1764$tlCfg->default_roleid = TL_ROLES_GUEST;
1765
1766// only show custom fields if their value isn't empty
1767$tlCfg->custom_fields->show_custom_fields_without_value = true;
1768
1769/** used to check size in char for TEXT AREA type custom fields */
1770// can not be greater that column definition on DB
1771// 0 => do not check.
1772$tlCfg->custom_fields->max_length = 255;
1773
1774// sizes for HTML INPUTS
1775// for list, multiselection list
1776// - MAXIMUM number of items displayed at once
1777//
1778// for checkbox,radio is useless
1779// Hint: more than 120 produce weird effects on user interface
1780//
1781$tlCfg->custom_fields->sizes = array('string' => 100,
1782 'numeric' => 10,
1783 'float' => 10,
1784 'email' => 100,
1785
1786 'list' => 1,
1787 'multiselection list' => 5,
1788 'text area' => array('rows' => 6, 'cols' => 80),
1789 'script' => 100,
1790 'server' => 100);
1791
1792// Use this variable (on custom_config.inc.php) to define new Custom Field types.
1793// IMPORTANT:
1794// check $custom_field_types property on cfield_mgr.class.php
1795// to avoid overwrite of standard types.
1796//
1797$tlCfg->gui->custom_fields->types = null;
1798
1799// Use this variable (on custom_config.inc.php)
1800// to define possible values behaviour for new Custom Field types.
1801//
1802// IMPORTANT:
1803// check $possible_values_cfg property on cfield_mgr.class.php
1804// to avoid overwrite of standard values.
1805//
1806$tlCfg->gui->custom_fields->possible_values_cfg = null;
1807
1808
1809/**
1810 * Check unique titles of Test Project, Test Suite and Test Case
1811 * ENABLED => Check [STANDARD BEHAVIOUR]
1812 * DISABLED => don't check
1813 **/
1814$tlCfg->check_names_for_duplicates = ENABLED;
1815
1816/**
1817 * Action for duplication check (only if check_names_for_duplicates=ENABLED)
1818 * 'allow_repeat' => allow the name to be repeated (backward compatibility)
1819 * 'generate_new' => generate a new name using $g_prefix_name_for_copy
1820 * 'block' => return with an error
1821 **/
1822$tlCfg->action_on_duplicate_name = 'generate_new';
1823
1824/**
1825 * String checking and conversions
1826 * Allow automatically convert www URLs and email adresses into clickable links
1827 * used by function string_display_links() for example by custom fields.
1828 * Valid values = ENABLED/DISABLED.
1829 **/
1830$tlCfg->html_make_links = ENABLED;
1831
1832/**
1833 * Define the valid html tags for "content driven" single-line and multi-line fields.
1834 * Do NOT include tags with parameters (eg. <font face="arial">), img and href.
1835 * It's used by function string_display_links() for example by custom fields.
1836 */
1837$tlCfg->html_valid_tags = 'p, li, ul, ol, br, pre, i, b, u, em';
1838$tlCfg->html_valid_tags_single_line = 'i, b, u, em';
1839
1840/**
1841 * Defines the threshold values for filtering TC by a priority according to the formula
1842 * LOW => all Tc's with (urgency*importance) < LOW_Threshold
1843 * HIGH => all Tc's with (urgency*importance) >= HIGH_Threshold
1844 * MEDIUM => all Tc's with (urgency*importance) >= LOW_Threshold AND (urgency*importance) < HIGH_Threshold
1845 */
1846$tlCfg->urgencyImportance = new stdClass();
1847$tlCfg->urgencyImportance->threshold['low'] = 3;
1848$tlCfg->urgencyImportance->threshold['high'] = 6;
1849
1850/**
1851 * @var boolean Demo mode disables some functionality
1852 * user edit disable
1853 * role create ENABLED
1854 * user create ENABLED
1855 * special users manage DISABLE
1856 */
1857$tlCfg->demoMode = OFF;
1858$tlCfg->demoSpecialUsers = array('admin');
1859
1860/**
1861 * If enabled, every Ext JS table in TestLink will offer an export button,
1862 * which generates a file with the contents of the table.
1863 * ATTENTION: This feature is fully experimental. Enable at your own risk!
1864 * Enabling it can cause broken tables.
1865 */
1866$tlCfg->enableTableExportButton = DISABLED;
1867
1868
1869/**
1870 * Taken from Mantis to implement better login security, and solve
1871 * TICKET 4342
1872 */
1873$tlCfg->auth_cookie = "TESTLINK_USER_AUTH_COOKIE";
1874
1875/**
1876Used when creating a Test Suite using copy
1877and you have choose $g_action_on_duplicate_name = 'generate_new'
1878if the name exist.
1879*/
1880$g_prefix_name_for_copy = strftime("%Y%m%d-%H:%M:%S", time());
1881
1882// name of your custom.css, place it in same folder that standard TL css
1883// null or '' => do not use
1884$tlCfg->custom_css = null;
1885
1886
1887/**
1888 * Configurable templates this can help if you want to use a non standard template.
1889 * i.e. you want to develop a new one without loosing the original template.
1890 * key: original TL template name WITHOUT extension
1891 * value: whatever name you want, only constrain you have to copy your template
1892 * ON SAME FOLDER where original template is.
1893 * See example below
1894 */
1895$g_tpl = array();
1896
1897// Example
1898// $g_tpl = array('tcView' => 'custom_tcView.tpl',
1899// 'tcSearchView' => 'myOwnTCSearchView.tpl',
1900// 'tcEdit' => 'tcEdit_ultraCool.tpl');
1901
1902// ----------------------------------------------------------------------------
1903/* [PROXY] */
1904/* Used only */
1905/* mantissoapInterface.class.php */
1906/* jirasoapInterface.class.php */
1907/* jirarestInterface.class.php */
1908$tlCfg->proxy->host = null;
1909$tlCfg->proxy->port = null;
1910$tlCfg->proxy->login = null;
1911$tlCfg->proxy->password = null;
1912
1913
1914/** Plugins feature */
1915define('TL_PLUGIN_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR);
1916
1917// ----- End of Config ------------------------------------------------------------------
1918// --------------------------------------------------------------------------------------
1919// DO NOT CHANGE NOTHING BELOW
1920// --------------------------------------------------------------------------------------
1921
1922/** Functions for check request status */
1923require_once('configCheck.php');
1924
1925clearstatcache();
1926if ( file_exists( TL_ABS_PATH . 'custom_config.inc.php' ) )
1927{
1928 require_once( TL_ABS_PATH . 'custom_config.inc.php' );
1929}
1930
1931/** root of testlink directory location seen through the web server */
1932/* 20070106 - franciscom - this statement it's not 100% right
1933 better use $_SESSION['basehref'] in the scripts. */
1934define('TL_BASE_HREF', get_home_url(array('force_https' => $tlCfg->force_https)));
1935
1936
1937if( !isset($g_attachments->access_icon) )
1938{
1939 $g_attachments->access_icon = '<img src="' . $tlCfg->theme_dir . 'images/new_f2_16.png" style="border:none" />';
1940}
1941
1942
1943// Important to do this only after custom_* to use (if exists) redefinition of
1944// $tlCfg->results['status_label_for_exec_ui']
1945$tlCfg->reportsCfg->exec_status = $tlCfg->results['status_label_for_exec_ui'];
1946
1947
1948/** Support for localization */
1949// @TODO schlundus, move the code out of config and do it only once and not always in any include!
1950// @TODO schlundus, a better parsing function should be include
1951$serverLanguage = false;
1952if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
1953{
1954 @list($code) = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
1955 @list($a,$b) = explode("-",$code);
1956 if ($a && $b)
1957 {
1958 $a = strtolower($a);
1959 $b = strtoupper($a);
1960 $serverLanguage = $a."_".$b;
1961 }
1962}
1963
1964if(false !== $serverLanguage)
1965{
1966 if (array_key_exists($serverLanguage,$tlCfg->locales))
1967 {
1968 $tlCfg->default_language = $serverLanguage;
1969 }
1970}
1971define ('TL_DEFAULT_LOCALE', $tlCfg->default_language);
1972
1973// Reverted execution status is used for two applications.
1974// 1. To map code to CSS, Please if you add an status you need to add a corresponding CSS Class
1975// in the CSS files (see the gui directory)
1976// 2. to decode from code to some more human oriented to use in code
1977//
1978/** Revered list of Test Case execution results */
1979$tlCfg->results['code_status'] = array_flip($tlCfg->results['status_code']);
1980
1981// Enable CSRF global protection
1982$tlCfg->csrf_filter_enabled = TRUE;
1983
1984// --------------------------------------------------------------------------------------
1985/** Converted and derived variables (Users should not modify this section) */
1986define('REFRESH_SPEC_TREE',$tlCfg->spec_cfg->automatic_tree_refresh ? 1 : 0);
1987define('TL_SORT_TABLE_ENGINE',$g_sort_table_engine);
1988define("TL_REPOSITORY_MAXFILESIZE", 1024*1024*$tlCfg->repository_max_filesize);
1989
1990define('TL_XMLEXPORT_HEADER', "<?xml version=\"1.0\" encoding=\"" . $tlCfg->charset . "\"?>\n");
1991
1992define('TL_THEME_BASE_DIR', $tlCfg->theme_dir);
1993define('TL_THEME_IMG_DIR', $tlCfg->theme_dir . 'images/');
1994define('TL_THEME_CSS_DIR', $tlCfg->theme_dir . 'css/');
1995define('TL_TESTLINK_CSS', TL_THEME_CSS_DIR . TL_CSS_MAIN);
1996define('TL_PRINT_CSS', TL_THEME_CSS_DIR . TL_CSS_PRINT);
1997define('TL_TREEMENU_CSS', TL_THEME_CSS_DIR . TL_CSS_TREEMENU);
1998
1999// if you do not want to use this, redefine $tlCfg->custom_css as '' or null
2000define('TL_TESTLINK_CUSTOM_CSS', TL_THEME_CSS_DIR . $tlCfg->custom_css);
2001
2002
2003// --------------------------------------------------------------------------------------
2004// when a role is deleted, a new role must be assigned to all users
2005// having role to be deleted
2006// A right choice seems to be using $g_default_roleid.
2007// You can change this adding a config line in custom_config.inc.php
2008// @TODO martin: remove - use directly $tlCfg->default_roleid;
2009$g_role_replace_for_deleted_roles = $tlCfg->default_roleid;
2010
2011
2012/**
2013 * Using "|" in the testsuite name causes malformed URLs
2014 * regexp used to check for chars not allowed in:
2015 * test project, test suite and testcase names.
2016 * @TODO martin: encode harm characters @see http://cz.php.net/urlencode (and remove the parameter)
2017 *
2018 * now is preg pattern
2019 */
2020$g_ereg_forbidden = "/[|]/i";
2021
2022
2023
2024/**
2025 * @TODO remove from TL - unfinished refactorization;
2026 * use $tlCfg instead of old variables and constants
2027 */
2028define('TL_IMPORT_ROW_MAX', $tlCfg->import_max_row);
2029define('TL_TPL_CHARSET', $tlCfg->charset);
2030define('TITLE_SEP',$tlCfg->gui_title_separator_1);
2031define('TITLE_SEP_TYPE2',$tlCfg->gui_title_separator_2);
2032define('TITLE_SEP_TYPE3',$tlCfg->gui_title_separator_2); // obsolete: use type 1,2
2033define('TL_FRMWORKAREA_LEFT_FRAME_WIDTH', $tlCfg->frame_workarea_default_width);
2034define('TL_TEMP_PATH', $tlCfg->temp_dir);
2035
2036$tlCfg->gui->title_separator_1 = $tlCfg->gui_title_separator_1;
2037$tlCfg->gui->title_separator_2 = $tlCfg->gui_title_separator_2;
2038$tlCfg->gui->role_separator_open = $tlCfg->gui_separator_open;
2039$tlCfg->gui->role_separator_close = $tlCfg->gui_separator_close;
2040
2041
2042/**
2043 * Globals for Events storage
2044 */
2045$g_event_cache = array();
2046
2047/**
2048 * Globals for Plugins
2049 */
2050$g_plugin_config_cache = array();
2051
2052/** ----- END OF FILE --------------------------------------------------------------------
2053 * Note: Use this option to check if a bug interface is enabled, if so every
2054 * page using bug tracking MUST include int_bugtracking.php to make the
2055 * connection. The variable bugInterfaceOn is only set when a connection is made
2056 *
2057 * @var string $g_interface_bugs = [
2058 * 'NO' : no bug tracking system integration (DEFAULT)
2059 * 'BUGZILLA' : edit configuration in TL_ABS_PATH/cfg/bugzilla.cfg.php
2060 * 'MANTIS' : edit configuration in TL_ABS_PATH/cfg/mantis.cfg.php
2061 * 'JIRA' : edit configuration in TL_ABS_PATH/cfg/jira.cfg.php
2062 * 'JIRASOAP' : edit configuration in TL_ABS_PATH/cfg/jira.cfg.php
2063 * 'TRACKPLUS' : edit configuration in TL_ABS_PATH/cfg/trackplus.cfg.php
2064 * 'EVENTUM' : edit configuration in TL_ABS_PATH/cfg/eventum.cfg.php
2065 * 'SEAPINE' : edit configuration in TL_ABS_PATH/cfg/seapine.cfg.php
2066 * 'GFORGE' : edit configuration in TL_ABS_PATH/cfg/gforge.cfg.php
2067 * 'FOGBUGZ' : edit configuration in TL_ABS_PATH/cfg/fogbugz.cfg.php
2068 * 'YOUTRACK' : edit configuration in TL_ABS_PATH/cfg/youtrack.cfg.php
2069 * 'POLARION' : edit configuration in TL_ABS_PATH/cfg/polarion.cfg.php
2070 * $g_interface_bugs = 'JIRA';
2071 * ]
2072 */
2073$g_interface_bugs = 'NO';
2074
2075// do not change this
2076$g_bugInterfaceOn = false;
2077$g_bugInterface = null;
2078
2079
2080// ----------------------------------------------------------------------------
2081/* [SMTP] */
2082
2083/**
2084 * @var string SMTP server name or IP address ("localhost" should work in the most cases)
2085 * Configure using custom_config.inc.php
2086 * @uses lib/functions/email_api.php
2087 */
2088$g_smtp_host = 'mail.stc'; # SMTP server MUST BE configured
2089
2090# Configure using custom_config.inc.php
2091$g_tl_admin_email = 'dovlad@speechpro.com'; # for problem/error notification
2092$g_from_email = 'testlink@mail.stc'; # email sender
2093$g_return_path_email = 'dovlad@speechpro.com';
2094
2095/**
2096 * Email notification priority (low by default)
2097 * Urgent = 1, Not Urgent = 5, Disable = 0
2098 **/
2099$g_mail_priority = 5;
2100
2101/**
2102 * Taken from mantis for phpmailer config
2103 * select the method to mail by:
2104 * PHPMAILER_METHOD_MAIL - mail()
2105 * PHPMAILER_METHOD_SENDMAIL - sendmail
2106 * PHPMAILER_METHOD_SMTP - SMTP
2107 */
2108$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
2109
2110/** Configure only if SMTP server requires authentication */
2111$g_smtp_username = ''; # user
2112$g_smtp_password = ''; # password
2113
2114/**
2115 * This control the connection mode to SMTP server.
2116 * Can be '', 'ssl','tls'
2117 * @global string $g_smtp_connection_mode
2118 */
2119$g_smtp_connection_mode = '';
2120
2121/**
2122 * The smtp port to use. The typical SMTP ports are 25 and 587. The port to use
2123 * will depend on the SMTP server configuration and hence others may be used.
2124 * @global int $g_smtp_port
2125 */
2126$g_smtp_port = 25;
2127
2128
2129// ----------------------------------------------------------------------------
2130/* [User Authentication] */
2131
2132/**
2133 * Login authentication method:
2134 * 'MD5' => use password stored on db
2135 * 'LDAP' => use password from LDAP Server
2136 */
2137$tlCfg->authentication['method'] = 'LDAP';
2138
2139/** LDAP authentication credentials */
2140$tlCfg->authentication['ldap_server'] = 'dc1.stc dc2.stc';
2141$tlCfg->authentication['ldap_port'] = '389';
2142$tlCfg->authentication['ldap_version'] = '3'; // could be '2' in some cases
2143$tlCfg->authentication['ldap_root_dn'] = 'cn=Users,dc=speechpro,dc=com';
2144$tlCfg->authentication['ldap_organization'] = ''; // e.g. '(organizationname=*Traffic)'
2145$tlCfg->authentication['ldap_uid_field'] = 'sAMAccountName'; // Use 'sAMAccountName' for Active Directory
2146$tlCfg->authentication['ldap_bind_dn'] = ''; // Left empty for anonymous LDAP binding
2147$tlCfg->authentication['ldap_bind_passwd'] = ''; // Left empty for anonymous LDAP binding
2148$tlCfg->authentication['ldap_tls'] = false; // true -> use tls
2149
2150/** Enable/disable Users to create accounts on login page */
2151$tlCfg->user_self_signup = TRUE;
2152
2153/** What happens when Administrator push the Reset Password Button
2154 'send_password_by_mail'
2155 'display_on_screen'
2156*/
2157$tlCfg->password_reset_send_method = 'send_password_by_mail';
2158
2159/** Validating new user login names */
2160$tlCfg->validation_cfg->user_login_valid_regex='/^[\w \- .]+$/';
2161
2162/**
2163 * Validating user email addresses
2164 * Example of other possibilities:
2165 * <code>
2166 * $regex = "/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*" .
2167 * "@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i";
2168 * $regex = "/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/";
2169 * </code>
2170 **/
2171//
2172// This expression does not allow Top Level Domian (last part of domain name) longer than 4
2173// If you need to change this
2174// Configure this on custom_config.inc.php
2175$tlCfg->validation_cfg->user_email_valid_regex_js = "/^(\w+)([-+.][\w]+)*@(\w[-\w]*\.){1,5}([A-Za-z]){2,4}$/";
2176$tlCfg->validation_cfg->user_email_valid_regex_php = "/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/U";
2177
2178
2179// --------------------------------------------------------------------------------------
2180/* [API] */
2181
2182/** XML-RPC API availability (disabled by default) */
2183$tlCfg->api->enabled = FALSE;
2184
2185// used to display API ID info in the *View pages
2186$tlCfg->api->id_format = "[ID: %s ]";
2187
2188
2189// --------------------------------------------------------------------------------------
2190/* [GUI LAYOUT] */
2191
2192/** GUI themes (base for CSS and images)- modify if you create own one */
2193$tlCfg->theme_dir = 'gui/themes/default/';
2194
2195/** Dir for compiled templates */
2196$tlCfg->temp_dir = TL_ABS_PATH . 'gui' . DIRECTORY_SEPARATOR . 'templates_c' . DIRECTORY_SEPARATOR;
2197
2198/** Company logo (used by navigation bar and login page page) */
2199//$tlCfg->company_logo = '<img alt="TestLink" title="TestLink" style="width: 115px; height: 53px;" src="' .
2200// $tlCfg->theme_dir . 'images/company_logo.png" />';
2201$tlCfg->company_logo = 'company_logo.png';
2202
2203/** Login page could show an informational text */
2204$tlCfg->login_info = ''; // Empty by default
2205
2206/**
2207 * @var string Availability of Test Project specific background colour
2208 * 'background' -> standard behaviour for 1.6.x you can have a different
2209 * background colour for every test project.
2210 * 'none' -> new behaviour no background color change
2211 */
2212$tlCfg->gui->testproject_coloring = 'none'; // I'm sorry default is not coloring using coloring is a pain
2213 // and useless
2214/** @TODO havlatm4francisco Ok, then merge these two attributes into one */
2215/** default background color */
2216$tlCfg->gui->background_color = '#9BD';
2217
2218// ENABLED: on features that assign user role to test projects and test plan, colour user name
2219// according GLOBAL role
2220// DISABLED: do not color [STANDARD BEHAVIOUR]
2221$tlCfg->gui->usersAssignGlobalRoleColoring = DISABLED;
2222
2223
2224// Enable/disable rounded corners via javascript
2225$tlCfg->gui->round_corners = new stdClass();
2226$tlCfg->gui->round_corners->exec_history = ENABLED;
2227$tlCfg->gui->round_corners->tc_title = ENABLED;
2228$tlCfg->gui->round_corners->tc_spec = ENABLED;
2229
2230/**
2231 * Display name definition (used to build a human readable display name for users)
2232 * Example of values:
2233 * '%first% %last%' -> John Cook
2234 * '%last%, %first%' -> Cook John
2235 * '%first% %last% %login%' -> John Cook [ux555]
2236 **/
2237$tlCfg->username_format = '%login%';
2238
2239/** Configure the frame frmWorkArea navigator width */
2240$tlCfg->frame_workarea_default_width = "30%";
2241
2242/** true => icon edit will be added into <a href> as indication an edit features */
2243$tlCfg->gui->show_icon_edit = false;
2244
2245/**
2246 * Order to use when building a testproject combobox (value must be SQL compliant)
2247 * For example:
2248 * 'ORDER BY name'
2249 * 'ORDER_BY nodes_hierarchy.id DESC' -> similar effect to order last created firts
2250 **/
2251$tlCfg->gui->tprojects_combo_order_by = 'ORDER BY nodes_hierarchy.id DESC';
2252
2253/** Configure the input size of test case search by id on navigation bar.
2254 * This value will be added to the length of the prefix to dynamically set input size.
2255 * Example: prefix is "projectA-" -> length of prefix is 9
2256 * Now the here defined value (default: 6) will be added to the prefix length
2257 * -> Input field will have an input size of 15
2258 **/
2259$tlCfg->gui->dynamic_quick_tcase_search_input_size = 6;
2260
2261// used to round percentages on metricsDashboard.php
2262$tlCfg->dashboard_precision = 2;
2263
2264/**
2265 * Choose what kind of webeditor you want to use in every TL area. This configuration
2266 * will be used if no element with search key (area) is found on this structure.
2267 * Every element is a mp with this configuration keys:
2268 *
2269 * 'type':
2270 * 'fckeditor'
2271 * 'tinymce'
2272 * 'none' -> use plain text area input field
2273 * 'toolbar': only applicable for type = 'fckeditor'
2274 * name of ToolbarSet (See: http://docs.fckeditor.net/ for more information about ToolbarSets)
2275 * TestLink stores own definitions in <testlink_dir>/cfg/tl_fckeditor_config.js
2276 * 'configFile': only applicable for type = 'fckeditor'
2277 * See: http://docs.fckeditor.net/ for more information about CustomConfigurationsPath
2278 * 'height': the height in px for FCKEditor
2279 * 'width': the width in px for FCKEditor
2280 * 'cols': the number of cols for tinymce and none
2281 * 'rows': the number of rows for tinymce and none
2282 *
2283 * The next keys/areas are supported:
2284 * 'all' (default setting),
2285 * 'design', 'steps_design', 'testplan', 'build', 'testproject', 'role', 'requirement', 'requirement_spec'.
2286 *
2287 * Examples:
2288 * <code>
2289 * // Copy this to custom_config.inc.php if you want use 'tinymce' as default.
2290 * $tlCfg->gui->text_editor['all'] = array( 'type' => 'tinymce');
2291 * // Copy this to custom_config.inc.php if you want use 'nome' as default.
2292 * $tlCfg->gui->text_editor['all'] = array( 'type' => 'none');
2293 * //This configuration is useful only if default type is set to 'fckeditor'
2294 * $tlCfg->gui->text_editor['design'] = array('toolbar' => 'tl_mini');
2295 *
2296 * $tlCfg->gui->text_editor['testplan'] = array( 'type' => 'none');
2297 * $tlCfg->gui->text_editor['build'] = array( 'type' => 'fckeditor','toolbar' => 'tl_mini');
2298 * $tlCfg->gui->text_editor['testproject'] = array( 'type' => 'tinymce');
2299 * $tlCfg->gui->text_editor['role'] = array( 'type' => 'tinymce');
2300 * $tlCfg->gui->text_editor['requirement'] = array( 'type' => 'none');
2301 * $tlCfg->gui->text_editor['requirement_spec'] = array( 'type' => 'none');
2302 * </code>
2303 *
2304 * Hint: After doing configuration changes, clean you Browser's cookies and cache
2305 */
2306$tlCfg->gui->text_editor = array();
2307$tlCfg->gui->text_editor['all'] = array('type' => 'fckeditor',
2308 'toolbar' => 'full',
2309 'configFile' => 'cfg/tl_fckeditor_config.js',);
2310$tlCfg->gui->text_editor['execution'] = array( 'type' => 'none');
2311
2312/** User can choose order of menu areas */
2313$tlCfg->gui->layoutMainPageLeft = array( 'testProject' => 1, 'userAdministration' => 2 ,
2314 'requirements' => 3, 'testSpecification' => 4,
2315 'general' => 5);
2316$tlCfg->gui->layoutMainPageRight = array( 'testPlan' => 1, 'testExecution' => 2 ,
2317 'testPlanContents' => 3);
2318
2319/**
2320 * Enable warning on a changed content before an user leave a page.
2321 *
2322 * Tested in:
2323 * - IE8 OK
2324 * - Firefox 3 OK
2325 * - Chrome FAIL
2326 *
2327 * Does not work in Webkit browsers (Chrome, Safari) when using frames.
2328 * Bug in webkit: https://bugs.webkit.org/show_bug.cgi?id=19418
2329 */
2330
2331// franciscom -
2332// BUGID 0003275 + post on forum: // http://www.teamst.org/phpBB2/viewtopic.php?t=3075
2333// seems that with config options that will be used on javascript via smarty template variables
2334// we are having problems using FALSE/TRUE => use 0/1 (or our CONSTANT DISABLED/ENABLED)
2335$tlCfg->gui->checkNotSaved = ENABLED;
2336
2337
2338// ----------------------------------------------------------------------------
2339/* [GUI: TREE] */
2340
2341/** Default ordering value for new Test Suites and Test Cases to separate them */
2342$tlCfg->treemenu_default_testsuite_order = 1;
2343$tlCfg->treemenu_default_testcase_order = 100;
2344
2345/** show/hide testcase id on tree menu */
2346$tlCfg->treemenu_show_testcase_id = TRUE;
2347
2348/** Reorder test cases based on TC Name or External ID in tree on
2349 * test suite level using reorder button
2350 */
2351// 'EXTERNAL_ID' -> Sort on Test Case External ID field displayed on tree.(Default)
2352// 'NAME' -> Sort on Test Case Name field
2353
2354$tlCfg->testcase_reorder_by = 'EXTERNAL_ID';
2355// $tlCfg->testcase_reorder_by = 'NAME';
2356
2357// ----------------------------------------------------------------------------
2358/* [GUI: Javascript libraries] */
2359
2360// May be in future another table sort engine will be better
2361// kryogenix.org -> Stuart Langridge sortTable
2362// '' (empty string) -> disable table sorting feature
2363$g_sort_table_engine='kryogenix.org';
2364
2365
2366// --------------------------------------------------------------------------------------
2367/* [Reports] */
2368$tlCfg->reportsCfg=new stdClass();
2369
2370/** @TODO unfinished changes by Francisco? */
2371//Displayed execution statuses to use on reports (ordered). */
2372$tlCfg->reportsCfg->exec_status = $tlCfg->results['status_label_for_exec_ui'];
2373
2374/**
2375 * Default Offset in seconds for reporting start date (reports with date range)
2376 * @uses lib/results/resultsMoreBuilds.php
2377 */
2378$tlCfg->reportsCfg->start_date_offset = (7*24*60*60); // one week
2379
2380// minutes part is ignored but must be configured.
2381// Hint: set always to :00
2382$tlCfg->reportsCfg->start_time = '00:00';
2383
2384// Result matrix (resultsTC.php)
2385// Shows an extra column which gives the status of the last executed build
2386$tlCfg->resultMatrixReport->buildColumns['showStatusLastExecuted'] = true;
2387
2388// Show build columns in revers order. The latest build is to the left
2389$tlCfg->resultMatrixReport->buildColumns['latestBuildOnLeft'] = false;
2390
2391// Show all available status details for test plans on metrics dashboard
2392$tlCfg->metrics_dashboard = new stdClass();
2393$tlCfg->metrics_dashboard->show_test_plan_status = false;
2394
2395
2396// ----------------------------------------------------------------------------
2397/* [GENERATED DOCUMENTATION] */
2398
2399/**
2400 * Texts and settings for printed documents
2401 * Image is expected in directory <testlink_root>/gui/themes/<your_theme>/images/
2402 * Leave text values empty if you would like to hide parameters.
2403 */
2404$tlCfg->document_generator->company_name = 'TestLink Community [configure $tlCfg->document_generator->company_name]';
2405$tlCfg->document_generator->company_copyright = '2009 © TestLink Community';
2406$tlCfg->document_generator->confidential_msg = '';
2407
2408// Logo for generated documents
2409$tlCfg->document_generator->company_logo = 'company_logo.png';
2410$tlCfg->document_generator->company_logo_height = '53';
2411
2412/** CSS used in printed html documents */
2413
2414// BUGID 3424
2415// $tlCfg->document_generator->css_template = $tlCfg->theme_dir . 'css/tl_documents.css';
2416// CSS file for Test Specification Document, Test Plan Report, Test Report and Test Case Print View
2417$tlCfg->document_generator->css_template = 'css/tl_documents.css';
2418
2419// CSS file for Requirement Specification Document, Requirement and Requirement Spec Print View
2420$tlCfg->document_generator->requirement_css_template = 'css/tl_documents.css';
2421
2422/** Misc settings */
2423// Display test case version when creating test spec document
2424$tlCfg->document_generator->tc_version_enabled = FALSE;
2425
2426
2427
2428// ----------------------------------------------------------------------------
2429/* [Test Executions] */
2430
2431// ENABLED -> enable XML-RPC calls to external test automation server
2432// new buttons will be displayed on execution pages
2433// DISABLED -> disable
2434$tlCfg->exec_cfg->enable_test_automation = DISABLED;
2435
2436// 1 -> user can edit execution notes, on old executions (Attention: user must have test case execution right)
2437// DISABLED -> no edit allowed [STANDARD BEHAVIOUR]
2438$tlCfg->exec_cfg->edit_notes = DISABLED;
2439
2440// ASCending -> last execution at bottom
2441// DESCending -> last execution on top [STANDARD BEHAVIOUR]
2442$tlCfg->exec_cfg->history_order = 'DESC';
2443
2444// TRUE -> the whole execution history for the choosen build will be showed
2445// FALSE -> just last execution for the choosen build will be showed [STANDARD BEHAVIOUR]
2446$tlCfg->exec_cfg->history_on = FALSE;
2447
2448// TRUE -> test case VERY LAST (i.e. in any build) execution status will be displayed [STANDARD BEHAVIOUR]
2449// FALSE -> only last result on current build.
2450$tlCfg->exec_cfg->show_last_exec_any_build = TRUE;
2451
2452// TRUE -> History for all builds will be shown
2453// FALSE -> Only history of the current build will be shown [STANDARD BEHAVIOUR]
2454$tlCfg->exec_cfg->show_history_all_builds = FALSE;
2455
2456// TRUE -> History for all platforms (if any exists for test plan) will be shown
2457// FALSE -> Only history of the current platform will be shown [STANDARD BEHAVIOUR]
2458$tlCfg->exec_cfg->show_history_all_platforms = FALSE;
2459
2460// different models for the attachments management on execution page
2461// $att_model_m1 -> shows upload button and title
2462// $att_model_m2 -> hides upload button and title
2463$tlCfg->exec_cfg->att_model = $att_model_m2; //defined in const.inc.php
2464
2465// ENABLED -> User can delete an execution result
2466// DISABLED -> User can not. [STANDARD BEHAVIOUR]
2467$tlCfg->exec_cfg->can_delete_execution = DISABLED;
2468
2469// ENABLED -> test cases will be coloured according to test case status
2470$tlCfg->exec_cfg->enable_tree_testcases_colouring = ENABLED;
2471
2472// ENABLED -> test cases will be coloured according to execution status on build selected for execution
2473// DISABLED -> test cases will be coloured according status on latest execution regardless of selected build
2474// see http://mantis.testlink.org/view.php?id=3450 for more details
2475$tlCfg->exec_cfg->testcases_colouring_by_selected_build = ENABLED;
2476
2477// ENABLED -> test case counters will be coloured according to test case status
2478$tlCfg->exec_cfg->enable_tree_counters_colouring = ENABLED;
2479
2480
2481// 20080303 - franciscom
2482// This can help to avoid performance problems.
2483// Controls what happens on right frame when user clicks on a testsuite on tree.
2484// ENABLED -> show all test cases presents on test suite and children test suite.
2485// DISABLED -> nothing happens, to execute a test case you need to click on test case
2486$tlCfg->exec_cfg->show_testsuite_contents = DISABLED;
2487
2488// ENABLED -> enable testcase counters by status on tree
2489$tlCfg->exec_cfg->enable_tree_testcase_counters = ENABLED;
2490
2491
2492// Define list of roles that are affected by:
2493// $tlCfg->exec_cfg->view_mode and $tlCfg->exec_cfg->exec_mode
2494// User must reconfigure if define other simple tester roles
2495//
2496// In addition (till code changes) also roles that verify this condition:
2497// $effective_role->hasRight('testplan_execute') and !$effective_role->hasRight('testplan_planning')
2498// Will be affected by:
2499// $tlCfg->exec_cfg->view_mode and $tlCfg->exec_cfg->exec_mode
2500//
2501$tlCfg->exec_cfg->simple_tester_roles=array(TL_ROLES_TESTER);
2502
2503// Filter Test cases a user with tester role can VIEW depending on
2504// test execution assignment.
2505// all: all test cases.
2506// assigned_to_me: test cases assigned to logged user.
2507// assigned_to_me_or_free: test cases assigned to logged user or not assigned
2508$tlCfg->exec_cfg->view_mode->tester='assigned_to_me';
2509
2510// Filter Test cases a user with tester role can EXECUTE depending on
2511// test execution assignment.
2512// all: all test cases.
2513// assigned_to_me: test cases assigned to logged user.
2514// assigned_to_me_or_free: test cases assigned to logged user or not assigned
2515$tlCfg->exec_cfg->exec_mode->tester='assigned_to_me';
2516
2517/** User filter in Test Execution navigator - default value */
2518// logged_user -> combo will be set to logged user
2519// none -> no filter applied by default
2520$tlCfg->exec_cfg->user_filter_default='none';
2521
2522
2523// 'horizontal' -> step and results on the same row
2524// 'vertical' -> steps on one row, results in the row bellow
2525$tlCfg->exec_cfg->steps_results_layout = 'horizontal';
2526
2527
2528// Parameters to show notes/details when entering test execution feature
2529// EXPAND: show expanded/open
2530// COLLAPSE: show collapsed/closede
2531// LAST_USER_CHOICE: get status from cookie that holds last user choice.[STANDARD BEHAVIOUR]
2532$tlCfg->exec_cfg->expand_collapse = new stdClass();
2533$tlCfg->exec_cfg->expand_collapse->testplan_notes = LAST_USER_CHOICE;
2534$tlCfg->exec_cfg->expand_collapse->platform_description = LAST_USER_CHOICE;
2535$tlCfg->exec_cfg->expand_collapse->build_description = LAST_USER_CHOICE;
2536$tlCfg->exec_cfg->expand_collapse->testsuite_details = LAST_USER_CHOICE;
2537
2538
2539// ----------------------------------------------------------------------------
2540/* [Test Specification] */
2541
2542// 'horizontal' -> step and results on the same row
2543// 'vertical' -> steps on one row, results in the row bellow
2544$tlCfg->spec_cfg->steps_results_layout = 'horizontal';
2545
2546
2547// ENABLED -> User will see a test suite filter while creating test specification
2548// DISABLED -> no filter available
2549// $g_spec_cfg->show_tsuite_filter = ENABLED;
2550$tlCfg->spec_cfg->show_tsuite_filter = ENABLED;
2551
2552// ENABLED -> every time user do some operation on test specification
2553// tree is updated on screen.
2554// DISABLED -> tree will not be updated, user can update it manually.
2555// Anyway on user interface user will be able to change this choice
2556// $g_spec_cfg->automatic_tree_refresh = ENABLED;
2557$tlCfg->spec_cfg->automatic_tree_refresh = ENABLED;
2558
2559
2560// ENABLED -> user can edit executed tc versions
2561// DISABLED -> editing of executed tc versions is blocked. [STANDARD BEHAVIOUR]
2562$tlCfg->testcase_cfg->can_edit_executed = DISABLED;
2563
2564// ENABLED -> user can removed from a testplan executed tc versions. [STANDARD BEHAVIOUR]
2565// DISABLED -> user can NOT remove from a testplan executed tc versions.
2566$tlCfg->testcase_cfg->can_remove_executed = ENABLED;
2567
2568
2569// ENABLED -> user can DELETE a TEST CASE that has been executed.
2570// DISABLED -> [STANDARD BEHAVIOUR]
2571// IMPORTANT: this is valid for any role => admin is also under this law.
2572$tlCfg->testcase_cfg->can_delete_executed = DISABLED;
2573
2574
2575// To avoid perfomance problems on search test case feature,
2576// we can decide when to inform user that results can not be displayed
2577// due to too many results.
2578$tlCfg->testcase_cfg->search=new stdClass();
2579$tlCfg->testcase_cfg->search->max_qty_for_display=200;
2580
2581
2582$tlCfg->testcase_cfg->duplicated_name_algorithm = new stdClass();
2583// 'stringPrefix' => use duplicated_name_algorithm->text
2584// 'counterSuffix' => creare name as :
2585// test case title + (number of existent test cases +1)
2586// example: My Test Title 2
2587// duplicated_name_algorithm->text is used as sprintf format mask
2588$tlCfg->testcase_cfg->duplicated_name_algorithm->type = 'stringPrefix';
2589$tlCfg->testcase_cfg->duplicated_name_algorithm->text = strftime("%Y%m%d-%H:%M:%S", time());
2590// $tlCfg->testcase_cfg->duplicated_name_algorithm->type = 'counterSuffix';
2591// $tlCfg->testcase_cfg->duplicated_name_algorithm->text = " (%s)";
2592
2593
2594/** text template for a new items:
2595 Test Case: summary, steps, expected_results, preconditions
2596
2597*/
2598// object members has SAME NAME that FCK editor objects.
2599// the logic present on tcEdit.php is dependent of this rule.
2600// every text object contains an object with following members: type and value
2601//
2602// Possible values for type member:
2603// none: template will not be used, default will be a clean editor screen.
2604//
2605// string: value of value member is assigned to FCK object
2606// string_id: value member is used in a lang_get() call, and return value
2607// is assigned to FCK object. Configure string_id on custom_strings.txt
2608// file: value member is used as file name.
2609// file is readed and it's contains assigned to FCK object
2610//
2611// any other value for type, results on '' assigned to FCK object
2612
2613$tlCfg->testcase_template = new stdClass();
2614
2615$tlCfg->testcase_template->summary = new stdClass();
2616$tlCfg->testcase_template->summary->type = 'none';
2617$tlCfg->testcase_template->summary->value = '';
2618
2619$tlCfg->testcase_template->steps = new stdClass();
2620$tlCfg->testcase_template->steps->type = 'none';
2621$tlCfg->testcase_template->steps->value = '';
2622
2623$tlCfg->testcase_template->expected_results = new stdClass();
2624$tlCfg->testcase_template->expected_results->type = 'none';
2625$tlCfg->testcase_template->expected_results->value = '';
2626
2627$tlCfg->testcase_template->preconditions = new stdClass();
2628$tlCfg->testcase_template->preconditions->type = 'none';
2629$tlCfg->testcase_template->preconditions->value = '';
2630
2631
2632/** text template for a new Test Suite description */
2633$tlCfg->testsuite_template = new stdClass();
2634$tlCfg->testsuite_template->details = new stdClass();
2635$tlCfg->testsuite_template->details->type = 'none';
2636$tlCfg->testsuite_template->details->value = '';
2637
2638
2639// Contribution - Julian (Refactore)
2640// BUGID 0002968,0002961,0002962,0002963
2641$tlCfg->project_template = new stdClass();
2642$tlCfg->project_template->notes = new stdClass();
2643$tlCfg->project_template->notes->type = 'none';
2644$tlCfg->project_template->notes->value = '';
2645
2646$tlCfg->testplan_template = new stdClass();
2647$tlCfg->testplan_template->notes = new stdClass();
2648$tlCfg->testplan_template->notes->type = 'none';
2649$tlCfg->testplan_template->notes->value = '';
2650
2651$tlCfg->execution_template = new stdClass();
2652$tlCfg->execution_template->bulk_exec_notes = new stdClass();
2653$tlCfg->execution_template->bulk_exec_notes->type = 'none';
2654$tlCfg->execution_template->bulk_exec_notes->value = '';
2655
2656$tlCfg->execution_template->notes = new stdClass();
2657$tlCfg->execution_template->notes->type = 'none';
2658$tlCfg->execution_template->notes->value = '';
2659
2660$tlCfg->build_template = new stdClass();
2661$tlCfg->build_template->notes = new stdClass();
2662$tlCfg->build_template->notes->type = 'none';
2663$tlCfg->build_template->notes->value = '';
2664
2665$tlCfg->requirement_template = new stdClass();
2666$tlCfg->requirement_template->scope = new stdClass();
2667$tlCfg->requirement_template->scope->type = 'none';
2668$tlCfg->requirement_template->scope->value = '';
2669
2670$tlCfg->req_spec_template = new stdClass();
2671$tlCfg->req_spec_template->scope = new stdClass();
2672$tlCfg->req_spec_template->scope->type = 'none';
2673$tlCfg->req_spec_template->scope->value = '';
2674
2675$tlCfg->role_template = new stdClass();
2676$tlCfg->role_template->notes = new stdClass();
2677$tlCfg->role_template->notes->type = 'none';
2678$tlCfg->role_template->notes->value = '';
2679
2680
2681$tlCfg->platform_template = new stdClass();
2682$tlCfg->platform_template->notes = new stdClass();
2683$tlCfg->platform_template->notes->type = 'none';
2684$tlCfg->platform_template->notes->value = '';
2685
2686// ----------------------------------------------------------------------------
2687/* [ATTACHMENTS] */
2688
2689/** Attachment feature availability */
2690$g_attachments = new stdClass();
2691$g_attachments->enabled = TRUE;
2692
2693/** the type of the repository can be database or filesystem
2694 * TL_REPOSITORY_TYPE_DB => database
2695 * TL_REPOSITORY_TYPE_FS => filesystem
2696 **/
2697$g_repositoryType = TL_REPOSITORY_TYPE_FS;
2698
2699/**
2700 * TL_REPOSITORY_TYPE_FS: the where the filesystem repository should be located
2701 * We recommend to change the directory for security reason.
2702 **/
2703$g_repositoryPath = TL_ABS_PATH . "upload_area" . DIRECTORY_SEPARATOR;
2704
2705/**
2706 * compression used within the repository
2707 * TL_REPOSITORY_COMPRESSIONTYPE_NONE => no compression
2708 * TL_REPOSITORY_COMPRESSIONTYPE_GZIP => gzip compression
2709 */
2710$g_repositoryCompressionType = TL_REPOSITORY_COMPRESSIONTYPE_NONE;
2711
2712// the maximum allowed file size for each repository entry, default 1MB.
2713// Also check your PHP settings (default is usually 2MBs)
2714$tlCfg->repository_max_filesize = 1; //MB
2715
2716// TRUE -> when you upload a file you can give no title
2717$g_attachments->allow_empty_title = TRUE;
2718
2719// $g_attachments->allow_empty_title == TRUE, you can ask the system
2720// to do something
2721//
2722// 'none' -> just write on db an empty title
2723// 'use_filename' -> use filename as title
2724//$g_attachments->action_on_save_empty_title='use_filename';
2725//
2726$g_attachments->action_on_save_empty_title = 'none';
2727
2728// Remember that title is used as link description for download
2729// then if title is empty, what the system has to do when displaying ?
2730// 'show_icon' -> the $g_attachments->access_icon will be used.
2731// 'show_label' -> the value of $g_attachments->access_string will be used .
2732$g_attachments->action_on_display_empty_title = 'show_icon';
2733
2734// martin: @TODO use an image file only
2735
2736// BUGID 3424 - need to be moved AFTER include of custom_config
2737//
2738// $g_attachments->access_icon = '<img src="' . $tlCfg->theme_dir . 'images/new_f2_16.png" style="border:none" />';
2739$g_attachments->access_string = "[*]";
2740
2741// Set display order of uploaded files - BUGID 1086
2742$g_attachments->order_by = " ORDER BY date_added DESC ";
2743
2744
2745
2746// ----------------------------------------------------------------------------
2747/* [Requirements] */
2748
2749// HAS TO BE REMOVED - > req_doc_id UNIQUE INSIDE test project
2750// true : you want req_doc_id UNIQUE IN THE WHOLE DB (system_wide)
2751// false: you want req_doc_id UNIQUE INSIDE a SRS
2752// $tlCfg->req_cfg->reqdoc_id->is_system_wide = FALSE;
2753
2754// 20101212 - truncate log message to this amount of chars for reqCompareVersions
2755$tlCfg->req_cfg->log_message_len = 200;
2756
2757/**
2758 * Test Case generation from Requirements - use_req_spec_as_testsuite_name
2759 * FALSE => test cases are created and assigned to a test suite
2760 * with name $tlCfg->req_cfg->default_testsuite_name
2761 * TRUE => REQuirement Specification Title is used as testsuite name
2762 */
2763$tlCfg->req_cfg->use_req_spec_as_testsuite_name = TRUE;
2764$tlCfg->req_cfg->default_testsuite_name = "Auto-created Test cases";
2765$tlCfg->req_cfg->testsuite_details = "Test Cases in the Test Suite are generated from Requirements. " .
2766 "A refinement of test scenario is highly recommended.";
2767$tlCfg->req_cfg->testcase_summary_prefix = "<b>The Test Case was generated from the assigned requirement.</b><br />";
2768
2769
2770// If the following value is enabled, then the summary prefix string will include the
2771// title and version number of the assigned requirement.
2772$tlCfg->req_cfg->use_testcase_summary_prefix_with_title_and_version = ENABLED;
2773
2774// If above option is enabled, the following string will be used as a template for the tc summary prefix.
2775// It has to include four variables in the form of "%s". The first and second one will be used internally by the system.
2776// The third one will then be replaced by the title of the originating Requirement,
2777// the fourth one by its version number.
2778// Attention: If there aren't exactly three variables in it, the operation will fail.
2779$tlCfg->req_cfg->testcase_summary_prefix_with_title_and_version = "<b>The Test Case was generated from the assigned" .
2780 " requirement <a href=\"javascript:openLinkedReqVersionWindow(%s,%s)\">\"%s\" (version %s)</a>.</b><br />";
2781
2782/**
2783 * ENABLED: When generating Test Cases from Requirements, copy the scope of the Requirement
2784 * to the summary of the newly created Test Case.
2785 */
2786$tlCfg->req_cfg->copy_req_scope_to_tc_summary = DISABLED;
2787
2788
2789// To avoid perfomance problems on search Requirements feature,
2790// we can decide when to inform user that results can not be displayed
2791// due to too many results.
2792$tlCfg->req_cfg->search=new stdClass();
2793$tlCfg->req_cfg->search->max_qty_for_display=200;
2794
2795
2796// ENABLED: allow N level depth tree
2797// DISABLED: just one level
2798$tlCfg->req_cfg->child_requirements_mgmt = ENABLED;
2799
2800
2801// ENABLED: ask for this value on user interface and use on several features
2802// DISABLED: do not ask, do not use
2803$tlCfg->req_cfg->expected_coverage_management = ENABLED;
2804
2805// Show Child Requirements on Requirement Specification Print View
2806// ENABLED: Requirement Specification including Child Requirements are shown
2807// DIABLED: ONLY Requirement Specification is shown
2808$tlCfg->req_cfg->show_child_reqs_on_reqspec_print_view = DISABLED;
2809
2810// 20090111 - franciscom
2811// Order of test cases status in this array, is used to undestand
2812// to what status set requirement in the requirements report.
2813// Standard algorithm, present in getReqCoverage(), is:
2814//
2815//
2816// if at least one of Test Cases linked to Requirement has status FAILED
2817// Requirement Coverage Status = FAILED
2818// else if at least one of Test Cases linked to Requirement has status BLOCKED
2819// Requirement Coverage Status = BLOCKED
2820// else if ALL Test Cases linked to Requirement has status NOT RUN
2821// Requirement Coverage Status = NOT RUN
2822// else if ALL Test Cases linked to Requirement has status PASSED
2823// Requirement Coverage Status = PASSED
2824// else
2825// Requirement Coverage Status = Partially Passed
2826//
2827// This logic is implemented using following config parameter
2828$tlCfg->req_cfg->coverageStatusAlgorithm['checkOrder']=array('atLeastOne','all');
2829$tlCfg->req_cfg->coverageStatusAlgorithm['checkType']['atLeastOne']=array('failed','blocked');
2830$tlCfg->req_cfg->coverageStatusAlgorithm['checkType']['all']=array('passed');
2831
2832// Configure here what status has to get requirement when check of type 'all' fails like
2833// in following situation (BUGID 2171)
2834// If particular requirement has assigned more than one test cases, and:
2835// - at least one of assigned test cases was not yet executed
2836// - the rest of assigned test cases was executed and passed
2837// then on the "Requirements based report" this particular requirement is not shown at all (in any section).
2838//
2839// $tlCfg->req_cfg->coverageStatusAlgorithm['checkFail']['all']='partially_passed';
2840// $tlCfg->req_cfg->coverageStatusAlgorithm['displayOrder']=array('passed','failed',
2841// 'blocked','not_run','partially_passed');
2842// 20100819 - asimon - fix not needed anymore after rewrite of req based report
2843//$tlCfg->req_cfg->coverageStatusAlgorithm['checkFail']['all']='failed';
2844//$tlCfg->req_cfg->coverageStatusAlgorithm['displayOrder']=array('passed','failed','blocked','not_run');
2845
2846
2847// Linking between requirements/requirement specifications
2848//
2849$tlCfg->internal_links = new stdClass();
2850
2851//
2852// TRUE: links to other requirements/requirement specifications are
2853// automatically generated from the corresponding Document ID, enclosed by tags (like BBCode).
2854//
2855// Usage:
2856// link to requirements: [req]req_doc_id[/req]
2857// link to requirement specifications: [req_spec]req_spec_doc_id[/req_spec]
2858//
2859// The test project of the requirement / requirement specification and an anchor
2860// to jump to can also be specified:
2861// [req tproj=<tproj_prefix> anchor=<anchor_name>]req_doc_id[/req]
2862// This syntax also works for requirement specifications.
2863//
2864// FALSE: no links are automatically created.
2865//
2866$tlCfg->internal_links->enable = TRUE;
2867
2868// how a linked document (requirement/requirement specification) should be displayed.
2869// posible values:
2870// 'window': new window/tab will be used (depending on browser configuration)
2871// 'frame' : same frame as the clicked link
2872// 'popup' (default): popup window (ATTENTION to browser pop-up block).
2873//
2874$tlCfg->internal_links->target = 'popup';
2875
2876// title for automatically created link
2877// possible values:
2878// 'string': lang_get() will be used to localize
2879// 'none': no title will be generated, only link with ID
2880// 'item' (default): localized type of item (e.g. "Requirement: ", "Req Spec")
2881// will be used as title for the generated link
2882//
2883$tlCfg->internal_links->req_link_title = new stdClass();
2884$tlCfg->internal_links->req_link_title->type = 'item';
2885$tlCfg->internal_links->req_link_title->value = '';
2886
2887$tlCfg->internal_links->req_spec_link_title = new stdClass();
2888$tlCfg->internal_links->req_spec_link_title->type = 'item';
2889$tlCfg->internal_links->req_spec_link_title->value = '';
2890
2891
2892// Relations between requirement documents:
2893//
2894// The relation types have to be configured in cfg/const.inc.php
2895// and their respective localization values in locale strings.txt.
2896
2897// There are some preconfigured standard types which you can use,
2898// additionally you can configure your own types.
2899$tlCfg->req_cfg->relations = new stdClass();
2900$tlCfg->req_cfg->relations->enable = TRUE;
2901$tlCfg->req_cfg->relations->interproject_linking = FALSE;
2902
2903// Requirement/testcase diff
2904// default value of lines to show before and after each difference
2905$tlCfg->diffEngine->context = 5;
2906
2907
2908// Configuration for Requirement Import using DOCBOOK format
2909$tlCfg->req_cfg->importDocBook = new stdClass();
2910$tlCfg->req_cfg->importDocBook->requirement= "sect3";
2911$tlCfg->req_cfg->importDocBook->title= "title";
2912$tlCfg->req_cfg->importDocBook->paragraph= "para";
2913$tlCfg->req_cfg->importDocBook->ordered_list="orderedlist";
2914$tlCfg->req_cfg->importDocBook->list_item="listitem";
2915$tlCfg->req_cfg->importDocBook->table="informaltable";
2916$tlCfg->req_cfg->importDocBook->table_group="tgroup";
2917$tlCfg->req_cfg->importDocBook->table_head="thead";
2918$tlCfg->req_cfg->importDocBook->table_body="tbody";
2919$tlCfg->req_cfg->importDocBook->table_row="row";
2920$tlCfg->req_cfg->importDocBook->table_entry="entry";
2921$tlCfg->req_cfg->importDocBook->list_item_children = array('para','title');
2922$tlCfg->req_cfg->importDocBook->table_entry_children = array('para');
2923
2924
2925// If an external tool is used for requirement management, enable this setting.
2926// You will get an additional field on requirement specifications where you
2927// can enter the total count of requirements so that external requirements
2928// are also counted for metrics/statistics.
2929$tlCfg->req_cfg->external_req_management = DISABLED;
2930
2931
2932//If enabled an icon next to Document ID field will show up that allows
2933//to insert the last defined Requirement Document ID within the same Project
2934//into Document ID field
2935$tlCfg->req_cfg->allow_insertion_of_last_doc_id = DISABLED;
2936
2937
2938// used ONLY to configure the mask (text) .
2939// algorithm type is fixed HARDCODED
2940//
2941$tlCfg->req_cfg->duplicated_name_algorithm = new stdClass();
2942$tlCfg->req_cfg->duplicated_name_algorithm->text = " (%s)";
2943
2944$tlCfg->req_cfg->duplicated_docid_algorithm = new stdClass();
2945$tlCfg->req_cfg->duplicated_docid_algorithm->text = " (%s)";
2946
2947
2948// ----------------------------------------------------------------------------
2949/* [TREE FILTER CONFIGURATION] */
2950
2951/* In the following section, you can configure which filters shall be used
2952 * in combination with the tree view for testcases and requirements.
2953 * There are five available filter modes (four for the testcase tree,
2954 * one for requirement documents), which are used for the different features
2955 * as listed here:
2956 *
2957 * For Test Cases:
2958 * --> execution_mode
2959 * execution of testcases
2960 * --> edit_mode
2961 * create and edit testcases
2962 * assign keywords to testcases
2963 * assign requirements to testcases
2964 * --> plan_mode
2965 * assign testcase execution to users
2966 * update linked versions for testplan
2967 * set urgent testcases
2968 * --> plan_add_mode
2969 * add/remove testcases to/from testplan
2970 *
2971 * For Requirements:
2972 * There are no modes defined, there is only one filter configuration.
2973 * The filters configured here will be used for requirement editing.
2974 */
2975$tlCfg->tree_filter_cfg = new stdClass();
2976$tlCfg->tree_filter_cfg->testcases = new stdClass();
2977$tlCfg->tree_filter_cfg->requirements = new stdClass();
2978
2979// These are the available filter modes for testcases:
2980$tlCfg->tree_filter_cfg->testcases->execution_mode = new stdClass();
2981$tlCfg->tree_filter_cfg->testcases->edit_mode = new stdClass();
2982$tlCfg->tree_filter_cfg->testcases->plan_mode = new stdClass();
2983$tlCfg->tree_filter_cfg->testcases->plan_add_mode = new stdClass();
2984
2985// If you disable one of these items here, you switch
2986// the complete filter panel off for a specific mode/feature.
2987// You should rather do this here instead of individually disabling all the filters,
2988// if you don't want to have any filters at all for a given feature.
2989$tlCfg->tree_filter_cfg->testcases->execution_mode->show_filters = ENABLED;
2990$tlCfg->tree_filter_cfg->testcases->edit_mode->show_filters = ENABLED;
2991$tlCfg->tree_filter_cfg->testcases->plan_mode->show_filters = ENABLED;
2992$tlCfg->tree_filter_cfg->testcases->plan_add_mode->show_filters = ENABLED;
2993$tlCfg->tree_filter_cfg->requirements->show_filters = ENABLED;
2994
2995// Detailed settings for each mode.
2996// Here, the single filter fields can be disabled if not wanted.
2997// Also, the choice of advanced filter mode can be disabled.
2998$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_tc_id = ENABLED;
2999$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_testcase_name = ENABLED;
3000$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_toplevel_testsuite = ENABLED;
3001$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_keywords = ENABLED;
3002$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_priority = ENABLED;
3003$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_execution_type = ENABLED;
3004$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_assigned_user = ENABLED;
3005$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_custom_fields = ENABLED;
3006$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_result = ENABLED;
3007$tlCfg->tree_filter_cfg->testcases->execution_mode->advanced_filter_mode_choice = ENABLED;
3008
3009$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_tc_id = ENABLED;
3010$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_testcase_name = ENABLED;
3011$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_toplevel_testsuite = ENABLED;
3012$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_keywords = ENABLED;
3013$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_execution_type = ENABLED;
3014$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_custom_fields = ENABLED;
3015// filter mode choice disabled for this mode because there are no filters benefiting from it
3016$tlCfg->tree_filter_cfg->testcases->edit_mode->advanced_filter_mode_choice = DISABLED;
3017
3018$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_tc_id = ENABLED;
3019$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_testcase_name = ENABLED;
3020$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_toplevel_testsuite = ENABLED;
3021$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_keywords = ENABLED;
3022$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_priority = ENABLED;
3023$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_execution_type = ENABLED;
3024$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_assigned_user = ENABLED;
3025$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_custom_fields = ENABLED;
3026$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_result = ENABLED;
3027$tlCfg->tree_filter_cfg->testcases->plan_mode->advanced_filter_mode_choice = ENABLED;
3028
3029$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_tc_id = ENABLED;
3030$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_testcase_name = ENABLED;
3031$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_toplevel_testsuite = ENABLED;
3032$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_keywords = ENABLED;
3033$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_priority = ENABLED;
3034$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_execution_type = ENABLED;
3035$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_custom_fields = ENABLED;
3036$tlCfg->tree_filter_cfg->testcases->plan_add_mode->advanced_filter_mode_choice = ENABLED;
3037
3038$tlCfg->tree_filter_cfg->requirements->filter_doc_id = ENABLED;
3039$tlCfg->tree_filter_cfg->requirements->filter_title = ENABLED;
3040$tlCfg->tree_filter_cfg->requirements->filter_status = ENABLED;
3041$tlCfg->tree_filter_cfg->requirements->filter_type = ENABLED;
3042$tlCfg->tree_filter_cfg->requirements->filter_spec_type = ENABLED;
3043$tlCfg->tree_filter_cfg->requirements->filter_coverage = ENABLED;
3044$tlCfg->tree_filter_cfg->requirements->filter_relation = ENABLED;
3045$tlCfg->tree_filter_cfg->requirements->filter_tc_id = ENABLED;
3046$tlCfg->tree_filter_cfg->requirements->filter_custom_fields = ENABLED;
3047$tlCfg->tree_filter_cfg->requirements->advanced_filter_mode_choice = ENABLED;
3048
3049// ENABLED -> Every time the user does some operation on requirement spec,
3050// the tree will be updated on screen. [DEFAULT]
3051// DISABLED -> The tree will not be updated automatically, but the user can update it manually.
3052// On graphical user interface any user will is able to change this setting.
3053$tlCfg->tree_filter_cfg->requirements->automatic_tree_refresh = ENABLED;
3054
3055// ----------------------------------------------------------------------------
3056/* [MISC FUNCTIONALITY] */
3057
3058/** Maximum uploadfile size to importing stuff in TL */
3059// Also check your PHP settings (default is usually 2MBs)
3060// unit BYTES is required by MAX_FILE_SIZE HTML option
3061$tlCfg->import_file_max_size_bytes = '409600';
3062
3063/** Maximum line size of the imported file */
3064$tlCfg->import_max_row = '10000'; // in chars
3065
3066/** Set the default role used for new users */
3067// - created from the login page.
3068// - created using user management features
3069$tlCfg->default_roleid = TL_ROLES_GUEST;
3070
3071// only show custom fields if their value isn't empty
3072$tlCfg->custom_fields->show_custom_fields_without_value = true;
3073
3074/** used to check size in char for TEXT AREA type custom fields */
3075// can not be greater that column definition on DB
3076// 0 => do not check.
3077$tlCfg->custom_fields->max_length = 255;
3078
3079// sizes for HTML INPUTS
3080// for list, multiselection list => number of items
3081// for checkbox,radio is useless
3082// Hint: more than 120 produce weird effects on user interface
3083//
3084$tlCfg->custom_fields->sizes = array('string' => 100,
3085 'numeric' => 10,
3086 'float' => 10,
3087 'email' => 100,
3088 'list' => 5,
3089 'multiselection list' => 5,
3090 'text area' => array('rows' => 6, 'cols' => 80),
3091 'script' => 100,
3092 'server' => 100);
3093
3094// Use this variable (on custom_config.inc.php) to define new Custom Field types.
3095// IMPORTANT:
3096// check $custom_field_types property on cfield_mgr.class.php
3097// to avoid overwrite of standard types.
3098//
3099$tlCfg->gui->custom_fields->types = null;
3100
3101// Use this variable (on custom_config.inc.php)
3102// to define possible values behaviour for new Custom Field types.
3103//
3104// IMPORTANT:
3105// check $possible_values_cfg property on cfield_mgr.class.php
3106// to avoid overwrite of standard values.
3107//
3108$tlCfg->gui->custom_fields->possible_values_cfg = null;
3109
3110
3111/**
3112 * Check unique titles of Test Project, Test Suite and Test Case
3113 * ENABLED => Check [STANDARD BEHAVIOUR]
3114 * DISABLED => don't check
3115 **/
3116$tlCfg->check_names_for_duplicates = ENABLED;
3117
3118/**
3119 * Action for duplication check (only if check_names_for_duplicates=ENABLED)
3120 * 'allow_repeat' => allow the name to be repeated (backward compatibility)
3121 * 'generate_new' => generate a new name using $g_prefix_name_for_copy
3122 * 'block' => return with an error
3123 **/
3124$tlCfg->action_on_duplicate_name = 'generate_new';
3125
3126/**
3127 * String checking and conversions
3128 * Allow automatically convert www URLs and email adresses into clickable links
3129 * used by function string_display_links() for example by custom fields.
3130 * Valid values = ENABLED/DISABLED.
3131 **/
3132$tlCfg->html_make_links = ENABLED;
3133
3134/**
3135 * Define the valid html tags for "content driven" single-line and multi-line fields.
3136 * Do NOT include tags with parameters (eg. <font face="arial">), img and href.
3137 * It's used by function string_display_links() for example by custom fields.
3138 */
3139$tlCfg->html_valid_tags = 'p, li, ul, ol, br, pre, i, b, u, em';
3140$tlCfg->html_valid_tags_single_line = 'i, b, u, em';
3141
3142/**
3143 * Defines the threshold values for filtering TC by a priority according to the formula
3144 * ui => (urgency*importance)
3145 * LOW => all Tc's with ui < LOW_Threshold
3146 * HIGH => all Tc's with ui >= HIGH_Threshold
3147 * MEDIUM => all Tc's with ui >= LOW_Threshold AND ui < HIGH_Threshold
3148 */
3149$tlCfg->urgencyImportance = new stdClass();
3150$tlCfg->urgencyImportance->threshold['low'] = 3;
3151$tlCfg->urgencyImportance->threshold['high'] = 6;
3152
3153/**
3154 * @var boolean Demo mode disables some functionality
3155 * @TODO list with feature are disabled.
3156 */
3157$tlCfg->demoMode = OFF;
3158
3159/**
3160 * If enabled, every Ext JS table in TestLink will offer an export button,
3161 * which generates a file with the contents of the table.
3162 * ATTENTION: This feature is fully experimental. Enable at your own risk!
3163 * Enabling it can cause broken tables.
3164 */
3165$tlCfg->enableTableExportButton = DISABLED;
3166
3167
3168/**
3169Used when creating a Test Suite using copy
3170and you have choose $g_action_on_duplicate_name = 'generate_new'
3171if the name exist.
3172*/
3173$g_prefix_name_for_copy = strftime("%Y%m%d-%H:%M:%S", time());
3174
3175
3176// ----- End of Config ------------------------------------------------------------------
3177// --------------------------------------------------------------------------------------
3178// DO NOT CHANGE NOTHING BELOW
3179// --------------------------------------------------------------------------------------
3180
3181// havlatm: @TODO move the next code out of config - configCheck.php -> included via common.php
3182/** Functions for check request status */
3183require_once('configCheck.php');
3184
3185/** root of testlink directory location seen through the web server */
3186/* 20070106 - franciscom - this statement it's not 100% right
3187 better use $_SESSION['basehref'] in the scripts. */
3188define('TL_BASE_HREF', get_home_url());
3189
3190
3191clearstatcache();
3192if ( file_exists( TL_ABS_PATH . 'custom_config.inc.php' ) )
3193{
3194 require_once( TL_ABS_PATH . 'custom_config.inc.php' );
3195}
3196
3197// BUGID 3424
3198if( !isset($g_attachments->access_icon) )
3199{
3200 $g_attachments->access_icon = '<img src="' . $tlCfg->theme_dir . 'images/new_f2_16.png" style="border:none" />';
3201}
3202
3203// BUGID 2914
3204// Important to do this only after custom_* to use (if exists) redefinition of
3205// $tlCfg->results['status_label_for_exec_ui']
3206$tlCfg->reportsCfg->exec_status = $tlCfg->results['status_label_for_exec_ui'];
3207
3208
3209/** Support for localization */
3210// @TODO schlundus, move the code out of config and do it only once and not always in any include!
3211// @TODO schlundus, a better parsing function should be include
3212$serverLanguage = false;
3213if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
3214{
3215 @list($code) = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
3216 @list($a,$b) = explode("-",$code);
3217 if ($a && $b)
3218 {
3219 $a = strtolower($a);
3220 $b = strtoupper($a);
3221 $serverLanguage = $a."_".$b;
3222 }
3223}
3224
3225if(false !== $serverLanguage)
3226{
3227 if (array_key_exists($serverLanguage,$g_locales))
3228 $tlCfg->default_language = $serverLanguage;
3229}
3230define ('TL_DEFAULT_LOCALE', $tlCfg->default_language);
3231
3232// Reverted execution status is used for two applications.
3233// 1. To map code to CSS, Please if you add an status you need to add a corresponding CSS Class
3234// in the CSS files (see the gui directory)
3235// 2. to decode from code to some more human oriented to use in code
3236//
3237/** Revered list of Test Case execution results */
3238$tlCfg->results['code_status'] = array_flip($tlCfg->results['status_code']);
3239
3240// --------------------------------------------------------------------------------------
3241/** Converted and derived variables (Users should not modify this section) */
3242define('REFRESH_SPEC_TREE',$tlCfg->spec_cfg->automatic_tree_refresh ? 1 : 0);
3243define('TL_SORT_TABLE_ENGINE',$g_sort_table_engine);
3244define("TL_REPOSITORY_MAXFILESIZE", 1024*1024*$tlCfg->repository_max_filesize);
3245
3246define('TL_XMLEXPORT_HEADER', "<?xml version=\"1.0\" encoding=\"" . $tlCfg->charset . "\"?>\n");
3247
3248define('TL_THEME_BASE_DIR', $tlCfg->theme_dir);
3249define('TL_THEME_IMG_DIR', $tlCfg->theme_dir . 'images/');
3250define('TL_THEME_CSS_DIR', $tlCfg->theme_dir . 'css/');
3251define('TL_TESTLINK_CSS', TL_THEME_CSS_DIR . TL_CSS_MAIN);
3252define('TL_TESTLINK_CUSTOM_CSS', TL_THEME_CSS_DIR . TL_CSS_CUSTOM);
3253define('TL_PRINT_CSS', TL_THEME_CSS_DIR . TL_CSS_PRINT);
3254define('TL_TREEMENU_CSS', TL_THEME_CSS_DIR . TL_CSS_TREEMENU);
3255
3256// --------------------------------------------------------------------------------------
3257// when a role is deleted, a new role must be assigned to all users
3258// having role to be deleted
3259// A right choice seems to be using $g_default_roleid.
3260// You can change this adding a config line in custom_config.inc.php
3261// @TODO martin: remove - use directly $tlCfg->default_roleid;
3262$g_role_replace_for_deleted_roles = $tlCfg->default_roleid;
3263
3264
3265/**
3266BUGID 0000086: Using "|" in the testsuite name causes malformed URLs
3267regexp used to check for chars not allowed in:
3268test project, test suite and testcase names.
3269@TODO martin: encode harm characters @see http://cz.php.net/urlencode (and remove the parameter)
3270*/
3271// now is preg pattern
3272$g_ereg_forbidden = "/[|]/i";
3273
3274
3275
3276/**
3277 * @TODO remove from TL - unfinished refactorization;
3278 * use $tlCfg instead of old variables and constants
3279 */
3280define('TL_IMPORT_ROW_MAX', $tlCfg->import_max_row);
3281define('TL_TPL_CHARSET', $tlCfg->charset);
3282define('TITLE_SEP',$tlCfg->gui_title_separator_1);
3283define('TITLE_SEP_TYPE2',$tlCfg->gui_title_separator_2);
3284define('TITLE_SEP_TYPE3',$tlCfg->gui_title_separator_2); // obsolete: use type 1,2
3285define('TL_FRMWORKAREA_LEFT_FRAME_WIDTH', $tlCfg->frame_workarea_default_width);
3286define('TL_TEMP_PATH', $tlCfg->temp_dir);
3287
3288$tlCfg->gui->title_separator_1 = $tlCfg->gui_title_separator_1;
3289$tlCfg->gui->title_separator_2 = $tlCfg->gui_title_separator_2;
3290$tlCfg->gui->role_separator_open = $tlCfg->gui_separator_open;
3291$tlCfg->gui->role_separator_close = $tlCfg->gui_separator_close;
3292// ----- END OF FILE --------------------------------------------------------------------
3293?>