· 6 years ago · Jun 12, 2019, 05: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-2018, TestLink community
22 * @link http://www.testlink.org
23 *
24 *
25 **/
26
27// ----------------------------------------------------------------------------
28/* [INITIALIZATION] - DO NOT CHANGE THE SECTION */
29
30/** @global array Global configuration class */
31$tlCfg = new stdClass();
32$tlCfg->api = new stdClass();
33$tlCfg->cookie = new stdClass();
34$tlCfg->document_generator = new stdClass();
35
36$tlCfg->spec_cfg = new stdClass();
37
38$tlCfg->exec_cfg = new stdClass();
39$tlCfg->exec_cfg->view_mode = new stdClass();
40$tlCfg->exec_cfg->exec_mode = new stdClass();
41
42// allow to define additional execution types other than
43// defined in testcase.class.php
44// array(code => lblkey)
45// code int value > latest standard execution code defined.
46// lblkey => key to be used on lang_get() call.
47//
48$tlCfg->custom_execution_types = null;
49
50$tlCfg->gui = new stdClass();
51$tlCfg->gui->custom_fields = new stdClass();
52$tlCfg->testcase_cfg = new stdClass();
53$tlCfg->req_cfg = new stdClass();
54$tlCfg->validation_cfg = new stdClass();
55$tlCfg->custom_fields = new stdClass();
56$tlCfg->req_spec_cfg = new stdClass();
57$tlCfg->diffEngine = new stdClass();
58$tlCfg->tplanDesign = new stdClass();
59
60$tlCfg->notifications = new stdClass();
61$tlCfg->proxy = new stdClass();
62
63$tlCfg->reqTCLinks = new stdClass();
64
65
66$tlCfg->keywords = new stdClass();
67$tlCfg->keywords->onDeleteCheckFrozenTCVersions = TRUE;
68$tlCfg->keywords->onDeleteCheckExecutedTCVersions = TRUE;
69
70
71/** @uses database access definition (generated automatically by TL installer) */
72@include_once('config_db.inc.php');
73if( !defined('DB_TABLE_PREFIX') ) {
74 define('DB_TABLE_PREFIX','' );
75}
76
77/** The root dir for the testlink installation with trailing slash */
78define('TL_ABS_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
79
80/** Just for documentation */
81$tlCfg->testlinkdotorg = 'http://www.testlink.org';
82
83/** GUI themes (base for CSS and images)- modify if you create own one */
84$tlCfg->theme_dir = 'gui/themes/default/';
85
86/** Dir for compiled templates */
87$tlCfg->temp_dir = TL_ABS_PATH . 'gui' . DIRECTORY_SEPARATOR .
88 'templates_c' . DIRECTORY_SEPARATOR;
89
90/** default filenames of CSS files of current GUI theme */
91define('TL_CSS_MAIN', 'testlink.css');
92define('TL_CSS_PRINT', 'tl_print.css');
93define('TL_CSS_DOCUMENTS', 'tl_documents.css');
94
95define('TL_THEME_BASE_DIR', $tlCfg->theme_dir);
96define('TL_THEME_IMG_DIR', $tlCfg->theme_dir . 'images/');
97define('TL_THEME_CSS_DIR', $tlCfg->theme_dir . 'css/');
98define('TL_TESTLINK_CSS', TL_THEME_CSS_DIR . TL_CSS_MAIN);
99define('TL_PRINT_CSS', TL_THEME_CSS_DIR . TL_CSS_PRINT);
100
101// name of your custom.css, place it in same folder that standard TL css
102// null or '' => do not use
103$tlCfg->custom_css = null;
104
105// if you do not want to use this, redefine $tlCfg->custom_css as '' or null
106define('TL_TESTLINK_CUSTOM_CSS', TL_THEME_CSS_DIR . $tlCfg->custom_css);
107
108
109/** Include constants and magic numbers (users should not change it)*/
110require_once(TL_ABS_PATH . 'cfg' . DIRECTORY_SEPARATOR . 'const.inc.php');
111
112
113// ----------------------------------------------------------------------------
114/** @var string used to have (when needed) a possibility to identify different TL instances
115 @since 1.9.4 used on mail subject when mail logger is used
116 */
117$tlCfg->instance_name = 'Main TestLink Instance';
118
119// do not use blanks or special characters, use a short string
120$tlCfg->instance_id = 'TLM';
121
122
123/**
124 * Copied from MantisBT
125 *
126 * Prefix for all TestLink cookies
127 * This should be an identifier which does not include spaces or periods,
128 * and should be unique per TestLink installation, especially if
129 * $tlCfg->cookie_path is not restricting the cookies' scope to the actual
130 * TestLink directory.
131 * @see $tlCfg->cookie->path
132 * @global string $tlCfg->cookie->prefix
133 */
134$tlCfg->cookie->prefix = 'TESTLINK197';
135
136
137/**
138 * @link http://php.net/function.setcookie
139 *
140 */
141$tlCfg->cookie->expire = (time()+60*60*24*30); // 30 days;
142$tlCfg->cookie->domain = '';
143$tlCfg->cookie->secure = false;
144$tlCfg->cookie->httponly = false;
145
146/**
147 * Copied from MantisBT
148 *
149 * Specifies the path under which a cookie is visible
150 * All scripts in this directory and its sub-directories will be able
151 * to access TestLink cookies.
152 * It is recommended to set this to the actual TestLink path.
153 * @link http://php.net/function.setcookie
154 * @global string $tlCfg->cookie->path
155 */
156 $tlCfg->cookie->path = '/';
157
158
159/* [ROLE INHERITANCE] */
160/**
161 * possible values
162 *
163 * 'testproject'
164 * 'global'
165 *
166 * 'testproject'
167 * till a role is specifically assigned to test plan, test plan role
168 * will be inherited from test project role.
169 *
170 * IMPORTANT NOTICE
171 * test project role can be specifically assigned or inherited from
172 * user's global role.
173 *
174 * if test project specifically assigned role changes, and test plan role was inherited, then it will also changes, due to inheritance.
175 *
176 *
177 * 'global'
178 * till a role is specifically assigned to test plan, test plan role
179 * will be inherited from user's global role, and NOT from test project
180 * specifically assigned role.
181 *
182 * if test project specifically assigned role changes, will not be changed.
183 *
184 */
185 $tlCfg->testplan_role_inheritance_mode = 'testproject';
186
187
188/* [LOCALIZATION] */
189
190/** @var string Default localization for users */
191// The value must be available in $$tlCfg->locales (see cfg/const.inc.php).
192// Note: An attempt will be done to establish the default locale
193// automatically using $_SERVER['HTTP_ACCEPT_LANGUAGE']
194$tlCfg->default_language = 'en_GB';
195
196/**
197 * @var string Charset 'UTF-8' is only officially supported charset (Require
198 * MySQL version >= 4.1) 'ISO-8859-1' or another Charset could be set for
199 * backward compatability by experienced users. However we have not resources
200 * to support such patches.
201 **/
202$tlCfg->charset = 'UTF-8';
203
204/**
205 * @var string characters used to surround a description in the user interface
206 * (for example role)
207 **/
208$tlCfg->gui_separator_open = '[';
209$tlCfg->gui_separator_close = ']';
210$tlCfg->gui_room = '[ %s ]';
211
212/** @var string Title separators are used when componing an title using several strings */
213$tlCfg->gui_title_separator_1 = ' : '; // object : name (Test Specification : My best product)
214$tlCfg->gui_title_separator_2 = ' - '; // parent - child
215
216/**
217 * @var string delimiter used to create DOC ID in this way:
218 * <test_project_Prefix> . g_testcase_cfg->glue_character . <doc_id>
219 * Could not be empty
220 */
221$tlCfg->testcase_cfg->glue_character = '-';
222
223/**
224 * fonts set used to draw charts
225 **/
226$tlCfg->charts_font_path = TL_ABS_PATH . "third_party/pchart/Fonts/tahoma.ttf";
227/**
228 * font size used to draw charts
229 **/
230$tlCfg->charts_font_size = 8;
231
232
233// ----------------------------------------------------------------------------
234/* [SERVER ENVIRONMENT] */
235
236
237/**
238 * TICKET 4969: Add Setting to Force HTTPS
239 */
240$tlCfg->force_https = false;
241
242
243/**
244 * @var integer Set the session timeout for inactivity [minutes].
245 * Default high value disables this feature.
246 */
247$tlCfg->sessionInactivityTimeout = 9900;
248
249/**
250 * Set the session timeout value (in minutes).
251 * This will prevent sessions timing out after very short periods of time
252 * Warning: your server could block this settings
253 **/
254//ini_set('session.cache_expire',900);
255
256/**
257 * Set the session garbage collection timeout value (in seconds)
258 * The default session garbage collection in php is set to 1440 seconds (24 minutes)
259 * If you want sessions to last longer this must be set to a higher value.
260 * You may need to set this in your global php.ini if the settings don't take effect.
261 */
262//ini_set('session.gc_maxlifetime', 54000);
263
264$tlCfg->notifications->userSignUp = new stdClass();
265$tlCfg->notifications->userSignUp->enabled = TRUE; // @see notifyGlobalAdmins()
266$tlCfg->notifications->userSignUp->to = new stdClass();
267$tlCfg->notifications->userSignUp->to->roles = array(TL_ROLES_ADMIN);
268$tlCfg->notifications->userSignUp->to->users = null; // i.e. array('login01','login02');
269
270// ----------------------------------------------------------------------------
271/* [LOGGING] */
272
273/** Error reporting - do we want php errors to show up for users */
274/** configure on custom_config.inc.php */
275/** error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_WARNING); */
276/** error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING); */
277error_reporting(E_ALL);
278
279/** @var string Default level of logging (NONE, ERROR, INFO, DEBUG, EXTENDED)
280 * is not used by tlLogger, we need to change this in future.
281 */
282$tlCfg->log_level = 'ERROR';
283
284/** @var boolean show smarty debug window */
285$tlCfg->smarty_debug = false;
286
287/**
288 * @var string Path to store logs -
289 * for security reasons (see http://itsecuritysolutions.org/2012-08-13-TestLink-1.9.3-multiple-vulnerabilities/)
290 * put it out of reach via web or configure access denied.
291 */
292$tlCfg->log_path = 'C:/xampp/htdocs/testlink-1.9.19/logs'; /* unix example */
293
294
295/**
296 * @var string How to warning user when security weak points exists.
297 *
298 * 'SCREEN': messages will displayed on login screen, and tl desktop
299 * 'FILE': a file with a list is created but users are not notified via GUI
300 * user will receive a message on screen. (default)
301 * 'SILENT': same that FILE, but user will not receive message on screen.
302 */
303$tlCfg->config_check_warning_mode = 'FILE';
304
305/**
306 * ONCE_FOR_SESSION
307 * ALWAYS
308 */
309$tlCfg->config_check_warning_frequence = 'ONCE_FOR_SESSION';
310
311/**
312 *
313 */
314$tlCfg->userDocOnDesktop = OFF;
315
316
317/**
318 * Configure if individual logging data stores are enabled of disabled
319 * Possibile values to identify loggers: 'db','file'
320 * $g_loggerCfg=null; all loggers enabled
321 * $g_loggerCfg['db']['enable']=true/false;
322 * $g_loggerCfg['file']['enable']=true/false;
323 * $g_loggerCfg['mail']['enable']=true/false;
324 */
325$g_loggerCfg = array('mail' => array('enable' => false));
326
327/** @var integer All events older this value [days] are removed from the db, during login */
328$g_removeEventsOlderThan = 30;
329
330
331/** @var map keys: 'all' + values present on proprety of logger class $loggerTypeDomain
332 * values can be only these defined on logger.class.php
333 * @since 1.9.4
334 * example array('all' => array('INFO','AUDIT'),
335 * 'mail' => array('ERROR'))
336 *
337 * $tlCfg->loggerFilter = array('db' => array('DEBUG','AUDIT','WARNING','ERROR'),
338 * 'file' => array('NONE'));
339 *
340 */
341$tlCfg->loggerFilter = null; // default defined on logger.class.php ;
342
343// ----------------------------------------------------------------------------
344/* [SMTP] */
345
346/**
347 * @var string SMTP server name or IP address ("localhost" should work in the most cases)
348 * Configure using custom_config.inc.php
349 * @uses lib/functions/email_api.php
350 */
351$g_smtp_host = '[smtp_host_not_configured]'; # SMTP server MUST BE configured
352
353# Configure using custom_config.inc.php
354$g_tl_admin_email = '[testlink_sysadmin_email_not_configured]'; # for problem/error notification
355$g_from_email = '[from_email_not_configured]'; # email sender
356$g_return_path_email = '[return_path_email_not_configured]';
357
358/**
359 * Email notification priority (low by default)
360 * Urgent = 1, Not Urgent = 5, Disable = 0
361 **/
362$g_mail_priority = 5;
363
364/**
365 * Taken from mantis for phpmailer config
366 * select the method to mail by:
367 * PHPMAILER_METHOD_MAIL - mail()
368 * PHPMAILER_METHOD_SENDMAIL - sendmail
369 * PHPMAILER_METHOD_SMTP - SMTP
370 */
371$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
372
373/** Configure only if SMTP server requires authentication */
374$g_smtp_username = ''; # user
375$g_smtp_password = ''; # password
376
377/**
378 * This control the connection mode to SMTP server.
379 * Can be '', 'ssl','tls'
380 * @global string $g_smtp_connection_mode
381 */
382$g_smtp_connection_mode = '';
383
384/**
385 * The smtp port to use. The typical SMTP ports are 25 and 587. The port to use
386 * will depend on the SMTP server configuration and hence others may be used.
387 * @global int $g_smtp_port
388 */
389$g_smtp_port = 25;
390
391
392/**
393 * @see https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
394 * Opportunistic TLS
395 */
396$g_SMTPAutoTLS = false;
397
398// ----------------------------------------------------------------------------
399/* [User Authentication] */
400
401/**
402 * Login authentication method:
403 * 'MD5' => use password stored on db => will be deprecated and DB used.
404 * 'DB' => Same as MD5 use password stored on db
405 * 'LDAP' => use password from LDAP Server
406 */
407$tlCfg->authentication['domain'] = array('DB' => array('description' => 'DB', 'allowPasswordManagement' => true) ,
408 'LDAP' => array('description' => 'LDAP', 'allowPasswordManagement' => false) );
409
410/* Default Authentication method */
411$tlCfg->authentication['method'] = 'DB';
412
413// Applies only if authentication methos is DB.
414// Used when:
415// 1. user sign up
416//
417// null => only check password IS NOT EMPTY
418//
419// $tlCfg->passwordChecks = array('minlen' => 8,'maxlen' => 20,'number' => true,'letter' => true,
420// 'capital' => true, 'symbol' => true);
421$tlCfg->passwordChecks = null;
422
423// Applies ONLY to the HTML input.
424// If auth method is DB, password will be stored as MD5 HASH that requires 32 chars (128 bits)
425$tlCfg->loginPagePasswordMaxLenght = 40;
426
427/**
428 * Standard logout url, used also when SSO is used and hint to skip SSO is used.
429 * '' => use standard TestLink page
430 */
431$tlCfg->logoutUrl = '';
432
433// users that will not allow expiration date management on GUI
434$tlCfg->noExpDateUsers = array('admin');
435
436
437/**
438 * OAUTH auth
439 * Configure this on custom_config.inc.php
440 */
441
442$tlCfg->OAuthServers = array();
443
444// Google
445// $tlCfg->OAuthServers = array();
446// $tlCfg->OAuthServers[1]['oauth_enabled'] = true;
447// $tlCfg->OAuthServers[1]['oauth_name'] = 'google';
448
449// Get from /gui/themes/default/images
450// $tlCfg->OAuthServers[1]['oauth_icon'] = 'google.png';
451// $tlCfg->OAuthServers[1]['oauth_client_id'] = 'CLIENT_ID';
452// $tlCfg->OAuthServers[1]['oauth_client_secret'] = 'CLIENT_SECRET';
453// Can be authorization_code (by default), client_credentials or password
454// $tlCfg->OAuthServers[1]['oauth_grant_type'] = 'authorization_code';
455// $tlCfg->OAuthServers[1]['oauth_url'] = 'https://accounts.google.com/o/oauth2/auth';
456// $tlCfg->OAuthServers[1]['token_url'] = 'https://accounts.google.com/o/oauth2/token';
457// false => then the only user will be selected automatically (applied for google)
458// $tlCfg->OAuthServers[1]['oauth_force_single'] = false;
459// the domain you want to whitelist
460// $tlCfg->OAuthServers[1]['oauth_domain'] = 'google.com';
461// $tlCfg->OAuthServers[1]['oauth_profile'] = 'https://www.googleapis.com/oauth2/v1/userinfo';
462// $tlCfg->OAuthServers[1]['oauth_scope'] = 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile';
463
464// Github
465// $tlCfg->OAuthServers[2]['oauth_enabled'] = true;
466// $tlCfg->OAuthServers[2]['oauth_name'] = 'github';
467// $tlCfg->OAuthServers[2]['oauth_icon'] = 'github.png'; //Get from /gui/themes/default/images
468// $tlCfg->OAuthServers[2]['oauth_client_id'] = 'CLIENT_ID';
469// $tlCfg->OAuthServers[2]['oauth_client_secret'] = 'CLIENT_SECRET';
470
471// Can be authorization_code (by default), client_credentials or password
472// $tlCfg->OAuthServers[2]['oauth_grant_type'] = 'authorization_code';
473// $tlCfg->OAuthServers[2]['oauth_url'] = 'https://github.com/login/oauth/authorize';
474
475// $tlCfg->OAuthServers[2]['token_url'] = 'https://github.com/login/oauth/access_token';
476// false => then the only user will be selected automatically (applied for google)
477// $tlCfg->OAuthServers[2]['oauth_force_single'] = false;
478// $tlCfg->OAuthServers[2]['oauth_profile'] = 'https://api.github.com/user';
479// $tlCfg->OAuthServers[2]['oauth_scope'] = 'user:email';
480
481
482/**
483 * Single Sign On authentication
484 *
485 * SSO_method: CLIENT_CERTIFICATE, tested with Apache Webserver
486 * SSP_method: WEBSERVER_VAR, tested with Apache and Shibboleth Service Provider.
487 */
488$tlCfg->authentication['SSO_enabled'] = false;
489$tlCfg->authentication['SSO_logout_destination'] = 'YOUR LOGOUT DESTINATION';
490
491// Tested with Apache Webserver
492//$tlCfg->authentication['SSO_method'] = 'CLIENT_CERTIFICATE';
493//$tlCfg->authentication['SSO_uid_field'] = 'SSL_CLIENT_S_DN_Email';
494
495// Tested with Apache and Shibboleth Service Provider
496//$tlCfg->authentication['SSO_method'] = 'WEBSERVER_VAR';
497//$tlCfg->authentication['SSO_uid_field'] = 'REMOTE_USER';
498//$tlCfg->authentication['SSO_user_target_dbfield'] = 'email';
499
500
501/**
502 * LDAP authentication credentials, Multiple LDAP Servers can be used.
503 * User will be authenticaded against each server (one after other using array index order)
504 * till authentication succeed or all servers have been used.
505 */
506$tlCfg->authentication['ldap'] = array();
507$tlCfg->authentication['ldap'][1]['ldap_server'] = 'localhost';
508$tlCfg->authentication['ldap'][1]['ldap_port'] = '389';
509$tlCfg->authentication['ldap'][1]['ldap_version'] = '3'; // could be '2' in some cases
510$tlCfg->authentication['ldap'][1]['ldap_root_dn'] = 'dc=mycompany,dc=com';
511$tlCfg->authentication['ldap'][1]['ldap_bind_dn'] = ''; // Left empty for anonymous LDAP binding
512$tlCfg->authentication['ldap'][1]['ldap_bind_passwd'] = ''; // Left empty for anonymous LDAP binding
513$tlCfg->authentication['ldap'][1]['ldap_tls'] = false; // true -> use tls
514
515// Following configuration parameters are used to build
516// ldap filter and ldap attributes used by ldap_search()
517//
518// filter => "(&$t_ldap_organization($t_ldap_uid_field=$t_username))";
519// attributess => array( $t_ldap_uid_field, 'dn' );
520//
521// This can be used to manage situation like explained on post on forum:
522// ActiveDirectory + users in AD group
523//
524$tlCfg->authentication['ldap'][1]['ldap_organization'] = ''; // e.g. '(organizationname=*Traffic)'
525$tlCfg->authentication['ldap'][1]['ldap_uid_field'] = 'uid'; // Use 'sAMAccountName' for Active Directory
526
527// Configure following fields in custom_config.inc.php according your configuration
528$tlCfg->authentication['ldap'][1]['ldap_email_field'] = 'mail';
529$tlCfg->authentication['ldap'][1]['ldap_firstname_field'] = 'givenname';
530$tlCfg->authentication['ldap'][1]['ldap_surname_field'] = 'sn';
531
532
533// Follows Mantisbt idea.
534// True if user does not exist on DB, but can be get from LDAP,
535// the user will be created AUTOMATICALLY with default user role.
536// Create user with following data from LDAP
537// mail
538// name
539// surname
540$tlCfg->authentication['ldap_automatic_user_creation'] = false;
541
542
543/** Enable/disable Users to create accounts on login page */
544$tlCfg->user_self_signup = TRUE;
545
546/** What happens when Administrator push the Reset Password Button
547 'send_password_by_mail'
548 'display_on_screen'
549*/
550$tlCfg->password_reset_send_method = 'send_password_by_mail';
551
552/**
553 * Validating new user login names
554 * Taken mantisbt version 1.2.5 - www.mantisbt.org and adapted
555 *
556 * The regular expression to use when validating new user login names
557 * The default regular expression allows a-z, A-Z, 0-9, +, -, dot, @ and underscore.
558 * For testing regular expressions, use http://rubular.com/.
559 * For regular expression to englihs, use http://xenon.stanford.edu/~xusch/regexp/analyzer.html
560 */
561$tlCfg->validation_cfg->user_login_valid_regex='/^([a-z\d\-.+_@]+(@[a-z\d\-.]+\.[a-z]{2,4})?)$/i';
562
563/**
564 * Validating user email addresses
565 * Example of other possibilities:
566 * <code>
567 * $regex = "/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*" .
568 * "@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i";
569 * $regex = "/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/";
570 * </code>
571 **/
572//
573// This expression does not allow Top Level Domian (last part of domain name) longer than 4
574// If you need to change this
575// Configure this on custom_config.inc.php
576$tlCfg->validation_cfg->user_email_valid_regex_js = "/^(\w+)([-+.][\w]+)*@(\w[-\w]*\.){1,5}([A-Za-z]){2,4}$/";
577$tlCfg->validation_cfg->user_email_valid_regex_php = "/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/U";
578
579
580// --------------------------------------------------------------------------------------
581/* [API] */
582
583/** XML-RPC API availability - do less than promised ;)
584 FALSE => user are not able to generate and set his/her API key.
585 XML-RPC server do not check this config in order to answer or not a call.
586 */
587
588$tlCfg->api->enabled = TRUE;
589
590// used to display API ID info in the *View pages
591$tlCfg->api->id_format = "[ID: %s ]";
592
593
594// ---------------------------------------------------------------------------------
595/* [GUI LAYOUT] */
596
597/** Company logo (used by navigation bar and login page page) */
598$tlCfg->logo_login = 'tl-logo-transparent-25.png';
599$tlCfg->logo_navbar = 'tl-logo-transparent-12.5.png';
600
601/** Height of the navbar always displayed */
602$tlCfg->navbar_height = 70;
603
604/** Login page could show an informational text */
605$tlCfg->login_info = ''; // Empty by default
606
607
608
609/**
610 * controls if pagination (via Javascript) will be enabled
611 */
612$tlCfg->gui->projectView = new stdClass();
613$tlCfg->gui->projectView->pagination = new stdClass();
614$tlCfg->gui->projectView->pagination->enabled = true;
615$tlCfg->gui->projectView->pagination->length = '[20, 40, 60, -1], [20, 40, 60, "All"]';
616
617$tlCfg->gui->usersAssign = new stdClass();
618$tlCfg->gui->usersAssign->pagination = new stdClass();
619$tlCfg->gui->usersAssign->pagination->enabled = true;
620$tlCfg->gui->usersAssign->pagination->length = '[20, 40, 60, -1], [20, 40, 60, "All"]';
621
622$tlCfg->gui->planView = new stdClass();
623$tlCfg->gui->planView->pagination = new stdClass();
624$tlCfg->gui->planView->pagination->enabled = true;
625$tlCfg->gui->planView->pagination->length = '[20, 40, 60, -1], [20, 40, 60, "All"]';
626$tlCfg->gui->planView->itemQtyForTopButton = 10;
627
628$tlCfg->gui->buildView = new stdClass();
629$tlCfg->gui->buildView->itemQtyForTopButton = 10;
630
631
632/**
633 * controls if operation area (buttons) starts open ('' or 'inline') or closed ('none') on:
634 * - test suite management
635 * - test case management
636 * - req. spec management
637 * - req. management
638 */
639$tlCfg->gui->op_area_display = new stdClass();
640
641// test_spec_container => test project, test suite
642$tlCfg->gui->op_area_display->test_spec_container = 'none'; // ''
643$tlCfg->gui->op_area_display->test_case = 'none'; // 'inline'
644$tlCfg->gui->op_area_display->req_spec_container = 'none'; // 'inline'
645$tlCfg->gui->op_area_display->req = 'none'; // 'inline'
646
647
648
649/**
650 * @var string Availability of Test Project specific background colour
651 * 'background' -> standard behaviour for 1.6.x you can have a different
652 * background colour for every test project.
653 * 'none' -> new behaviour no background color change
654 */
655$tlCfg->gui->testproject_coloring = 'none'; // I'm sorry default is not coloring using coloring is a pain
656 // and useless
657/** @TODO havlatm4francisco Ok, then merge these two attributes into one */
658/** default background color */
659$tlCfg->gui->background_color = '#9BD';
660
661// ENABLED: on features that assign user role to test projects and test plan, colour user name
662// according GLOBAL role
663// DISABLED: do not color [STANDARD BEHAVIOUR]
664$tlCfg->gui->usersAssignGlobalRoleColoring = DISABLED;
665
666
667// Enable/disable rounded corners via javascript
668$tlCfg->gui->round_corners = new stdClass();
669$tlCfg->gui->round_corners->exec_history = ENABLED;
670$tlCfg->gui->round_corners->tc_title = ENABLED;
671$tlCfg->gui->round_corners->tc_spec = ENABLED;
672
673/**
674 * Display name definition (used to build a human readable display name for users)
675 * Example of values:
676 * '%first% %last%' -> John Cook
677 * '%last%, %first%' -> Cook John
678 * '%first% %last% %login%' -> John Cook [ux555]
679 **/
680$tlCfg->username_format = '%login%';
681
682/** Configure the frame frmWorkArea navigator width */
683$tlCfg->frame_workarea_default_width = "30%";
684
685/** true => icon edit will be added into <a href> as indication an edit features */
686$tlCfg->gui->show_icon_edit = false;
687
688/**
689 * '' => test project name
690 * 'prefix' => prefix : test project name
691 *
692 * ATTENTION : * is used to indicate test project is INACTIVE
693 * see also $tlCfg->gui->tprojects_combo_order_by
694 */
695$tlCfg->gui->tprojects_combo_format = 'prefix';
696
697
698/**
699 * Order to use when building a testproject combobox (value must be SQL compliant)
700 * For example:
701 * 'ORDER BY name'
702 * 'ORDER_BY nodes_hierarchy.id DESC' -> similar effect to order last created firts
703 **/
704// $tlCfg->gui->tprojects_combo_order_by = 'ORDER BY nodes_hierarchy.id DESC';
705$tlCfg->gui->tprojects_combo_order_by = 'ORDER BY TPROJ.prefix ASC';
706
707
708
709/** Configure the input size of test case search by id on navigation bar.
710 * This value will be added to the length of the prefix to dynamically set input size.
711 * Example: prefix is "projectA-" -> length of prefix is 9
712 * Now the here defined value (default: 6) will be added to the prefix length
713 * -> Input field will have an input size of 15
714 **/
715$tlCfg->gui->dynamic_quick_tcase_search_input_size = 6;
716
717// used to round percentages on metricsDashboard.php
718$tlCfg->dashboard_precision = 2;
719
720/**
721 * Choose what kind of webeditor you want to use in every TL area. This configuration
722 * will be used if no element with search key (area) is found on this structure.
723 * Every element is a mp with this configuration keys:
724 *
725 * 'type':
726 * 'ckeditor'
727 * 'tinymce' ==> will be deprecated in future versions
728 * 'none' -> use plain text area input field
729 * 'toolbar': only applicable for type = 'fckeditor', 'ckeditor'
730 * name of ToolbarSet (See: http://docs.fckeditor.net/ for more information about ToolbarSets)
731 * TestLink stores own definitions in <testlink_dir>/cfg/tl_ckeditor_config.js
732 *
733 *
734 * The next keys/areas are supported:
735 * 'all' (default setting),
736 * 'design', 'steps_design', 'testplan', 'build', 'testproject', 'role', 'requirement', 'requirement_spec'.
737 *
738 * Examples:
739 * <code>
740 * // Copy this to custom_config.inc.php if you want use 'tinymce' as default.
741 * $tlCfg->gui->text_editor['all'] = array( 'type' => 'tinymce');
742 * // Copy this to custom_config.inc.php if you want use 'nome' as default.
743 * $tlCfg->gui->text_editor['all'] = array( 'type' => 'none');
744 * //This configuration is useful only if default type is set to 'fckeditor'
745 * $tlCfg->gui->text_editor['design'] = array('toolbar' => 'tl_mini');
746 *
747 * $tlCfg->gui->text_editor['testplan'] = array( 'type' => 'none');
748 * $tlCfg->gui->text_editor['build'] = array( 'type' => 'fckeditor','toolbar' => 'tl_mini');
749 * $tlCfg->gui->text_editor['testproject'] = array( 'type' => 'tinymce');
750 * $tlCfg->gui->text_editor['role'] = array( 'type' => 'tinymce');
751 * $tlCfg->gui->text_editor['requirement'] = array( 'type' => 'none');
752 * $tlCfg->gui->text_editor['requirement_spec'] = array( 'type' => 'none');
753 * </code>
754 *
755 * Hint: After doing configuration changes, clean you Browser's cookies and cache
756 */
757/*
758$tlCfg->gui->text_editor = array();
759$tlCfg->gui->text_editor['all'] = array('type' => 'fckeditor',
760 'toolbar' => 'tl_default',
761 'configFile' => 'cfg/tl_ckeditor_config.js',);
762$tlCfg->gui->text_editor['execution'] = array( 'type' => 'none');
763*/
764
765$tlCfg->gui->text_editor = array();
766$tlCfg->gui->text_editor['all'] = array('type' => 'ckeditor','toolbar' => 'Testlink',
767 'configFile' => 'cfg/tl_ckeditor_config.js',
768 'height' => 150);
769
770// mini toolbar for test case steps edit
771$tlCfg->gui->text_editor['steps_design'] = array('type' => 'ckeditor','toolbar' => 'TestlinkMini',
772 'configFile' => 'cfg/tl_ckeditor_config.js',
773 'height' => 100);
774
775$tlCfg->gui->text_editor['execution'] = array( 'type' => 'none');
776$tlCfg->gui->text_editor['edit_execution'] = array( 'type' => 'none', 'cols' => 80, 'rows' => 20);
777$tlCfg->gui->text_editor['display_execution_notes'] = array('type' => 'none', 'cols' => 80, 'rows' => 20);
778
779/** User can choose order of menu areas */
780$tlCfg->gui->layoutMainPageLeft = array( 'testProject' => 1, 'userAdministration' => 2 ,
781 'requirements' => 3, 'testSpecification' => 4,
782 'general' => 5);
783$tlCfg->gui->layoutMainPageRight = array( 'testPlan' => 1, 'testExecution' => 2 ,
784 'testPlanContents' => 3);
785
786/**
787 * Enable warning on a changed content before an user leave a page.
788 *
789 * Tested in:
790 * - IE8 OK
791 * - Firefox 3 OK
792 * - Chrome FAIL
793 *
794 * Does not work in Webkit browsers (Chrome, Safari) when using frames.
795 * Bug in webkit: https://bugs.webkit.org/show_bug.cgi?id=19418
796 */
797
798// seems that with config options that will be used on javascript via smarty template variables
799// we are having problems using FALSE/TRUE => use 0/1 (or our CONSTANT DISABLED/ENABLED)
800$tlCfg->gui->checkNotSaved = ENABLED;
801
802
803// ----------------------------------------------------------------------------
804/* [GUI: TREE] */
805
806/** Default ordering value for new Test Suites and Test Cases to separate them */
807$tlCfg->treemenu_default_testsuite_order = 1;
808$tlCfg->treemenu_default_testcase_order = 1000;
809
810/** show/hide testcase id on tree menu */
811$tlCfg->treemenu_show_testcase_id = TRUE;
812
813/** Reorder test cases based on TC Name or External ID in tree on
814 * test suite level using reorder button
815 */
816// 'EXTERNAL_ID' -> Sort on Test Case External ID field displayed on tree.(Default)
817// 'NAME' -> Sort on Test Case Name field
818
819$tlCfg->testcase_reorder_by = 'EXTERNAL_ID';
820// $tlCfg->testcase_reorder_by = 'NAME';
821
822// ----------------------------------------------------------------------------
823/* [GUI: Javascript libraries] */
824
825// May be in future another table sort engine will be better
826// kryogenix.org -> Stuart Langridge sortTable
827// '' (empty string) -> disable table sorting feature
828$g_sort_table_engine='kryogenix.org';
829
830
831// --------------------------------------------------------------------------------------
832/* [Reports] */
833$tlCfg->reportsCfg=new stdClass();
834
835//Displayed execution statuses to use on reports (ordered). */
836$tlCfg->reportsCfg->exec_status = $tlCfg->results['status_label_for_exec_ui'];
837
838/**
839 * Default Offset in seconds for reporting start date (reports with date range)
840 * @uses lib/results/resultsMoreBuilds.php
841 */
842$tlCfg->reportsCfg->start_date_offset = (7*24*60*60); // one week
843
844// minutes part is ignored but must be configured.
845// Hint: set always to :00
846$tlCfg->reportsCfg->start_time = '00:00';
847
848// Result matrix (resultsTC.php)
849// Shows an extra column with the result of the latest execution on
850// the lastest CREATED build
851$tlCfg->resultMatrixReport->buildColumns['showExecutionResultLatestCreatedBuild'] = true;
852
853// Result matrix (resultsTC.php)
854// Shows an extra column with the note of latest execution on
855// the lastest CREATED build
856$tlCfg->resultMatrixReport->buildColumns['showExecutionNoteLatestCreatedBuild'] = true;
857
858// Show build columns in revers order. The latest build is to the left
859$tlCfg->resultMatrixReport->buildColumns['latestBuildOnLeft'] = false;
860
861// After having got performance and usability issue, a limit on max qty of builds
862// allowed on data extration has been set.
863// Is absolutely arbitrary
864//
865$tlCfg->resultMatrixReport->buildQtyLimit = 6;
866
867// ORDER BY sql clause, refers to builds table columns
868$tlCfg->resultMatrixReport->buildOrderByClause = " ORDER BY name ASC";
869
870
871// Show all available status details for test plans on metrics dashboard
872$tlCfg->metrics_dashboard = new stdClass();
873$tlCfg->metrics_dashboard->show_test_plan_status = false;
874
875
876
877
878// ----------------------------------------------------------------------------
879/* [GENERATED DOCUMENTATION] */
880
881/**
882 * Texts and settings for printed documents
883 * Image is expected in directory <testlink_root>/gui/themes/<your_theme>/images/
884 * Leave text values empty if you would like to hide parameters.
885 */
886$tlCfg->document_generator->company_name = 'TestLink Community [configure $tlCfg->document_generator->company_name]';
887$tlCfg->document_generator->company_copyright = '2012 © TestLink Community';
888$tlCfg->document_generator->confidential_msg = '';
889
890// Logo for generated documents
891$tlCfg->document_generator->company_logo = $tlCfg->logo_login;
892$tlCfg->document_generator->company_logo_height = '53';
893
894/** CSS used in printed html documents */
895$tlCfg->document_generator->css_template = 'css/tl_documents.css';
896
897// CSS file for Requirement Specification Document, Requirement and Requirement Spec Print View
898$tlCfg->document_generator->requirement_css_template = 'css/tl_documents.css';
899
900/** Misc settings */
901// Display test case version when creating:
902// - test spec document
903// - test reports
904$tlCfg->document_generator->tc_version_enabled = TRUE;
905
906
907
908// ----------------------------------------------------------------------------
909/* [Test Executions] */
910
911// ENABLED -> enable XML-RPC calls to external test automation server
912// new buttons will be displayed on execution pages
913// DISABLED -> disable
914$tlCfg->exec_cfg->enable_test_automation = DISABLED;
915
916
917// ASCending -> last execution at bottom
918// DESCending -> last execution on top [STANDARD BEHAVIOUR]
919$tlCfg->exec_cfg->history_order = 'DESC';
920
921// TRUE -> the whole execution history for the choosen build will be showed
922// FALSE -> just last execution for the choosen build will be showed [STANDARD BEHAVIOUR]
923$tlCfg->exec_cfg->history_on = FALSE;
924
925// TRUE -> test case VERY LAST (i.e. in any build) execution status will be displayed [STANDARD BEHAVIOUR]
926// FALSE -> only last result on current build.
927$tlCfg->exec_cfg->show_last_exec_any_build = TRUE;
928
929// TRUE -> History for all builds will be shown
930// FALSE -> Only history of the current build will be shown [STANDARD BEHAVIOUR]
931$tlCfg->exec_cfg->show_history_all_builds = FALSE;
932
933// TRUE -> History for all platforms (if any exists for test plan) will be shown
934// FALSE -> Only history of the current platform will be shown [STANDARD BEHAVIOUR]
935$tlCfg->exec_cfg->show_history_all_platforms = FALSE;
936
937// different models for the attachments management on execution page
938// $att_model_m1 -> shows upload button and title
939// $att_model_m2 -> hides upload button and title
940$tlCfg->exec_cfg->att_model = $att_model_m2; //defined in const.inc.php
941
942
943// ENABLED -> test cases will be coloured according to test case status
944$tlCfg->exec_cfg->enable_tree_testcases_colouring = ENABLED;
945
946// ENABLED -> test cases will be coloured according to execution status on build selected for execution
947// DISABLED -> test cases will be coloured according status on latest execution regardless of selected build
948// see http://mantis.testlink.org/view.php?id=3450 for more details
949$tlCfg->exec_cfg->testcases_colouring_by_selected_build = ENABLED;
950
951// ENABLED -> test case counters will be coloured according to test case status
952$tlCfg->exec_cfg->enable_tree_counters_colouring = ENABLED;
953
954
955// This can help to avoid performance problems.
956// Controls what happens on right frame when user clicks on a testsuite on tree.
957// ENABLED -> show all test cases
958// see $tlCfg->exec_cfg->show_testsuite_contents_deep
959//
960// DISABLED -> nothing happens, to execute a test case you need to click on test case
961$tlCfg->exec_cfg->show_testsuite_contents = DISABLED;
962
963// @since 1.9.13
964// works in 'team' with $tlCfg->exec_cfg->show_testsuite_contents
965// children: only direct children.
966// deep: all test cases present in test suite and test suites in any level below
967// selected test suite.
968// IMPORTANT NOTICE:
969// selecting deep can create performance issues.
970//
971$tlCfg->exec_cfg->show_testsuite_contents_deep = 'children';
972
973
974// ENABLED -> enable testcase counters by status on tree
975$tlCfg->exec_cfg->enable_tree_testcase_counters = ENABLED;
976
977
978// Define list of roles that are affected by:
979// $tlCfg->exec_cfg->view_mode and $tlCfg->exec_cfg->exec_mode
980// User must reconfigure if define other simple tester roles
981//
982// In addition (till code changes) also roles that verify this condition:
983// $effective_role->hasRight('testplan_execute') and !$effective_role->hasRight('testplan_planning')
984// Will be affected by:
985// $tlCfg->exec_cfg->view_mode and $tlCfg->exec_cfg->exec_mode
986//
987$tlCfg->exec_cfg->simple_tester_roles=array(TL_ROLES_TESTER);
988
989// Filter Test cases a user with tester role can VIEW depending on
990// test execution assignment.
991// all: all test cases.
992// assigned_to_me: test cases assigned to logged user.
993// assigned_to_me_or_free: test cases assigned to logged user or not assigned
994$tlCfg->exec_cfg->view_mode->tester='assigned_to_me';
995
996// Filter Test cases a user with tester role can EXECUTE depending on
997// test execution assignment.
998// all: all test cases.
999// assigned_to_me: test cases assigned to logged user.
1000// assigned_to_me_or_free: test cases assigned to logged user or not assigned
1001$tlCfg->exec_cfg->exec_mode->tester='assigned_to_me';
1002
1003
1004// How to set defaut values for execution fields (standard & custom)
1005// clean => all clean
1006// latest => get as much as possible values from latest execution on
1007// same context => test plan,platform, build
1008$tlCfg->exec_cfg->exec_mode->new_exec='clean';
1009
1010
1011// @since 1.9.15
1012// Before 1.9.15 save & move to next worked JUST inside
1013// a test suite => save_and_move = 'limited'
1014// 1.9.15 will move on whole test project
1015// save_and_move = 'unlimited'
1016$tlCfg->exec_cfg->exec_mode->save_and_move='unlimited';
1017
1018/**
1019 * @since 1.9.17
1020 *
1021 */
1022$tlCfg->exec_cfg->exec_mode->addLinkToTLChecked = false;
1023
1024/** User filter in Test Execution navigator - default value */
1025// logged_user -> combo will be set to logged user
1026// none -> no filter applied by default
1027$tlCfg->exec_cfg->user_filter_default='none';
1028
1029
1030// 'horizontal' -> step and results on the same row
1031// 'vertical' -> steps on one row, results in the row bellow
1032$tlCfg->exec_cfg->steps_results_layout = 'horizontal';
1033
1034// true => on single test case execution feature, notes and result
1035// can be provided for each step
1036// false => pre 1.9.10 behaviour
1037//
1038$tlCfg->exec_cfg->steps_exec = true;
1039
1040// this setting will work on AND mode with:
1041// $tlCfg->exec_cfg->steps_exec
1042$tlCfg->exec_cfg->steps_exec_attachments = true;
1043
1044// When textarea is displayed to allow user to write execution notes
1045// at step level, choose what to display:
1046// 'empty'
1047// 'latest' => latest execution notes.
1048$tlCfg->exec_cfg->steps_exec_notes_default = 'empty';
1049
1050
1051// 'empty'
1052// 'latest' => latest execution notes.
1053$tlCfg->exec_cfg->steps_exec_status_default = 'empty';
1054
1055// Parameters to show notes/details when entering test execution feature
1056// EXPAND: show expanded/open
1057// COLLAPSE: show collapsed/closede
1058// LAST_USER_CHOICE: get status from cookie that holds last user choice.[STANDARD BEHAVIOUR]
1059$tlCfg->exec_cfg->expand_collapse = new stdClass();
1060$tlCfg->exec_cfg->expand_collapse->testplan_notes = LAST_USER_CHOICE;
1061$tlCfg->exec_cfg->expand_collapse->platform_description = LAST_USER_CHOICE;
1062$tlCfg->exec_cfg->expand_collapse->build_description = LAST_USER_CHOICE;
1063$tlCfg->exec_cfg->expand_collapse->testsuite_details = LAST_USER_CHOICE;
1064
1065
1066
1067$tlCfg->exec_cfg->copyLatestExecIssues = new stdClass();
1068
1069// true => When saving an execution, a new option will be displayed, and user will be
1070// able to do a choice
1071// COPY OR NOT issues linked to latest execution to the new execution
1072// DEAFULT false => no option on GUI
1073
1074$tlCfg->exec_cfg->copyLatestExecIssues->enabled = FALSE;
1075
1076
1077// value to set as default
1078$tlCfg->exec_cfg->copyLatestExecIssues->default = FALSE;
1079
1080// you can choose only between columns present on
1081// (see exec.inc.php, function get_bugs_for_exec())
1082$tlCfg->exec_cfg->bugs_order_clause = ' ORDER BY builds.name,step_number,bug_id ';
1083
1084$tlCfg->exec_cfg->features = new stdClass();
1085$tlCfg->exec_cfg->features->attachments = new stdClass();
1086$tlCfg->exec_cfg->features->attachments->enabled = true;
1087$tlCfg->exec_cfg->features->exec_duration = new stdClass();
1088$tlCfg->exec_cfg->features->exec_duration->enabled = true;
1089
1090$tlCfg->exec_cfg->issues = new stdClass();
1091$tlCfg->exec_cfg->issues->tcase_level = new stdClass();
1092$tlCfg->exec_cfg->issues->tcstep_level = new stdClass();
1093
1094/**
1095 * %%STEPNUMBER%%,%%TCNAME%%,%%PROJECTNAME%%,%%PLANNAME%%
1096 * %%BUILDNAME%%,%%PLATFNAME%%,%%EXECTSISO%%,
1097 * %%TCPATHNAME%%
1098 *
1099 * /saado/TS100/SAA-4:WSTEPS Executed ON (ISO FORMAT): 2018-02-25CET10:00
1100 */
1101$tlCfg->exec_cfg->issues->tcase_level->subject =
1102'$$issue_subject_tcname %%TCPATHNAME%% - $$issue_subject_execon %%EXECTSISO%% ';
1103
1104/*
1105$tlCfg->exec_cfg->issues->tcstep_level->subject =
1106'$$issue_on_step %%STEPNUMBER%% - $$issue_subject_tcname %%TCNAME%% - ' .
1107'$$issue_subject_projectname %%PROJECTNAME%% - ' .
1108'$$issue_subject_planname %%PLANNAME%% - ' .
1109'$$issue_subject_buildname %%BUILDNAME%% - ' .
1110'$$issue_subject_platfname %%PLATFNAME%%';
1111*/
1112
1113$tlCfg->exec_cfg->issues->tcstep_level->subject = '$$issue_on_step %%STEPNUMBER%% - $$issue_subject_tcname %%TCNAME%% ';
1114
1115
1116
1117
1118// ----------------------------------------------------------------------------
1119/* [Test Specification] */
1120
1121// TRUE will be displayed when displayed a test case
1122$tlCfg->spec_cfg->show_tplan_usage = TRUE;
1123
1124// 'horizontal' -> step and results on the same row
1125// 'vertical' -> steps on one row, results in the row bellow
1126$tlCfg->spec_cfg->steps_results_layout = 'horizontal';
1127
1128
1129// ENABLED -> User will see a test suite filter while creating test specification
1130// DISABLED -> no filter available
1131// $g_spec_cfg->show_tsuite_filter = ENABLED;
1132$tlCfg->spec_cfg->show_tsuite_filter = ENABLED;
1133
1134// ENABLED -> every time user do some operation on test specification
1135// tree is updated on screen.
1136// DISABLED -> tree will not be updated, user can update it manually.
1137// Anyway on user interface user will be able to change this choice
1138// $g_spec_cfg->automatic_tree_refresh = ENABLED;
1139$tlCfg->spec_cfg->automatic_tree_refresh = ENABLED;
1140
1141
1142// To avoid perfomance problems on search test case feature,
1143// we can decide when to inform user that results can not be displayed
1144// due to too many results.
1145$tlCfg->testcase_cfg->search=new stdClass();
1146$tlCfg->testcase_cfg->search->max_qty_for_display=200;
1147
1148
1149$tlCfg->testcase_cfg->duplicated_name_algorithm = new stdClass();
1150// 'stringPrefix' => use duplicated_name_algorithm->text
1151// 'counterSuffix' => creare name as :
1152// test case title + (number of existent test cases +1)
1153// example: My Test Title 2
1154// duplicated_name_algorithm->text is used as sprintf format mask
1155$tlCfg->testcase_cfg->duplicated_name_algorithm->type = 'stringPrefix';
1156$tlCfg->testcase_cfg->duplicated_name_algorithm->text = "%Y%m%d-%H:%M:%S";
1157
1158// $tlCfg->testcase_cfg->duplicated_name_algorithm->type = 'counterSuffix';
1159// $tlCfg->testcase_cfg->duplicated_name_algorithm->text = " (%s)";
1160
1161
1162// TICKET 6422: Estimation in Test specification as mandatory field
1163// Implemented using HTML5
1164$tlCfg->testcase_cfg->estimated_execution_duration = new stdClass();
1165// $tlCfg->testcase_cfg->estimated_execution_duration->required = 'required';
1166$tlCfg->testcase_cfg->estimated_execution_duration->required = '';
1167
1168
1169
1170// There are some preconfigured standard types which you can use,
1171// additionally you can configure your own types.
1172$tlCfg->testcase_cfg->relations = new stdClass();
1173$tlCfg->testcase_cfg->relations->enable = TRUE;
1174$tlCfg->testcase_cfg->relations->interproject_linking = FALSE;
1175
1176
1177/**
1178 * Localization identifiers for test cases relation types
1179 * Types, which are configured above, have to be configured
1180 * here too with attributes "source" and "destination".
1181 *
1182 * Last value will be selected in GUI as default.
1183 *
1184 * Form has to be like this:
1185 *
1186 * ... = array(
1187 * RELATIONNAME => array(
1188 * 'source' => 'SOURCE_LOCALIZATION_KEY',
1189 * 'destination' => 'DESTINATION_LOCALIZATION_KEY'),
1190 * ...
1191 *
1192 * @since TestLink 1.9.12
1193 **/
1194
1195$tlCfg->testcase_cfg->relations->type_labels = array(
1196 TL_REL_TYPE_PARENT_CHILD => array('source' => 'parent_of','destination' => 'child_of'),
1197 TL_REL_TYPE_BLOCKS_DEPENDS => array('source' => 'blocks','destination' => 'depends'),
1198 TL_REL_TYPE_RELATED => array('source' => 'related_to','destination' => 'related_to')
1199);
1200
1201
1202
1203$tlCfg->testcase_cfg->relations->type_description = array(TL_REL_TYPE_PARENT_CHILD => 'parent_child',
1204 TL_REL_TYPE_BLOCKS_DEPENDS => 'blocks_depends',
1205 TL_REL_TYPE_RELATED => 'related_to');
1206
1207
1208
1209
1210// @since 1.9.18
1211// TRUE => After a test case version has been executed
1212// attachment on test case spec can not be added/removed
1213//
1214// FALSE
1215//
1216// This means that at GUI Level, will not be possible:
1217// add a new attachment to an Executed Test Case Version
1218// delete an attachment from Executed Test Case Version
1219$tlCfg->testcase_cfg->downloadOnlyAfterExec = TRUE;
1220
1221// This means that at GUI Level, will not be possible:
1222// add a new req version link to an Executed Test Case Version
1223// delete a req version link from Executed Test Case Version
1224$tlCfg->testcase_cfg->reqLinkingDisabledAfterExec = TRUE;
1225
1226// Effects on Linked Requirements Version after
1227// execution of a Test Case Version
1228$tlCfg->testcase_cfg->freezeReqVersionAfterExec = TRUE;
1229
1230
1231// Effects on TCVersion N when TCVersion N+1 is created
1232$tlCfg->testcase_cfg->freezeTCVersionOnNewTCVersion = TRUE;
1233$tlCfg->testcase_cfg->freezeTCVRelationsOnNewTCVersion = TRUE;
1234
1235// Because:
1236// The Relation must be frozen (cannot be deleted) when
1237// a new version of the test case is created.
1238//
1239// It seems confusing that relation can be added, then
1240// this new configuration will allow this operation
1241// only on latest test case version
1242//
1243$tlCfg->testcase_cfg->addTCVRelationsOnlyOnLatestTCVersion = TRUE;
1244
1245
1246// Not Already Implemented
1247//$tlCfg->testcase_cfg->allowAddTCVRelationsOnOldTCVersion = TRUE;
1248
1249//$tlCfg->testcase_cfg->frozenNotExecutedTCVDelAttachtments = FALSE;
1250//$tlCfg->testcase_cfg->frozenNotExecutedTCVAddAttachtments = FALSE;
1251//$tlCfg->testcase_cfg->frozenNotExecutedTCVAddTCVRel = FALSE;
1252//$tlCfg->testcase_cfg->frozenNotExecutedTCVDelTCVRel = FALSE;
1253//$tlCfg->testcase_cfg->frozenNotExecutedTCVAddREQVLink = FALSE;
1254//$tlCfg->testcase_cfg->frozenNotExecutedTCVDelREQVLink = FALSE;
1255
1256
1257
1258
1259// Effects on Req Version to TCVersion LINK
1260// when a new version of a linked Test Case is created
1261$tlCfg->reqTCLinks->freezeLinkOnNewTCVersion = TRUE;
1262
1263// Effects on Req Version to TCVersion LINK
1264// when a new version of a linked Req Version is created
1265$tlCfg->reqTCLinks->freezeLinkOnNewREQVersion = TRUE;
1266
1267
1268// Effects on BOTH ends of Req Version to TCVersion LINK
1269// when a new version of a linked TC Version is created
1270$tlCfg->reqTCLinks->freezeBothEndsOnNewTCVersion = TRUE;
1271
1272// Effects on BOTH ends of Req Version to TCVersion LINK
1273// when a new version of a linked REQ Version is created
1274$tlCfg->reqTCLinks->freezeBothEndsOnNewREQVersion = TRUE;
1275
1276
1277// Effects on REQ Version N when REQ Version N+1 is created
1278$tlCfg->req_cfg->freezeREQVersionOnNewREQVersion = TRUE;
1279
1280
1281
1282
1283/** text template for a new items:
1284 Test Case: summary, steps, expected_results, preconditions
1285
1286*/
1287// object members has SAME NAME that FCK editor objects.
1288// the logic present on tcEdit.php is dependent of this rule.
1289// every text object contains an object with following members: type and value
1290//
1291// Possible values for type member:
1292// none: template will not be used, default will be a clean editor screen.
1293//
1294// string: value of value member is assigned to FCK object
1295// string_id: value member is used in a lang_get() call, and return value
1296// is assigned to FCK object. Configure string_id on custom_strings.txt
1297// value: value member is used as file name.
1298// file is readed and it's contains assigned to FCK object
1299//
1300// any other value for type, results on '' assigned to FCK object
1301
1302$tlCfg->testcase_template = new stdClass();
1303
1304$tlCfg->testcase_template->summary = new stdClass();
1305$tlCfg->testcase_template->summary->type = 'none';
1306$tlCfg->testcase_template->summary->value = '';
1307
1308$tlCfg->testcase_template->steps = new stdClass();
1309$tlCfg->testcase_template->steps->type = 'none';
1310$tlCfg->testcase_template->steps->value = '';
1311
1312$tlCfg->testcase_template->expected_results = new stdClass();
1313$tlCfg->testcase_template->expected_results->type = 'none';
1314$tlCfg->testcase_template->expected_results->value = '';
1315
1316$tlCfg->testcase_template->preconditions = new stdClass();
1317$tlCfg->testcase_template->preconditions->type = 'none';
1318$tlCfg->testcase_template->preconditions->value = '';
1319
1320
1321/** text template for a new Test Suite description */
1322$tlCfg->testsuite_template = new stdClass();
1323$tlCfg->testsuite_template->details = new stdClass();
1324$tlCfg->testsuite_template->details->type = 'none';
1325$tlCfg->testsuite_template->details->value = '';
1326
1327$tlCfg->project_template = new stdClass();
1328$tlCfg->project_template->notes = new stdClass();
1329$tlCfg->project_template->notes->type = 'none';
1330$tlCfg->project_template->notes->value = '';
1331
1332$tlCfg->testplan_template = new stdClass();
1333$tlCfg->testplan_template->notes = new stdClass();
1334$tlCfg->testplan_template->notes->type = 'none';
1335$tlCfg->testplan_template->notes->value = '';
1336
1337$tlCfg->execution_template = new stdClass();
1338$tlCfg->execution_template->bulk_exec_notes = new stdClass();
1339$tlCfg->execution_template->bulk_exec_notes->type = 'none';
1340$tlCfg->execution_template->bulk_exec_notes->value = '';
1341
1342$tlCfg->execution_template->notes = new stdClass();
1343$tlCfg->execution_template->notes->type = 'none';
1344$tlCfg->execution_template->notes->value = '';
1345
1346$tlCfg->build_template = new stdClass();
1347$tlCfg->build_template->notes = new stdClass();
1348$tlCfg->build_template->notes->type = 'none';
1349$tlCfg->build_template->notes->value = '';
1350
1351$tlCfg->requirement_template = new stdClass();
1352$tlCfg->requirement_template->scope = new stdClass();
1353$tlCfg->requirement_template->scope->type = 'none';
1354$tlCfg->requirement_template->scope->value = '';
1355
1356$tlCfg->req_spec_template = new stdClass();
1357$tlCfg->req_spec_template->scope = new stdClass();
1358$tlCfg->req_spec_template->scope->type = 'none';
1359$tlCfg->req_spec_template->scope->value = '';
1360
1361$tlCfg->role_template = new stdClass();
1362$tlCfg->role_template->notes = new stdClass();
1363$tlCfg->role_template->notes->type = 'none';
1364$tlCfg->role_template->notes->value = '';
1365
1366
1367$tlCfg->platform_template = new stdClass();
1368$tlCfg->platform_template->notes = new stdClass();
1369$tlCfg->platform_template->notes->type = 'none';
1370$tlCfg->platform_template->notes->value = '';
1371
1372// ----------------------------------------------------------------------------
1373/* [ATTACHMENTS] */
1374
1375/** Attachment feature availability */
1376$g_attachments = new stdClass();
1377$g_attachments->enabled = TRUE;
1378
1379// TRUE -> when you upload a file you can give no title
1380$g_attachments->allow_empty_title = TRUE;
1381
1382// $g_attachments->allow_empty_title == TRUE, you can ask the system
1383// to do something
1384//
1385// 'none' -> just write on db an empty title
1386// 'use_filename' -> use filename as title
1387//$g_attachments->action_on_save_empty_title='use_filename';
1388//
1389$g_attachments->action_on_save_empty_title = 'none';
1390
1391// Remember that title is used as link description for download
1392// then if title is empty, what the system has to do when displaying ?
1393// 'show_icon' -> the $g_attachments->access_icon will be used.
1394// 'show_label' -> the value of $g_attachments->access_string will be used .
1395$g_attachments->action_on_display_empty_title = 'show_icon';
1396
1397// Set display order of uploaded files
1398$g_attachments->order_by = " ORDER BY date_added DESC ";
1399
1400
1401// need to be moved AFTER include of custom_config
1402//
1403// $g_attachments->access_icon = '<img src="' . $tlCfg->theme_dir . 'images/new_f2_16.png" style="border:none" />';
1404$g_attachments->access_string = "[*]";
1405
1406
1407
1408
1409/** the type of the repository can be database or filesystem
1410 * TL_REPOSITORY_TYPE_DB => database
1411 * TL_REPOSITORY_TYPE_FS => filesystem
1412 **/
1413$g_repositoryType = TL_REPOSITORY_TYPE_FS;
1414
1415/**
1416 * TL_REPOSITORY_TYPE_FS: the where the filesystem repository should be located
1417 * We recommend to change the directory for security reason.
1418 * (see http://itsecuritysolutions.org/2012-08-13-TestLink-1.9.3-multiple-vulnerabilities/)
1419 * Put it out of reach via web or configure access denied.
1420 *
1421 **/
1422$g_repositoryPath = 'C:/xampp/htdocs/testlink-1.9.19/upload_area'; /* unix example */
1423
1424/**
1425 * compression used within the repository
1426 * TL_REPOSITORY_COMPRESSIONTYPE_NONE => no compression
1427 * TL_REPOSITORY_COMPRESSIONTYPE_GZIP => gzip compression
1428 */
1429$g_repositoryCompressionType = TL_REPOSITORY_COMPRESSIONTYPE_NONE;
1430
1431// the maximum allowed file size for each repository entry, default 1MB.
1432// Also check your PHP settings (default is usually 2MBs)
1433$tlCfg->repository_max_filesize = 1; //MB
1434
1435
1436
1437
1438// ----------------------------------------------------------------------------
1439/* [Requirements] */
1440
1441// HAS TO BE REMOVED - > req_doc_id UNIQUE INSIDE test project
1442// true : you want req_doc_id UNIQUE IN THE WHOLE DB (system_wide)
1443// false: you want req_doc_id UNIQUE INSIDE a SRS
1444// $tlCfg->req_cfg->reqdoc_id->is_system_wide = FALSE;
1445
1446$tlCfg->req_cfg->monitor_enabled = true;
1447
1448// truncate log message to this amount of chars for reqCompareVersions
1449$tlCfg->req_cfg->log_message_len = 200;
1450
1451/**
1452 * Test Case generation from Requirements - use_req_spec_as_testsuite_name
1453 * FALSE => test cases are created and assigned to a test suite
1454 * with name $tlCfg->req_cfg->default_testsuite_name
1455 * TRUE => REQuirement Specification Title is used as testsuite name
1456 */
1457$tlCfg->req_cfg->use_req_spec_as_testsuite_name = TRUE;
1458$tlCfg->req_cfg->default_testsuite_name = "Auto-created Test cases";
1459$tlCfg->req_cfg->testsuite_details = "Test Cases in the Test Suite are generated from Requirements. " .
1460 "A refinement of test scenario is highly recommended.";
1461$tlCfg->req_cfg->testcase_summary_prefix = "<b>The Test Case was generated from the assigned requirement.</b><br />";
1462
1463
1464// If the following value is enabled, then the summary prefix string will include the
1465// title and version number of the assigned requirement.
1466$tlCfg->req_cfg->use_testcase_summary_prefix_with_title_and_version = ENABLED;
1467
1468// If above option is enabled, the following string will be used as a template for the tc summary prefix.
1469// It has to include four variables in the form of "%s". The first and second one will be used internally by the system.
1470// The third one will then be replaced by the title of the originating Requirement,
1471// the fourth one by its version number.
1472// Attention: If there aren't exactly three variables in it, the operation will fail.
1473$tlCfg->req_cfg->testcase_summary_prefix_with_title_and_version = "<b>The Test Case was generated from the assigned" .
1474 " requirement <a href=\"javascript:openLinkedReqVersionWindow(%s,%s)\">\"%s\" (version %s)</a>.</b><br />";
1475
1476/**
1477 * ENABLED: When generating Test Cases from Requirements, copy the scope of the Requirement
1478 * to the summary of the newly created Test Case.
1479 */
1480$tlCfg->req_cfg->copy_req_scope_to_tc_summary = DISABLED;
1481
1482
1483// To avoid perfomance problems on search Requirements feature,
1484// we can decide when to inform user that results can not be displayed
1485// due to too many results.
1486$tlCfg->req_cfg->search=new stdClass();
1487$tlCfg->req_cfg->search->max_qty_for_display=200;
1488
1489
1490// ENABLED: allow N level depth tree
1491// DISABLED: just one level
1492$tlCfg->req_cfg->child_requirements_mgmt = ENABLED;
1493
1494
1495// ENABLED: ask for this value on user interface and use on several features
1496// DISABLED: do not ask, do not use
1497$tlCfg->req_cfg->expected_coverage_management = ENABLED;
1498
1499// Show Child Requirements on Requirement Specification Print View
1500// ENABLED: Requirement Specification including Child Requirements are shown
1501// DIABLED: ONLY Requirement Specification is shown
1502$tlCfg->req_cfg->show_child_reqs_on_reqspec_print_view = DISABLED;
1503
1504//
1505// Order of test cases status in this array, is used to undestand
1506// to what status set requirement in the requirements report.
1507// Standard algorithm, present in getReqCoverage(), is:
1508//
1509// if at least one of Test Cases linked to Requirement has status FAILED
1510// Requirement Coverage Status = FAILED
1511// else if at least one of Test Cases linked to Requirement has status BLOCKED
1512// Requirement Coverage Status = BLOCKED
1513// else if ALL Test Cases linked to Requirement has status NOT RUN
1514// Requirement Coverage Status = NOT RUN
1515// else if ALL Test Cases linked to Requirement has status PASSED
1516// Requirement Coverage Status = PASSED
1517// else
1518// Requirement Coverage Status = Partially Passed
1519//
1520// This logic is implemented using following config parameter
1521$tlCfg->req_cfg->coverageStatusAlgorithm['checkOrder']=array('atLeastOne','all');
1522$tlCfg->req_cfg->coverageStatusAlgorithm['checkType']['atLeastOne']=array('failed','blocked');
1523$tlCfg->req_cfg->coverageStatusAlgorithm['checkType']['all']=array('passed');
1524
1525// Configure here what status has to get requirement when check of type 'all' fails like
1526// in following situation (Mantis 2171)
1527//
1528// If particular requirement has assigned more than one test cases, and:
1529// - at least one of assigned test cases was not yet executed
1530// - the rest of assigned test cases was executed and passed
1531// then on the "Requirements based report" this particular requirement is not shown at all (in any section).
1532//
1533// $tlCfg->req_cfg->coverageStatusAlgorithm['checkFail']['all']='partially_passed';
1534// $tlCfg->req_cfg->coverageStatusAlgorithm['displayOrder']=array('passed','failed',
1535// 'blocked','not_run','partially_passed');
1536// 20100819 - asimon - fix not needed anymore after rewrite of req based report
1537//$tlCfg->req_cfg->coverageStatusAlgorithm['checkFail']['all']='failed';
1538//$tlCfg->req_cfg->coverageStatusAlgorithm['displayOrder']=array('passed','failed','blocked','not_run');
1539
1540
1541
1542
1543// truncate log message to this amount of chars for reqSpecCompareRevisions
1544$tlCfg->req_spec_cfg->log_message_len = 200;
1545
1546
1547// Linking between requirements/requirement specifications
1548//
1549$tlCfg->internal_links = new stdClass();
1550
1551//
1552// TRUE: links to other requirements/requirement specifications are
1553// automatically generated from the corresponding Document ID, enclosed by tags (like BBCode).
1554//
1555// Usage:
1556// link to requirements: [req]req_doc_id[/req]
1557// link to requirement specifications: [req_spec]req_spec_doc_id[/req_spec]
1558//
1559// The test project of the requirement / requirement specification and an anchor
1560// to jump to can also be specified:
1561// [req tproj=<tproj_prefix> anchor=<anchor_name>]req_doc_id[/req]
1562// This syntax also works for requirement specifications.
1563//
1564// FALSE: no links are automatically created.
1565//
1566$tlCfg->internal_links->enable = TRUE;
1567
1568// how a linked document (requirement/requirement specification) should be displayed.
1569// posible values:
1570// 'window': new window/tab will be used (depending on browser configuration)
1571// 'frame' : same frame as the clicked link
1572// 'popup' (default): popup window (ATTENTION to browser pop-up block).
1573//
1574$tlCfg->internal_links->target = 'popup';
1575
1576// title for automatically created link
1577// possible values:
1578// 'string': lang_get() will be used to localize
1579// 'none': no title will be generated, only link with ID
1580// 'item' (default): localized type of item (e.g. "Requirement: ", "Req Spec")
1581// will be used as title for the generated link
1582//
1583$tlCfg->internal_links->req_link_title = new stdClass();
1584$tlCfg->internal_links->req_link_title->type = 'item';
1585$tlCfg->internal_links->req_link_title->value = '';
1586
1587$tlCfg->internal_links->req_spec_link_title = new stdClass();
1588$tlCfg->internal_links->req_spec_link_title->type = 'item';
1589$tlCfg->internal_links->req_spec_link_title->value = '';
1590
1591
1592// Relations between requirement documents:
1593//
1594// The relation types have to be configured in cfg/const.inc.php
1595// and their respective localization values in locale strings.txt.
1596
1597// There are some preconfigured standard types which you can use,
1598// additionally you can configure your own types.
1599$tlCfg->req_cfg->relations = new stdClass();
1600$tlCfg->req_cfg->relations->enable = TRUE;
1601$tlCfg->req_cfg->relations->interproject_linking = FALSE;
1602
1603// Requirement/testcase diff
1604// default value of lines to show before and after each difference
1605$tlCfg->diffEngine->context = 5;
1606
1607
1608// Configuration for Requirement Import using DOCBOOK format
1609$tlCfg->req_cfg->importDocBook = new stdClass();
1610$tlCfg->req_cfg->importDocBook->requirement= "sect3";
1611$tlCfg->req_cfg->importDocBook->title= "title";
1612$tlCfg->req_cfg->importDocBook->paragraph= "para";
1613$tlCfg->req_cfg->importDocBook->ordered_list="orderedlist";
1614$tlCfg->req_cfg->importDocBook->list_item="listitem";
1615$tlCfg->req_cfg->importDocBook->table="informaltable";
1616$tlCfg->req_cfg->importDocBook->table_group="tgroup";
1617$tlCfg->req_cfg->importDocBook->table_head="thead";
1618$tlCfg->req_cfg->importDocBook->table_body="tbody";
1619$tlCfg->req_cfg->importDocBook->table_row="row";
1620$tlCfg->req_cfg->importDocBook->table_entry="entry";
1621$tlCfg->req_cfg->importDocBook->list_item_children = array('para','title');
1622$tlCfg->req_cfg->importDocBook->table_entry_children = array('para');
1623
1624
1625// If an external tool is used for requirement management, enable this setting.
1626// You will get an additional field on requirement specifications where you
1627// can enter the total count of requirements so that external requirements
1628// are also counted for metrics/statistics.
1629$tlCfg->req_cfg->external_req_management = DISABLED;
1630
1631
1632//If enabled an icon next to Document ID field will show up that allows
1633//to insert the last defined Requirement Document ID within the same Project
1634//into Document ID field
1635$tlCfg->req_cfg->allow_insertion_of_last_doc_id = DISABLED;
1636
1637
1638// used ONLY to configure the mask (text) .
1639// algorithm type is fixed HARDCODED
1640//
1641$tlCfg->req_cfg->duplicated_name_algorithm = new stdClass();
1642$tlCfg->req_cfg->duplicated_name_algorithm->text = " (%s)";
1643
1644$tlCfg->req_cfg->duplicated_docid_algorithm = new stdClass();
1645$tlCfg->req_cfg->duplicated_docid_algorithm->text = " (%s)";
1646
1647
1648// ----------------------------------------------------------------------------
1649/* [TREE FILTER CONFIGURATION] */
1650
1651/* In the following section, you can configure which filters shall be used
1652 * in combination with the tree view for testcases and requirements.
1653 * There are five available filter modes (four for the testcase tree,
1654 * one for requirement documents), which are used for the different features
1655 * as listed here:
1656 *
1657 * For Test Cases:
1658 * --> execution_mode
1659 * execution of testcases
1660 * --> edit_mode
1661 * create and edit testcases
1662 * assign keywords to testcases
1663 * assign requirements to testcases
1664 * --> plan_mode
1665 * assign testcase execution to users
1666 * update linked versions for testplan
1667 * set urgent testcases
1668 * --> plan_add_mode
1669 * add/remove testcases to/from testplan
1670 *
1671 * For Requirements:
1672 * There are no modes defined, there is only one filter configuration.
1673 * The filters configured here will be used for requirement editing.
1674 */
1675$tlCfg->tree_filter_cfg = new stdClass();
1676$tlCfg->tree_filter_cfg->testcases = new stdClass();
1677$tlCfg->tree_filter_cfg->requirements = new stdClass();
1678
1679// These are the available filter modes for testcases:
1680$tlCfg->tree_filter_cfg->testcases->execution_mode = new stdClass();
1681$tlCfg->tree_filter_cfg->testcases->edit_mode = new stdClass();
1682$tlCfg->tree_filter_cfg->testcases->plan_mode = new stdClass();
1683$tlCfg->tree_filter_cfg->testcases->plan_add_mode = new stdClass();
1684
1685// If you disable one of these items here, you switch
1686// the complete filter panel off for a specific mode/feature.
1687// You should rather do this here instead of individually disabling all the filters,
1688// if you don't want to have any filters at all for a given feature.
1689$tlCfg->tree_filter_cfg->testcases->execution_mode->show_filters = ENABLED;
1690$tlCfg->tree_filter_cfg->testcases->edit_mode->show_filters = ENABLED;
1691$tlCfg->tree_filter_cfg->testcases->plan_mode->show_filters = ENABLED;
1692$tlCfg->tree_filter_cfg->testcases->plan_add_mode->show_filters = ENABLED;
1693$tlCfg->tree_filter_cfg->requirements->show_filters = ENABLED;
1694
1695// Detailed settings for each mode.
1696// Here, the single filter fields can be disabled if not wanted.
1697// Also, the choice of advanced filter mode can be disabled.
1698$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_tc_id = ENABLED;
1699$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_testcase_name = ENABLED;
1700$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_toplevel_testsuite = ENABLED;
1701$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_keywords = ENABLED;
1702$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_priority = ENABLED;
1703$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_execution_type = ENABLED;
1704$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_assigned_user = ENABLED;
1705$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_custom_fields = ENABLED;
1706$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_result = ENABLED;
1707$tlCfg->tree_filter_cfg->testcases->execution_mode->filter_bugs = ENABLED;
1708$tlCfg->tree_filter_cfg->testcases->execution_mode->advanced_filter_mode_choice = ENABLED;
1709
1710$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_tc_id = ENABLED;
1711$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_testcase_name = ENABLED;
1712$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_toplevel_testsuite = ENABLED;
1713$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_keywords = ENABLED;
1714$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_active_inactive = ENABLED;
1715$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_importance = ENABLED;
1716$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_execution_type = ENABLED;
1717$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_custom_fields = ENABLED;
1718$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_workflow_status = ENABLED;
1719$tlCfg->tree_filter_cfg->testcases->edit_mode->advanced_filter_mode_choice = ENABLED;
1720
1721$tlCfg->tree_filter_cfg->testcases->edit_mode
1722 ->filter_workflow_status_values = array();
1723
1724$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_tc_id = ENABLED;
1725$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_testcase_name = ENABLED;
1726$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_toplevel_testsuite = ENABLED;
1727$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_keywords = ENABLED;
1728$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_priority = ENABLED;
1729$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_execution_type = ENABLED;
1730$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_assigned_user = ENABLED;
1731$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_custom_fields = ENABLED;
1732$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_result = ENABLED;
1733$tlCfg->tree_filter_cfg->testcases->plan_mode->advanced_filter_mode_choice = ENABLED;
1734$tlCfg->tree_filter_cfg->testcases->plan_mode->setting_build_inactive_out = FALSE;
1735$tlCfg->tree_filter_cfg->testcases->plan_mode->setting_build_close_out = FALSE;
1736
1737
1738$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_tc_id = ENABLED;
1739$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_testcase_name = ENABLED;
1740$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_toplevel_testsuite = ENABLED;
1741$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_keywords = ENABLED;
1742$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_active_inactive = ENABLED;
1743$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_importance = ENABLED;
1744$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_execution_type = ENABLED;
1745$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_workflow_status = ENABLED;
1746$tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_custom_fields = ENABLED;
1747$tlCfg->tree_filter_cfg->testcases->plan_add_mode->advanced_filter_mode_choice = ENABLED;
1748
1749$tlCfg->tree_filter_cfg->requirements->filter_doc_id = ENABLED;
1750$tlCfg->tree_filter_cfg->requirements->filter_title = ENABLED;
1751$tlCfg->tree_filter_cfg->requirements->filter_status = ENABLED;
1752$tlCfg->tree_filter_cfg->requirements->filter_type = ENABLED;
1753$tlCfg->tree_filter_cfg->requirements->filter_spec_type = ENABLED;
1754$tlCfg->tree_filter_cfg->requirements->filter_coverage = ENABLED;
1755$tlCfg->tree_filter_cfg->requirements->filter_relation = ENABLED;
1756$tlCfg->tree_filter_cfg->requirements->filter_tc_id = ENABLED;
1757$tlCfg->tree_filter_cfg->requirements->filter_custom_fields = ENABLED;
1758$tlCfg->tree_filter_cfg->requirements->advanced_filter_mode_choice = ENABLED;
1759
1760// ENABLED -> Every time the user does some operation on requirement spec,
1761// the tree will be updated on screen. [DEFAULT]
1762// DISABLED -> The tree will not be updated automatically, but the user can update it manually.
1763// On graphical user interface any user will is able to change this setting.
1764$tlCfg->tree_filter_cfg->requirements->automatic_tree_refresh = ENABLED;
1765
1766
1767
1768/* [Assign test cases to test plan] */
1769$tlCfg->tplanDesign->hideTestCaseWithStatusIn = array($tlCfg->testCaseStatus['obsolete'] => 'obsolete',
1770 $tlCfg->testCaseStatus['future'] => 'future' );
1771
1772// ----------------------------------------------------------------------------
1773/* [MISC FUNCTIONALITY] */
1774
1775/** Maximum uploadfile size to importing stuff in TL */
1776// Also check your PHP settings (default is usually 2MBs)
1777// unit BYTES is required by MAX_FILE_SIZE HTML option
1778$tlCfg->import_file_max_size_bytes = '409600';
1779
1780/** Maximum line size of the imported file */
1781$tlCfg->import_max_row = '10000'; // in chars
1782
1783/** Set the default role used for new users */
1784// - created from the login page.
1785// - created using user management features
1786$tlCfg->default_roleid = TL_ROLES_GUEST;
1787
1788// only show custom fields if their value isn't empty
1789$tlCfg->custom_fields->show_custom_fields_without_value = true;
1790
1791/** used to check size in char for TEXT AREA type custom fields */
1792// can not be greater that column definition on DB
1793// 0 => do not check.
1794$tlCfg->custom_fields->max_length = 255;
1795
1796// sizes for HTML INPUTS
1797// for list, multiselection list
1798// - MAXIMUM number of items displayed at once
1799//
1800// for checkbox,radio is useless
1801// Hint: more than 120 produce weird effects on user interface
1802//
1803$tlCfg->custom_fields->sizes = array('string' => 100,
1804 'numeric' => 10,
1805 'float' => 10,
1806 'email' => 100,
1807 'list' => 1,
1808 'multiselection list' => 5,
1809 'text area' => array('rows' => 6, 'cols' => 80),
1810 'script' => 100,
1811 'server' => 100);
1812
1813// Use this variable (on custom_config.inc.php) to define new Custom Field types.
1814// IMPORTANT:
1815// check $custom_field_types property on cfield_mgr.class.php
1816// to avoid overwrite of standard types.
1817//
1818$tlCfg->gui->custom_fields->types = null;
1819
1820// Use this variable (on custom_config.inc.php)
1821// to define possible values behaviour for new Custom Field types.
1822//
1823// IMPORTANT:
1824// check $possible_values_cfg property on cfield_mgr.class.php
1825// to avoid overwrite of standard values.
1826//
1827$tlCfg->gui->custom_fields->possible_values_cfg = null;
1828
1829
1830/**
1831 * Check unique titles of Test Project, Test Suite and Test Case
1832 * ENABLED => Check [STANDARD BEHAVIOUR]
1833 * DISABLED => don't check
1834 **/
1835$tlCfg->check_names_for_duplicates = ENABLED;
1836
1837/**
1838 * Action for duplication check (only if check_names_for_duplicates=ENABLED)
1839 * 'allow_repeat' => allow the name to be repeated (backward compatibility)
1840 * 'generate_new' => generate a new name using $g_prefix_name_for_copy
1841 * 'block' => return with an error
1842 **/
1843$tlCfg->action_on_duplicate_name = 'generate_new';
1844
1845/**
1846 * String checking and conversions
1847 * Allow automatically convert www URLs and email adresses into clickable links
1848 * used by function string_display_links() for example by custom fields.
1849 * Valid values = ENABLED/DISABLED.
1850 **/
1851$tlCfg->html_make_links = ENABLED;
1852
1853/**
1854 * Define the valid html tags for "content driven" single-line and multi-line fields.
1855 * Do NOT include tags with parameters (eg. <font face="arial">), img and href.
1856 * It's used by function string_display_links() for example by custom fields.
1857 */
1858$tlCfg->html_valid_tags = 'p, li, ul, ol, br, pre, i, b, u, em';
1859$tlCfg->html_valid_tags_single_line = 'i, b, u, em';
1860
1861/**
1862 * Defines the threshold values for filtering TC by a priority according to the formula
1863 * LOW => all Tc's with (urgency*importance) < LOW_Threshold
1864 * HIGH => all Tc's with (urgency*importance) >= HIGH_Threshold
1865 * MEDIUM => all Tc's with (urgency*importance) >= LOW_Threshold AND (urgency*importance) < HIGH_Threshold
1866 */
1867$tlCfg->urgencyImportance = new stdClass();
1868$tlCfg->urgencyImportance->threshold['low'] = 3;
1869$tlCfg->urgencyImportance->threshold['high'] = 6;
1870
1871/**
1872 * @var boolean Demo mode disables some functionality
1873 * user edit disable
1874 * role create ENABLED
1875 * user create ENABLED
1876 * special users manage DISABLE
1877 */
1878$tlCfg->demoMode = OFF;
1879$tlCfg->demoSpecialUsers = array('admin');
1880
1881/**
1882 * If enabled, every Ext JS table in TestLink will offer an export button,
1883 * which generates a file with the contents of the table.
1884 * ATTENTION: This feature is fully experimental. Enable at your own risk!
1885 * Enabling it can cause broken tables.
1886 */
1887$tlCfg->enableTableExportButton = DISABLED;
1888
1889
1890/**
1891 * Taken from Mantis to implement better login security, and solve
1892 * TICKET 4342
1893 */
1894$tlCfg->auth_cookie = "TESTLINK_USER_AUTH_COOKIE";
1895
1896/**
1897Used when creating a Test Suite using copy
1898and you have choose $g_action_on_duplicate_name = 'generate_new'
1899if the name exist.
1900*/
1901$g_prefix_name_for_copy = strftime("%Y%m%d-%H:%M:%S", time());
1902
1903
1904
1905/**
1906 * Configurable templates this can help if you want to use a non standard template.
1907 * i.e. you want to develop a new one without loosing the original template.
1908 * key: original TL template name WITHOUT extension
1909 * value: whatever name you want, only constrain you have to copy your template
1910 * ON SAME FOLDER where original template is.
1911 * See example below
1912 */
1913$g_tpl = array('inc_exec_controls' => 'inc_exec_img_controls.tpl');
1914//$g_tpl = array('inc_exec_controls' => 'inc_exec_controls.tpl');
1915
1916
1917// Example
1918// $g_tpl = array('tcView' => 'custom_tcView.tpl',
1919// 'tcSearchView' => 'myOwnTCSearchView.tpl',
1920// 'tcEdit' => 'tcEdit_ultraCool.tpl');
1921
1922/** Add o replace images */
1923$tlCfg->images = array();
1924
1925
1926
1927// ----------------------------------------------------------------------------
1928/* [PROXY] */
1929/* Used only */
1930/* mantissoapInterface.class.php */
1931/* jirasoapInterface.class.php */
1932/* jirarestInterface.class.php */
1933$tlCfg->proxy->host = null;
1934$tlCfg->proxy->port = null;
1935$tlCfg->proxy->login = null;
1936$tlCfg->proxy->password = null;
1937
1938
1939/** Plugins feature */
1940define('TL_PLUGIN_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR);
1941
1942// ----- End of Config ------------------------------------------------------------------
1943// --------------------------------------------------------------------------------------
1944// DO NOT DO CHANGES BELOW
1945// --------------------------------------------------------------------------------------
1946
1947/** Functions for check request status */
1948require_once('configCheck.php');
1949
1950
1951if( !defined('TL_JQUERY') )
1952{
1953 define('TL_JQUERY','jquery-2.2.4.min.js' );
1954}
1955
1956if( !defined('TL_DATATABLES_DIR') )
1957{
1958 define('TL_DATATABLES_DIR','DataTables-1.10.4' );
1959}
1960
1961/** root of testlink directory location seen through the web server */
1962/* 20070106 - franciscom - this statement it's not 100% right
1963 better use $_SESSION['basehref'] in the scripts. */
1964define('TL_BASE_HREF', get_home_url(array('force_https' => $tlCfg->force_https)));
1965
1966clearstatcache();
1967if ( file_exists( TL_ABS_PATH . 'custom_config.inc.php' ) )
1968{
1969 require_once( TL_ABS_PATH . 'custom_config.inc.php' );
1970}
1971
1972
1973if( !isset($g_attachments->access_icon) )
1974{
1975 $g_attachments->access_icon = '<img src="' . $tlCfg->theme_dir . 'images/new_f2_16.png" style="border:none" />';
1976}
1977
1978
1979// Important to do this only after custom_* to use (if exists) redefinition of
1980// $tlCfg->results['status_label_for_exec_ui']
1981$tlCfg->reportsCfg->exec_status = $tlCfg->results['status_label_for_exec_ui'];
1982
1983
1984/** Support for localization */
1985// @TODO move the code out of config and do it only once and
1986// not always in any include!
1987// @TODO a better parsing function should be include
1988$serverLanguage = false;
1989if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
1990{
1991 @list($code) = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
1992 @list($a,$b) = explode("-",$code);
1993 if ($a && $b)
1994 {
1995 $a = strtolower($a);
1996 $b = strtoupper($a);
1997 $serverLanguage = $a."_".$b;
1998 }
1999}
2000
2001if(false !== $serverLanguage)
2002{
2003 if (array_key_exists($serverLanguage,$tlCfg->locales))
2004 {
2005 $tlCfg->default_language = $serverLanguage;
2006 }
2007}
2008define ('TL_DEFAULT_LOCALE', $tlCfg->default_language);
2009
2010// Reverted execution status is used for two applications.
2011// 1. To map code to CSS, Please if you add an status you need to add a corresponding CSS Class
2012// in the CSS files (see the gui directory)
2013// 2. to decode from code to some more human oriented to use in code
2014//
2015/** Revered list of Test Case execution results */
2016$tlCfg->results['code_status'] = array_flip($tlCfg->results['status_code']);
2017
2018// Enable CSRF global protection
2019$tlCfg->csrf_filter_enabled = TRUE;
2020
2021// ---------------------------------------------------------------------------------
2022/** Converted and derived variables (Users should not modify this section) */
2023define('REFRESH_SPEC_TREE',$tlCfg->spec_cfg->automatic_tree_refresh ? 1 : 0);
2024define('TL_SORT_TABLE_ENGINE',$g_sort_table_engine);
2025define("TL_REPOSITORY_MAXFILESIZE", 1024*1024*$tlCfg->repository_max_filesize);
2026
2027define('TL_XMLEXPORT_HEADER', "<?xml version=\"1.0\" encoding=\"" . $tlCfg->charset . "\"?>\n");
2028
2029
2030
2031// ---------------------------------------------------------------------------------
2032// when a role is deleted, a new role must be assigned to all users
2033// having role to be deleted
2034// A right choice seems to be using $g_default_roleid.
2035// You can change this adding a config line in custom_config.inc.php
2036// @TODO martin: remove - use directly $tlCfg->default_roleid;
2037$g_role_replace_for_deleted_roles = $tlCfg->default_roleid;
2038
2039
2040/**
2041 * Using "|" in the testsuite name causes malformed URLs
2042 * regexp used to check for chars not allowed in:
2043 * test project, test suite and testcase names.
2044 * @TODO martin: encode harm characters @see http://cz.php.net/urlencode (and remove the parameter)
2045 *
2046 * now is preg pattern
2047 */
2048$g_ereg_forbidden = "/[|]/i";
2049
2050
2051
2052/**
2053 * @TODO remove from TL - unfinished refactorization;
2054 * use $tlCfg instead of old variables and constants
2055 */
2056define('TL_IMPORT_ROW_MAX', $tlCfg->import_max_row);
2057define('TL_TPL_CHARSET', $tlCfg->charset);
2058define('TITLE_SEP',$tlCfg->gui_title_separator_1);
2059define('TITLE_SEP_TYPE2',$tlCfg->gui_title_separator_2);
2060define('TITLE_SEP_TYPE3',$tlCfg->gui_title_separator_2); // obsolete: use type 1,2
2061define('TL_FRMWORKAREA_LEFT_FRAME_WIDTH', $tlCfg->frame_workarea_default_width);
2062define('TL_TEMP_PATH', $tlCfg->temp_dir);
2063
2064$tlCfg->gui->title_separator_1 = $tlCfg->gui_title_separator_1;
2065$tlCfg->gui->title_separator_2 = $tlCfg->gui_title_separator_2;
2066$tlCfg->gui->role_separator_open = $tlCfg->gui_separator_open;
2067$tlCfg->gui->role_separator_close = $tlCfg->gui_separator_close;
2068
2069$tlCfg->gui->version_separator_open = $tlCfg->gui_separator_open;
2070$tlCfg->gui->version_separator_close = $tlCfg->gui_separator_close;
2071
2072
2073/**
2074 * Globals for Events storage
2075 */
2076$g_event_cache = array();
2077
2078/**
2079 * Globals for Plugins
2080 */
2081$g_plugin_config_cache = array();
2082
2083// ----- END OF FILE --------------------------------------------------------------------