/config.inc.php

https://bitbucket.org/pfernandez/testlink1.9.6 · PHP · 1404 lines · 384 code · 249 blank · 771 comment · 8 complexity · 485b24fceb7e4dbcb4180cedccd8c1ac MD5 · raw file

  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. * @package TestLink
  20. * @copyright 2005-2009, TestLink community
  21. * @version CVS: $Id: config.inc.php,v 1.317 2010/08/31 14:19:26 asimon83 Exp $
  22. * @link http://www.teamst.org/index.php
  23. *
  24. * @internal Revisions:
  25. * 20100814 - franciscom - BUGID 3681 - new BTS youtrack (www.jetbrains.com)
  26. * 20100810 - asimon - BUGID 3317: added $tlCfg->req_cfg->external_req_management
  27. * 20100810 - asimon - added TC ID filter for Test Cases to $tlCfg->tree_filter_cfg
  28. * 20100809 - asimon - BUGID 3662 - disabled advanced filter mode choice for TC editing mode
  29. * 20100808 - asimon - added requirement filtering options to $tlCfg->tree_filter_cfg
  30. * 20100625 - asimon - added $tlCfg->tree_filter_cfg for configuration of available filters on JS tree
  31. * and $tlCfg->exec_cfg->testcases_colouring_by_selected_build for BUGID 3450
  32. * 20100620 - franciscom - fix strict messages after usign PHPDesigner.
  33. * 20100619 - franciscom - define always $g_bugInterfaceOn = false,$g_bugInterface = null;
  34. * 20100617 - franciscom - $tlCfg->req_cfg->importDocBook - new configuration for importing req in docbook format
  35. * 20100616 - eloff - BUGID 3255 - Cleaned up bts configuration
  36. * 20100527 - Julian - added $tlCfg->exec_cfg->expand_collapse->platform_description
  37. * 20100504 - franciscom - BUGID 3424 Custom CSS path is being overwritten by config.inc.php value
  38. * 20100311 - asimon - BUGID 1748 - $tlCfg->req_cfg->relations
  39. * 20100313 - franciscom - BUGID 0003275
  40. * 20100112 - asimon - BUGID 2976 - $tlCfg->req_cfg->search
  41. * 20100110 - eloff - BUGID 2036 - changed $tlCfg->gui->checkNotSaved to true
  42. * 20100106 - franciscom - added $tlCfg->diffEngine - diff for test case and req (Contribution)
  43. * 20091227 - franciscom - REMOVED - $tlCfg->req_cfg->reqdoc_id->is_system_wide
  44. * 20091217 - franciscom - $tlCfg->testcase_cfg->duplicated_name_algorithm
  45. * 20091205 - franciscom - BUGID 0002469: $tlCfg->exec_cfg->expand_collapse
  46. * 20091129 - franciscom - BUGID 2554 - gui->usersAssignGlobalRoleColoring
  47. * 20091126 - franciscom - added contribution req internal links
  48. * 20091125 - franciscom - req_cfg->expected_coverage_management added
  49. * 20091121 - franciscom - added contribution by Julian - BUGID 0002968,0002961,0002962,0002963
  50. * (refactored)
  51. *
  52. * 20091018 - franciscom - added contribution LDAP with TLS
  53. * 20090926 - franciscom - new default for $tlCfg->req_cfg->child_requirements_mgmt
  54. * 20090912 - franciscom - BUGID 2796 - contribution reportsCfg->start_time
  55. * 20090901 - franciscom - new option exec_cfg->steps_results_layout
  56. * 20090823 - franciscom - new option custom_field_max_length
  57. * 20090815 - franciscom - new option exec_cfg->show_history_all_platforms
  58. * 20090804 - franciscom - moved report config here
  59. * 20090304 - franciscom - BUGID 2171
  60. * 20090211 - franciscom - added $tlCfg->exec_cfg->enable_tree_testcases_colouring
  61. * $tlCfg->exec_cfg->enable_tree_counters_colouring
  62. *
  63. * 20090126 - franciscom - show_config_check_warning -> config_check_warning_mode
  64. * 20090103 - franciscom - $tlCfg->req_cfg->coverageStatusAlgorithm
  65. * 20090103 - franciscom - BUGID 651 - $tlCfg->testcase_cfg->can_remove_executed
  66. * 20090101 - franciscom - changes in regex used to validate an email address
  67. * 20081228 - franciscom - gui->layoutMainPageLeft,gui->layoutMainPageRight
  68. * 20081217 - franciscom - exec_cfg->simple_tester_roles
  69. * 20081213 - franciscom - more remove of old $g_* config parameters.
  70. * 20081122 - franciscom - removed some old $g_* config parameters.
  71. * 20081115 - franciscom - $tlCfg->testcase_cfg->search
  72. * 20081104 - franciscom - Added FOGBUGZ as BTS type
  73. * 20081103 - franciscom - Added GFORGE as BTS type
  74. * 20081006 - franciscom - config for rounding via nifty corners
  75. * 20080925 - franciscom - refactoring of urgencyImportance config
  76. * $tlCfg->req_cfg->child_requirements_mgmt
  77. *
  78. * 20080805 - franciscom - api configuration refactoring
  79. * 20080805 - franciscom - BUGID 1660 - extjs tree is default
  80. * 20080504 - franciscom - removed gui->enable_custom_fields
  81. * 20080419 - havlatm - documentation update; minor refactorization
  82. * 20080326 - franciscom - restored configuration parameters removed without reasons.
  83. *
  84. * 20080423 - havlatm - added $tlCfg as standard configuration holder
  85. * 20080322 - franciscom - $g_exec_cfg->edit_notes
  86. * 20080308 - franciscom - changed initial values for email settings
  87. * 20080304 - franciscom - $g_exec_cfg->show_testsuite_contents
  88. * 20080208 - franciscom - added contribution seapine BTS (BUGID 1371)
  89. * 20071112 - franciscom - config changes due to upgrade of Smarty
  90. * 20071106 - franciscom - BUGID 1165 - $g_testcase_template
  91. *
  92. * 20071104 - franciscom - $g_exec_cfg->enable_test_automation
  93. * $g_gui->tprojects_combo_order_by (BUGID 498)
  94. * 20070930 - franciscom - BUGID 1086 - configure order by in attachment
  95. * 20070910 - franciscom - removed MAIN_PAGE_METRICS_ENABLED
  96. * 20070505 - franciscom - following mantis bug tracking style, if file
  97. * custom_config.inc.php exists, il will be included
  98. * allowing users to customize TL configurations
  99. * managed using global variables, without need
  100. * of changing this file.
  101. *
  102. * 20070429 - franciscom - added contribution by Seweryn Plywaczyk
  103. * text area custom field
  104. *
  105. * 20070415 - franciscom - added config for drag and drop feature
  106. * 20070301 - franciscom - #695 - $g_user_self_signup (fawel contribute)
  107. *
  108. **/
  109. // ----------------------------------------------------------------------------
  110. /* [INITIALIZATION] - DO NOT CHANGE THE SECTION */
  111. // pf
  112. require_once 'plugin/BTconfig.php';
  113. /** @global array Global configuration class */
  114. $tlCfg = new stdClass();
  115. $tlCfg->api = new stdClass();
  116. $tlCfg->document_generator = new stdClass();
  117. $tlCfg->spec_cfg = new stdClass();
  118. $tlCfg->exec_cfg = new stdClass();
  119. $tlCfg->exec_cfg->view_mode = new stdClass();
  120. $tlCfg->exec_cfg->exec_mode = new stdClass();
  121. $tlCfg->gui = new stdClass();
  122. $tlCfg->gui->custom_fields = new stdClass();
  123. $tlCfg->testcase_cfg = new stdClass();
  124. $tlCfg->req_cfg = new stdClass();
  125. $tlCfg->validation_cfg = new stdClass();
  126. $tlCfg->custom_fields = new stdClass();
  127. $tlCfg->req_spec_cfg = new stdClass();
  128. $tlCfg->diffEngine = new stdClass();
  129. /** @uses database access definition (generated automatically by TL installer) */
  130. /** @uses database access definition (generated automatically by TL installer) */
  131. @include_once('config_db.inc.php');
  132. if( !defined('DB_TABLE_PREFIX') )
  133. {
  134. define('DB_TABLE_PREFIX','' );
  135. }
  136. /** The root dir for the testlink installation with trailing slash */
  137. define('TL_ABS_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
  138. /** Include constants and magic numbers (users should not change it)*/
  139. require_once(TL_ABS_PATH . 'cfg' . DIRECTORY_SEPARATOR . 'const.inc.php');
  140. // ----------------------------------------------------------------------------
  141. /* [LOCALIZATION] */
  142. /** @var string Default localization for users */
  143. // The value must be available in $g_locales (see cfg/const.inc.php).
  144. // Note: An attempt will be done to establish the default locale
  145. // automatically using $_SERVER['HTTP_ACCEPT_LANGUAGE']
  146. $tlCfg->default_language = 'en_GB';
  147. /**
  148. * @var string Charset 'UTF-8' is only officially supported charset (Require
  149. * MySQL version >= 4.1) 'ISO-8859-1' or another Charset could be set for
  150. * backward compatability by experienced users. However we have not resources
  151. * to support such patches.
  152. **/
  153. $tlCfg->charset = 'UTF-8';
  154. /**
  155. * @var string characters used to surround a description in the user interface
  156. * (for example role)
  157. **/
  158. $tlCfg->gui_separator_open = '[';
  159. $tlCfg->gui_separator_close = ']';
  160. /** @var string Title separators are used when componing an title using several strings */
  161. $tlCfg->gui_title_separator_1 = ' : '; // object : name (Test Specification : My best product)
  162. $tlCfg->gui_title_separator_2 = ' - '; // parent - child
  163. /**
  164. * @var string delimiter used to create DOC ID in this way:
  165. * <test_project_Prefix> . g_testcase_cfg->glue_character . <doc_id>
  166. * Could not be empty
  167. */
  168. $tlCfg->testcase_cfg->glue_character = '-';
  169. /**
  170. * fonts set used to draw charts
  171. **/
  172. $tlCfg->charts_font_path = TL_ABS_PATH . "third_party/pchart/Fonts/tahoma.ttf";
  173. /**
  174. * font size used to draw charts
  175. **/
  176. $tlCfg->charts_font_size = 8;
  177. // ----------------------------------------------------------------------------
  178. /* [SERVER ENVIRONMENT] */
  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. * Set the session timeout value (in minutes).
  186. * This will prevent sessions timing out after very short periods of time
  187. * Warning: your server could block this settings
  188. **/
  189. //ini_set('session.cache_expire',900);
  190. /**
  191. * Set the session garbage collection timeout value (in seconds)
  192. * The default session garbage collection in php is set to 1440 seconds (24 minutes)
  193. * If you want sessions to last longer this must be set to a higher value.
  194. * You may need to set this in your global php.ini if the settings don't take effect.
  195. */
  196. //ini_set('session.gc_maxlifetime', 54000);
  197. // ----------------------------------------------------------------------------
  198. /* [LOGGING] */
  199. /** Error reporting - do we want php errors to show up for users */
  200. error_reporting(E_ALL);
  201. /** @var string Default level of logging (NONE, ERROR, INFO, DEBUG, EXTENDED) */
  202. $tlCfg->log_level = 'ERROR';
  203. /** @var boolean show smarty debug window */
  204. $tlCfg->smarty_debug = false;
  205. /** @var string Path to store logs */
  206. $tlCfg->log_path = TL_ABS_PATH . 'logs' . DIRECTORY_SEPARATOR ;
  207. /**
  208. * @var string How to warning user when security weak points exists.
  209. *
  210. * 'SCREEN': messages will displayed on login screen, and tl desktop (default)
  211. * 'FILE': a file with a list is created but users are not notified via GUI
  212. * user will receive a message on screen.
  213. * 'SILENT': same that FILE, but user will not receive message on screen.
  214. */
  215. $tlCfg->config_check_warning_mode = 'SILENT';
  216. /**
  217. * Configure if individual logging data stores are enabled of disabled
  218. * Possibile values to identify loggers: 'db','file'
  219. * $g_loggerCfg=null; all loggers enabled (default)
  220. * $g_loggerCfg['db']['enable']=true/false;
  221. * $g_loggerCfg['file']['enable']=true/false;
  222. */
  223. $g_loggerCfg = null;
  224. /** @var integer All events older this value [days] are removed from the db, during login */
  225. $g_removeEventsOlderThan = 30;
  226. // ----------------------------------------------------------------------------
  227. /* [Bug Tracking systems] */
  228. /**
  229. * TestLink collaborates with bug tracking systems to check if displayed bugs resolved,
  230. * verified, and closed reports.
  231. *
  232. * Note: Use this option to check if a bug interface is enabled, if so every
  233. * page using bug tracking MUST include int_bugtracking.php to make the
  234. * connection. The variable bugInterfaceOn is only set when a connection is made
  235. *
  236. * @var string $g_interface_bugs = [
  237. * 'NO' : no bug tracking system integration (DEFAULT)
  238. * 'BUGZILLA' : edit configuration in TL_ABS_PATH/cfg/bugzilla.cfg.php
  239. * 'MANTIS' : edit configuration in TL_ABS_PATH/cfg/mantis.cfg.php
  240. * 'JIRA' : edit configuration in TL_ABS_PATH/cfg/jira.cfg.php
  241. * 'JIRASOAP' : edit configuration in TL_ABS_PATH/cfg/jira.cfg.php
  242. * 'TRACKPLUS' : edit configuration in TL_ABS_PATH/cfg/trackplus.cfg.php
  243. * 'EVENTUM' : edit configuration in TL_ABS_PATH/cfg/eventum.cfg.php
  244. * 'SEAPINE' : edit configuration in TL_ABS_PATH/cfg/seapine.cfg.php
  245. * 'GFORGE' : edit configuration in TL_ABS_PATH/cfg/gforge.cfg.php
  246. * 'FOGBUGZ' : edit configuration in TL_ABS_PATH/cfg/fogbugz.cfg.php
  247. * 'YOUTRACK' : edit configuration in TL_ABS_PATH/cfg/youtrack.cfg.php
  248. * ]
  249. */
  250. $g_interface_bugs = 'NO';
  251. // do not change this
  252. $g_bugInterfaceOn = false;
  253. $g_bugInterface = null;
  254. // ----------------------------------------------------------------------------
  255. /* [SMTP] */
  256. /**
  257. * @var string SMTP server name or IP address ("localhost" should work in the most cases)
  258. * Configure using custom_config.inc.php
  259. * @uses lib/functions/email_api.php
  260. */
  261. $g_smtp_host = '[smtp_host_not_configured]'; # SMTP server MUST BE configured
  262. # Configure using custom_config.inc.php
  263. $g_tl_admin_email = '[testlink_sysadmin_email_not_configured]'; # for problem/error notification
  264. $g_from_email = '[from_email_not_configured]'; # email sender
  265. $g_return_path_email = '[return_path_email_not_configured]';
  266. /**
  267. * Email notification priority (low by default)
  268. * Urgent = 1, Not Urgent = 5, Disable = 0
  269. **/
  270. $g_mail_priority = 5;
  271. # Taken from mantis for phpmailer config
  272. define ("SMTP_SEND",2);
  273. $g_phpMailer_method = SMTP_SEND;
  274. /** Configure only if SMTP server requires authentication */
  275. $g_smtp_username = ''; # user
  276. $g_smtp_password = ''; # password
  277. // ----------------------------------------------------------------------------
  278. /* [User Authentication] */
  279. /**
  280. * Login authentication method:
  281. * 'MD5' => use password stored on db
  282. * 'LDAP' => use password from LDAP Server
  283. */
  284. $tlCfg->authentication['method'] = 'MD5';
  285. /** LDAP authentication credentials */
  286. $tlCfg->authentication['ldap_server'] = 'localhost';
  287. $tlCfg->authentication['ldap_port'] = '389';
  288. $tlCfg->authentication['ldap_version'] = '3'; // could be '2' in some cases
  289. $tlCfg->authentication['ldap_root_dn'] = 'dc=mycompany,dc=com';
  290. $tlCfg->authentication['ldap_organization'] = ''; // e.g. '(organizationname=*Traffic)'
  291. $tlCfg->authentication['ldap_uid_field'] = 'uid'; // Use 'sAMAccountName' for Active Directory
  292. $tlCfg->authentication['ldap_bind_dn'] = ''; // Left empty for anonymous LDAP binding
  293. $tlCfg->authentication['ldap_bind_passwd'] = ''; // Left empty for anonymous LDAP binding
  294. $tlCfg->authentication['ldap_tls'] = false; // true -> use tls
  295. /** Enable/disable Users to create accounts on login page */
  296. $tlCfg->user_self_signup = TRUE;
  297. /** Validating new user login names */
  298. $tlCfg->validation_cfg->user_login_valid_regex='/^[\w \- .]+$/';
  299. /**
  300. * Validating user email addresses
  301. * Example of other possibilities:
  302. * <code>
  303. * $regex = "/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*" .
  304. * "@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i";
  305. * $regex = "/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/";
  306. * </code>
  307. **/
  308. $tlCfg->validation_cfg->user_email_valid_regex_js = "/^(\w+)([-+.][\w]+)*@(\w[-\w]*\.){1,5}([A-Za-z]){2,4}$/";
  309. $tlCfg->validation_cfg->user_email_valid_regex_php = "/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/U";
  310. // --------------------------------------------------------------------------------------
  311. /* [API] */
  312. /** XML-RPC API availability (disabled by default) */
  313. $tlCfg->api->enabled = FALSE;
  314. // used to display API ID info in the *View pages
  315. $tlCfg->api->id_format = "[ID: %s ]";
  316. // --------------------------------------------------------------------------------------
  317. /* [GUI LAYOUT] */
  318. /** GUI themes (base for CSS and images)- modify if you create own one */
  319. $tlCfg->theme_dir = 'gui/themes/default/';
  320. /** Dir for compiled templates */
  321. $tlCfg->temp_dir = TL_ABS_PATH . 'gui' . DIRECTORY_SEPARATOR . 'templates_c' . DIRECTORY_SEPARATOR;
  322. /** Company logo (used by navigation bar and login page page) */
  323. //$tlCfg->company_logo = '<img alt="TestLink" title="TestLink" style="width: 115px; height: 53px;" src="' .
  324. // $tlCfg->theme_dir . 'images/company_logo.png" />';
  325. $tlCfg->company_logo = 'company_logo.png';
  326. /** Login page could show an informational text */
  327. $tlCfg->login_info = ''; // Empty by default
  328. /** Image for main menu item bullet (just filename) */
  329. $tlCfg->bullet_image = 'slide_gripper.gif'; // = [arrow_org.gif, slide_gripper.gif]
  330. /**
  331. * @var string Availability of Test Project specific background colour
  332. * 'background' -> standard behaviour for 1.6.x you can have a different
  333. * background colour for every test project.
  334. * 'none' -> new behaviour no background color change
  335. */
  336. $tlCfg->gui->testproject_coloring = 'none'; // I'm sorry default is not coloring using coloring is a pain
  337. // and useless
  338. /** @TODO havlatm4francisco Ok, then merge these two attributes into one */
  339. /** default background color */
  340. $tlCfg->gui->background_color = '#9BD';
  341. // ENABLED: on features that assign user role to test projects and test plan, colour user name
  342. // according GLOBAL role
  343. // DISABLED: do not color [STANDARD BEHAVIOUR]
  344. $tlCfg->gui->usersAssignGlobalRoleColoring = DISABLED;
  345. // Enable/disable rounded corners via javascript
  346. $tlCfg->gui->round_corners = new stdClass();
  347. $tlCfg->gui->round_corners->exec_history = ENABLED;
  348. $tlCfg->gui->round_corners->tc_title = ENABLED;
  349. $tlCfg->gui->round_corners->tc_spec = ENABLED;
  350. /**
  351. * Display name definition (used to build a human readable display name for users)
  352. * Example of values:
  353. * '%first% %last%' -> John Cook
  354. * '%last%, %first%' -> Cook John
  355. * '%first% %last% %login%' -> John Cook [ux555]
  356. **/
  357. $tlCfg->username_format = '%login%';
  358. /** Configure the frame frmWorkArea navigator width */
  359. $tlCfg->frame_workarea_default_width = "30%";
  360. /** true => icon edit will be added into <a href> as indication an edit features */
  361. $tlCfg->gui->show_icon_edit = false;
  362. /**
  363. * Order to use when building a testproject combobox (value must be SQL compliant)
  364. * For example:
  365. * 'ORDER BY name'
  366. * 'ORDER_BY nodes_hierarchy.id DESC' -> similar effect to order last created firts
  367. **/
  368. $tlCfg->gui->tprojects_combo_order_by = 'ORDER BY nodes_hierarchy.id DESC';
  369. // used to round percentages on metricsDashboard.php
  370. $tlCfg->dashboard_precision = 2;
  371. /**
  372. * Choose what kind of webeditor you want to use in every TL area. This configuration
  373. * will be used if no element with search key (area) is found on this structure.
  374. * Every element is a mp with this configuration keys:
  375. *
  376. * 'type':
  377. * 'fckeditor'
  378. * 'tinymce'
  379. * 'none' -> use plain text area input field
  380. * 'toolbar': only applicable for type = 'fckeditor'
  381. * name of ToolbarSet (See: http://docs.fckeditor.net/ for more information about ToolbarSets)
  382. * TestLink stores own definitions in <testlink_dir>/cfg/tl_fckeditor_config.js
  383. * 'configFile': only applicable for type = 'fckeditor'
  384. * See: http://docs.fckeditor.net/ for more information about CustomConfigurationsPath
  385. * 'height': the height in px for FCKEditor
  386. * 'width': the width in px for FCKEditor
  387. * 'cols': the number of cols for tinymce and none
  388. * 'rows': the number of rows for tinymce and none
  389. *
  390. * The next keys/areas are supported:
  391. * 'all' (default setting),
  392. * 'design', 'steps_design', 'testplan', 'build', 'testproject', 'role', 'requirement', 'requirement_spec'.
  393. *
  394. * Examples:
  395. * <code>
  396. * // Copy this to custom_config.inc.php if you want use 'tinymce' as default.
  397. * $tlCfg->gui->text_editor['all'] = array( 'type' => 'tinymce');
  398. * // Copy this to custom_config.inc.php if you want use 'nome' as default.
  399. * $tlCfg->gui->text_editor['all'] = array( 'type' => 'none');
  400. * //This configuration is useful only if default type is set to 'fckeditor'
  401. * $tlCfg->gui->text_editor['design'] = array('toolbar' => 'tl_mini');
  402. *
  403. * $tlCfg->gui->text_editor['testplan'] = array( 'type' => 'none');
  404. * $tlCfg->gui->text_editor['build'] = array( 'type' => 'fckeditor','toolbar' => 'tl_mini');
  405. * $tlCfg->gui->text_editor['testproject'] = array( 'type' => 'tinymce');
  406. * $tlCfg->gui->text_editor['role'] = array( 'type' => 'tinymce');
  407. * $tlCfg->gui->text_editor['requirement'] = array( 'type' => 'none');
  408. * $tlCfg->gui->text_editor['requirement_spec'] = array( 'type' => 'none');
  409. * </code>
  410. *
  411. * Hint: After doing configuration changes, clean you Browser's cookies and cache
  412. */
  413. $tlCfg->gui->text_editor = array();
  414. $tlCfg->gui->text_editor['all'] = array('type' => 'fckeditor',
  415. 'toolbar' => 'tl_default',
  416. 'configFile' => 'cfg/tl_fckeditor_config.js',);
  417. $tlCfg->gui->text_editor['execution'] = array( 'type' => 'none');
  418. /** User can choose order of menu areas */
  419. $tlCfg->gui->layoutMainPageLeft = array( 'testProject' => 1, 'userAdministration' => 2 ,
  420. 'requirements' => 3, 'testSpecification' => 4,
  421. 'general' => 5);
  422. $tlCfg->gui->layoutMainPageRight = array( 'testPlan' => 1, 'testExecution' => 2 ,
  423. 'testPlanContents' => 3);
  424. /**
  425. * Enable warning on a changed content before an user leave a page.
  426. *
  427. * Tested in:
  428. * - IE8 OK
  429. * - Firefox 3 OK
  430. * - Chrome FAIL
  431. *
  432. * Does not work in Webkit browsers (Chrome, Safari) when using frames.
  433. * Bug in webkit: https://bugs.webkit.org/show_bug.cgi?id=19418
  434. */
  435. // franciscom -
  436. // BUGID 0003275 + post on forum: // http://www.teamst.org/phpBB2/viewtopic.php?t=3075
  437. // seems that with config options that will be used on javascript via smarty template variables
  438. // we are having problems using FALSE/TRUE => use 0/1 (or our CONSTANT DISABLED/ENABLED)
  439. $tlCfg->gui->checkNotSaved = ENABLED;
  440. // ----------------------------------------------------------------------------
  441. /* [GUI: TREE] */
  442. /** Default ordering value for new Test Suites and Test Cases to separate them */
  443. $tlCfg->treemenu_default_testsuite_order = 1;
  444. $tlCfg->treemenu_default_testcase_order = 100;
  445. /** show/hide testcase id on tree menu */
  446. $tlCfg->treemenu_show_testcase_id = TRUE;
  447. // ----------------------------------------------------------------------------
  448. /* [GUI: Javascript libraries] */
  449. // May be in future another table sort engine will be better
  450. // kryogenix.org -> Stuart Langridge sortTable
  451. // '' (empty string) -> disable table sorting feature
  452. $g_sort_table_engine='kryogenix.org';
  453. // --------------------------------------------------------------------------------------
  454. /* [Reports] */
  455. $tlCfg->reportsCfg=new stdClass();
  456. /** @TODO unfinished changes by Francisco? */
  457. //Displayed execution statuses to use on reports (ordered). */
  458. $tlCfg->reportsCfg->exec_status = $tlCfg->results['status_label_for_exec_ui'];
  459. /**
  460. * Default Offset in seconds for reporting start date (reports with date range)
  461. * @uses lib/results/resultsMoreBuilds.php
  462. */
  463. $tlCfg->reportsCfg->start_date_offset = (7*24*60*60); // one week
  464. // minutes part is ignored but must be configured.
  465. // Hint: set always to :00
  466. $tlCfg->reportsCfg->start_time = '00:00';
  467. // Result matrix (resultsTC.php)
  468. // Shows an extra column which gives the status of the last executed build
  469. $tlCfg->resultMatrixReport->buildColumns['showStatusLastExecuted'] = true;
  470. // Show build columns in revers order. The latest build is to the left
  471. $tlCfg->resultMatrixReport->buildColumns['latestBuildOnLeft'] = false;
  472. // ----------------------------------------------------------------------------
  473. /* [GENERATED DOCUMENTATION] */
  474. /**
  475. * Texts and settings for printed documents
  476. * Image is expected in directory <testlink_root>/gui/themes/<your_theme>/images/
  477. * Leave text values empty if you would like to hide parameters.
  478. */
  479. $tlCfg->document_generator->company_name = 'TestLink Community [configure $tlCfg->document_generator->company_name]';
  480. $tlCfg->document_generator->company_copyright = '2009 &copy; TestLink Community';
  481. $tlCfg->document_generator->confidential_msg = '';
  482. /** CSS used in printed html documents */
  483. // BUGID 3424
  484. // $tlCfg->document_generator->css_template = $tlCfg->theme_dir . 'css/tl_documents.css';
  485. $tlCfg->document_generator->css_template = 'css/tl_documents.css';
  486. /** Misc settings */
  487. $tlCfg->document_generator->tc_version_enabled = FALSE;
  488. // ----------------------------------------------------------------------------
  489. /* [Test Executions] */
  490. // ENABLED -> enable XML-RPC calls to external test automation server
  491. // new buttons will be displayed on execution pages
  492. // DISABLED -> disable
  493. $tlCfg->exec_cfg->enable_test_automation = DISABLED;
  494. // 1 -> user can edit execution notes, on old executions (Attention: user must have test case execution right)
  495. // DISABLED -> no edit allowed [STANDARD BEHAVIOUR]
  496. $tlCfg->exec_cfg->edit_notes = DISABLED;
  497. // ASCending -> last execution at bottom
  498. // DESCending -> last execution on top [STANDARD BEHAVIOUR]
  499. $tlCfg->exec_cfg->history_order = 'DESC';
  500. // TRUE -> the whole execution history for the choosen build will be showed
  501. // FALSE -> just last execution for the choosen build will be showed [STANDARD BEHAVIOUR]
  502. $tlCfg->exec_cfg->history_on = FALSE;
  503. // TRUE -> test case VERY LAST (i.e. in any build) execution status will be displayed [STANDARD BEHAVIOUR]
  504. // FALSE -> only last result on current build.
  505. $tlCfg->exec_cfg->show_last_exec_any_build = TRUE;
  506. // TRUE -> History for all builds will be shown
  507. // FALSE -> Only history of the current build will be shown [STANDARD BEHAVIOUR]
  508. $tlCfg->exec_cfg->show_history_all_builds = FALSE;
  509. // TRUE -> History for all platforms (if any exists for test plan) will be shown
  510. // FALSE -> Only history of the current platform will be shown [STANDARD BEHAVIOUR]
  511. $tlCfg->exec_cfg->show_history_all_platforms = FALSE;
  512. // different models for the attachments management on execution page
  513. // $att_model_m1 -> shows upload button and title
  514. // $att_model_m2 -> hides upload button and title
  515. $tlCfg->exec_cfg->att_model = $att_model_m2; //defined in const.inc.php
  516. // ENABLED -> User can delete an execution result
  517. // DISABLED -> User can not. [STANDARD BEHAVIOUR]
  518. $tlCfg->exec_cfg->can_delete_execution = DISABLED;
  519. // ENABLED -> test cases will be coloured according to test case status
  520. $tlCfg->exec_cfg->enable_tree_testcases_colouring = ENABLED;
  521. // ENABLED -> test cases will be coloured according to execution status on build selected for execution
  522. // DISABLED -> test cases will be coloured according status on latest execution regardless of selected build
  523. // see http://mantis.testlink.org/view.php?id=3450 for more details
  524. $tlCfg->exec_cfg->testcases_colouring_by_selected_build = ENABLED;
  525. // ENABLED -> test case counters will be coloured according to test case status
  526. $tlCfg->exec_cfg->enable_tree_counters_colouring = ENABLED;
  527. // 20080303 - franciscom
  528. // This can help to avoid performance problems.
  529. // Controls what happens on right frame when user clicks on a testsuite on tree.
  530. // ENABLED -> show all test cases presents on test suite and children test suite.
  531. // DISABLED -> nothing happens, to execute a test case you need to click on test case
  532. $tlCfg->exec_cfg->show_testsuite_contents = DISABLED;
  533. // ENABLED -> enable testcase counters by status on tree
  534. $tlCfg->exec_cfg->enable_tree_testcase_counters = ENABLED;
  535. // Define list of roles that are affected by:
  536. // $tlCfg->exec_cfg->view_mode and $tlCfg->exec_cfg->exec_mode
  537. // User must reconfigure if define other simple tester roles
  538. //
  539. // In addition (till code changes) also roles that verify this condition:
  540. // $effective_role->hasRight('testplan_execute') and !$effective_role->hasRight('testplan_planning')
  541. // Will be affected by:
  542. // $tlCfg->exec_cfg->view_mode and $tlCfg->exec_cfg->exec_mode
  543. //
  544. $tlCfg->exec_cfg->simple_tester_roles=array(TL_ROLES_TESTER);
  545. // Filter Test cases a user with tester role can VIEW depending on
  546. // test execution assignment.
  547. // all: all test cases.
  548. // assigned_to_me: test cases assigned to logged user.
  549. // assigned_to_me_or_free: test cases assigned to logged user or not assigned
  550. $tlCfg->exec_cfg->view_mode->tester='assigned_to_me';
  551. // Filter Test cases a user with tester role can EXECUTE depending on
  552. // test execution assignment.
  553. // all: all test cases.
  554. // assigned_to_me: test cases assigned to logged user.
  555. // assigned_to_me_or_free: test cases assigned to logged user or not assigned
  556. $tlCfg->exec_cfg->exec_mode->tester='assigned_to_me';
  557. /** User filter in Test Execution navigator - default value */
  558. // logged_user -> combo will be set to logged user
  559. // none -> no filter applied by default
  560. $tlCfg->exec_cfg->user_filter_default='none';
  561. // 'horizontal' -> step and results on the same row
  562. // 'vertical' -> steps on one row, results in the row bellow
  563. $tlCfg->exec_cfg->steps_results_layout = 'horizontal';
  564. // Parameters to show notes/details when entering test execution feature
  565. // EXPAND: show expanded/open
  566. // COLLAPSE: show collapsed/closede
  567. // LAST_USER_CHOICE: get status from cookie that holds last user choice.[STANDARD BEHAVIOUR]
  568. $tlCfg->exec_cfg->expand_collapse = new stdClass();
  569. $tlCfg->exec_cfg->expand_collapse->testplan_notes = LAST_USER_CHOICE;
  570. $tlCfg->exec_cfg->expand_collapse->platform_description = LAST_USER_CHOICE;
  571. $tlCfg->exec_cfg->expand_collapse->build_description = LAST_USER_CHOICE;
  572. $tlCfg->exec_cfg->expand_collapse->testsuite_details = LAST_USER_CHOICE;
  573. // ----------------------------------------------------------------------------
  574. /* [Test Specification] */
  575. // $g_spec_cfg = new stdClass();
  576. // 'horizontal' -> step and results on the same row
  577. // 'vertical' -> steps on one row, results in the row bellow
  578. // $g_spec_cfg->steps_results_layout = 'vertical';
  579. $tlCfg->spec_cfg->steps_results_layout = 'horizontal';
  580. // ENABLED -> User will see a test suite filter while creating test specification
  581. // DISABLED -> no filter available
  582. // $g_spec_cfg->show_tsuite_filter = ENABLED;
  583. $tlCfg->spec_cfg->show_tsuite_filter = ENABLED;
  584. // ENABLED -> every time user do some operation on test specification
  585. // tree is updated on screen.
  586. // DISABLED -> tree will not be updated, user can update it manually.
  587. // Anyway on user interface user will be able to change this choice
  588. // $g_spec_cfg->automatic_tree_refresh = ENABLED;
  589. $tlCfg->spec_cfg->automatic_tree_refresh = ENABLED;
  590. // ENABLED -> user can edit executed tc versions
  591. // DISABLED -> editing of executed tc versions is blocked. [STANDARD BEHAVIOUR]
  592. $tlCfg->testcase_cfg->can_edit_executed = DISABLED;
  593. // ENABLED -> user can removed from a testplan executed tc versions. [STANDARD BEHAVIOUR]
  594. // DISABLED -> user can NOT remove from a testplan executed tc versions.
  595. $tlCfg->testcase_cfg->can_remove_executed = ENABLED;
  596. // To avoid perfomance problems on search test case feature,
  597. // we can decide when to inform user that results can not be displayed
  598. // due to too many results.
  599. $tlCfg->testcase_cfg->search=new stdClass();
  600. $tlCfg->testcase_cfg->search->max_qty_for_display=200;
  601. $tlCfg->testcase_cfg->duplicated_name_algorithm = new stdClass();
  602. // 'stringPrefix' => use duplicated_name_algorithm->text
  603. // 'counterSuffix' => creare name as :
  604. // test case title + (number of existent test cases +1)
  605. // example: My Test Title 2
  606. // duplicated_name_algorithm->text is used as sprintf format mask
  607. $tlCfg->testcase_cfg->duplicated_name_algorithm->type = 'stringPrefix';
  608. $tlCfg->testcase_cfg->duplicated_name_algorithm->text = strftime("%Y%m%d-%H:%M:%S", time());
  609. // $tlCfg->testcase_cfg->duplicated_name_algorithm->type = 'counterSuffix';
  610. // $tlCfg->testcase_cfg->duplicated_name_algorithm->text = " (%s)";
  611. /** text template for a new items:
  612. Test Case: summary, steps, expected_results, preconditions
  613. */
  614. // object members has SAME NAME that FCK editor objects.
  615. // the logic present on tcEdit.php is dependent of this rule.
  616. // every text object contains an object with following members: type and value
  617. //
  618. // Possible values for type member:
  619. // none: template will not be used, default will be a clean editor screen.
  620. //
  621. // string: value of value member is assigned to FCK object
  622. // string_id: value member is used in a lang_get() call, and return value
  623. // is assigned to FCK object. Configure string_id on custom_strings.txt
  624. // file: value member is used as file name.
  625. // file is readed and it's contains assigned to FCK object
  626. //
  627. // any other value for type, results on '' assigned to FCK object
  628. $tlCfg->testcase_template = new stdClass();
  629. $tlCfg->testcase_template->summary = new stdClass();
  630. $tlCfg->testcase_template->summary->type = 'none';
  631. $tlCfg->testcase_template->summary->value = '';
  632. $tlCfg->testcase_template->steps = new stdClass();
  633. $tlCfg->testcase_template->steps->type = 'none';
  634. $tlCfg->testcase_template->steps->value = '';
  635. $tlCfg->testcase_template->expected_results = new stdClass();
  636. $tlCfg->testcase_template->expected_results->type = 'none';
  637. $tlCfg->testcase_template->expected_results->value = '';
  638. $tlCfg->testcase_template->preconditions = new stdClass();
  639. $tlCfg->testcase_template->preconditions->type = 'none';
  640. $tlCfg->testcase_template->preconditions->value = '';
  641. /** text template for a new Test Suite description */
  642. $tlCfg->testsuite_template = new stdClass();
  643. $tlCfg->testsuite_template->details = new stdClass();
  644. $tlCfg->testsuite_template->details->type = 'none';
  645. $tlCfg->testsuite_template->details->value = '';
  646. // Contribution - Julian (Refactore)
  647. // BUGID 0002968,0002961,0002962,0002963
  648. $tlCfg->project_template = new stdClass();
  649. $tlCfg->project_template->notes = new stdClass();
  650. $tlCfg->project_template->notes->type = 'none';
  651. $tlCfg->project_template->notes->value = '';
  652. $tlCfg->testplan_template = new stdClass();
  653. $tlCfg->testplan_template->notes = new stdClass();
  654. $tlCfg->testplan_template->notes->type = 'none';
  655. $tlCfg->testplan_template->notes->value = '';
  656. $tlCfg->execution_template = new stdClass();
  657. $tlCfg->execution_template->bulk_exec_notes = new stdClass();
  658. $tlCfg->execution_template->bulk_exec_notes->type = 'none';
  659. $tlCfg->execution_template->bulk_exec_notes->value = '';
  660. $tlCfg->execution_template->notes = new stdClass();
  661. $tlCfg->execution_template->notes->type = 'none';
  662. $tlCfg->execution_template->notes->value = '';
  663. $tlCfg->build_template = new stdClass();
  664. $tlCfg->build_template->notes = new stdClass();
  665. $tlCfg->build_template->notes->type = 'none';
  666. $tlCfg->build_template->notes->value = '';
  667. $tlCfg->requirement_template = new stdClass();
  668. $tlCfg->requirement_template->scope = new stdClass();
  669. $tlCfg->requirement_template->scope->type = 'none';
  670. $tlCfg->requirement_template->scope->value = '';
  671. $tlCfg->req_spec_template = new stdClass();
  672. $tlCfg->req_spec_template->scope = new stdClass();
  673. $tlCfg->req_spec_template->scope->type = 'none';
  674. $tlCfg->req_spec_template->scope->value = '';
  675. $tlCfg->role_template = new stdClass();
  676. $tlCfg->role_template->notes = new stdClass();
  677. $tlCfg->role_template->notes->type = 'none';
  678. $tlCfg->role_template->notes->value = '';
  679. // ----------------------------------------------------------------------------
  680. /* [ATTACHMENTS] */
  681. /** Attachment feature availability */
  682. $g_attachments = new stdClass();
  683. $g_attachments->enabled = TRUE;
  684. /** the type of the repository can be database or filesystem
  685. * TL_REPOSITORY_TYPE_DB => database
  686. * TL_REPOSITORY_TYPE_FS => filesystem
  687. **/
  688. $g_repositoryType = TL_REPOSITORY_TYPE_FS;
  689. /**
  690. * TL_REPOSITORY_TYPE_FS: the where the filesystem repository should be located
  691. * We recommend to change the directory for security reason.
  692. **/
  693. $g_repositoryPath = TL_ABS_PATH . "upload_area" . DIRECTORY_SEPARATOR;
  694. /**
  695. * compression used within the repository
  696. * TL_REPOSITORY_COMPRESSIONTYPE_NONE => no compression
  697. * TL_REPOSITORY_COMPRESSIONTYPE_GZIP => gzip compression
  698. */
  699. $g_repositoryCompressionType = TL_REPOSITORY_COMPRESSIONTYPE_NONE;
  700. // the maximum allowed file size for each repository entry, default 1MB.
  701. // Also check your PHP settings (default is usually 2MBs)
  702. $tlCfg->repository_max_filesize = 1; //MB
  703. // TRUE -> when you upload a file you can give no title
  704. $g_attachments->allow_empty_title = TRUE;
  705. // $g_attachments->allow_empty_title == TRUE, you can ask the system
  706. // to do something
  707. //
  708. // 'none' -> just write on db an empty title
  709. // 'use_filename' -> use filename as title
  710. //$g_attachments->action_on_save_empty_title='use_filename';
  711. //
  712. $g_attachments->action_on_save_empty_title = 'none';
  713. // Remember that title is used as link description for download
  714. // then if title is empty, what the system has to do when displaying ?
  715. // 'show_icon' -> the $g_attachments->access_icon will be used.
  716. // 'show_label' -> the value of $g_attachments->access_string will be used .
  717. $g_attachments->action_on_display_empty_title = 'show_icon';
  718. // martin: @TODO use an image file only
  719. // BUGID 3424 - need to be moved AFTER include of custom_config
  720. //
  721. // $g_attachments->access_icon = '<img src="' . $tlCfg->theme_dir . 'images/new_f2_16.png" style="border:none" />';
  722. $g_attachments->access_string = "[*]";
  723. // Set display order of uploaded files - BUGID 1086
  724. $g_attachments->order_by = " ORDER BY date_added DESC ";
  725. // ----------------------------------------------------------------------------
  726. /* [Requirements] */
  727. // HAS TO BE REMOVED - > req_doc_id UNIQUE INSIDE test project
  728. // true : you want req_doc_id UNIQUE IN THE WHOLE DB (system_wide)
  729. // false: you want req_doc_id UNIQUE INSIDE a SRS
  730. // $tlCfg->req_cfg->reqdoc_id->is_system_wide = FALSE;
  731. /**
  732. * Test Case generation from Requirements - use_req_spec_as_testsuite_name
  733. * FALSE => test cases are created and assigned to a test suite
  734. * with name $tlCfg->req_cfg->default_testsuite_name
  735. * TRUE => REQuirement Specification Title is used as testsuite name
  736. */
  737. $tlCfg->req_cfg->use_req_spec_as_testsuite_name = TRUE;
  738. $tlCfg->req_cfg->default_testsuite_name = "Auto-created Test cases";
  739. $tlCfg->req_cfg->testsuite_details = "Test Cases in the Test Suite are generated from Requirements. " .
  740. "A refinement of test scenario is highly recommended.";
  741. $tlCfg->req_cfg->testcase_summary_prefix = "<b>The Test Case was generated from the assigned requirement.</b><br />";
  742. // To avoid perfomance problems on search Requirements feature,
  743. // we can decide when to inform user that results can not be displayed
  744. // due to too many results.
  745. $tlCfg->req_cfg->search=new stdClass();
  746. $tlCfg->req_cfg->search->max_qty_for_display=200;
  747. // ENABLED: allow N level depth tree
  748. // DISABLED: just one level
  749. $tlCfg->req_cfg->child_requirements_mgmt = ENABLED;
  750. // ENABLED: ask for this value on user interface and use on several features
  751. // DISABLED: do not ask, do not use
  752. $tlCfg->req_cfg->expected_coverage_management = ENABLED;
  753. // 20090111 - franciscom
  754. // Order of test cases status in this array, is used to undestand
  755. // to what status set requirement in the requirements report.
  756. // Standard algorithm, present in getReqCoverage(), is:
  757. //
  758. //
  759. // if at least one of Test Cases linked to Requirement has status FAILED
  760. // Requirement Coverage Status = FAILED
  761. // else if at least one of Test Cases linked to Requirement has status BLOCKED
  762. // Requirement Coverage Status = BLOCKED
  763. // else if ALL Test Cases linked to Requirement has status NOT RUN
  764. // Requirement Coverage Status = NOT RUN
  765. // else if ALL Test Cases linked to Requirement has status PASSED
  766. // Requirement Coverage Status = PASSED
  767. // else
  768. // Requirement Coverage Status = Partially Passed
  769. //
  770. // This logic is implemented using following config parameter
  771. $tlCfg->req_cfg->coverageStatusAlgorithm['checkOrder']=array('atLeastOne','all');
  772. $tlCfg->req_cfg->coverageStatusAlgorithm['checkType']['atLeastOne']=array('failed','blocked');
  773. $tlCfg->req_cfg->coverageStatusAlgorithm['checkType']['all']=array('not_run','passed');
  774. // Configure here what status has to get requirement when check of type 'all' fails like
  775. // in following situation (BUGID 2171)
  776. // If particular requirement has assigned more than one test cases, and:
  777. // - at least one of assigned test cases was not yet executed
  778. // - the rest of assigned test cases was executed and passed
  779. // then on the "Requirements based report" this particular requirement is not shown at all (in any section).
  780. //
  781. // $tlCfg->req_cfg->coverageStatusAlgorithm['checkFail']['all']='partially_passed';
  782. // $tlCfg->req_cfg->coverageStatusAlgorithm['displayOrder']=array('passed','failed',
  783. // 'blocked','not_run','partially_passed');
  784. // 20100819 - asimon - fix not needed anymore after rewrite of req based report
  785. //$tlCfg->req_cfg->coverageStatusAlgorithm['checkFail']['all']='failed';
  786. //$tlCfg->req_cfg->coverageStatusAlgorithm['displayOrder']=array('passed','failed','blocked','not_run');
  787. // Linking between requirements/requirement specifications
  788. //
  789. $tlCfg->internal_links = new stdClass();
  790. //
  791. // TRUE: links to other requirements/requirement specifications are
  792. // automatically generated from the corresponding Document ID, enclosed by tags (like BBCode).
  793. //
  794. // Usage:
  795. // link to requirements: [req]req_doc_id[/req]
  796. // link to requirement specifications: [req_spec]req_spec_doc_id[/req_spec]
  797. //
  798. // The test project of the requirement / requirement specification and an anchor
  799. // to jump to can also be specified:
  800. // [req tproj=<tproj_prefix> anchor=<anchor_name>]req_doc_id[/req]
  801. // This syntax also works for requirement specifications.
  802. //
  803. // FALSE: no links are automatically created.
  804. //
  805. $tlCfg->internal_links->enable = TRUE;
  806. // how a linked document (requirement/requirement specification) should be displayed.
  807. // posible values:
  808. // 'window': new window/tab will be used (depending on browser configuration)
  809. // 'frame' : same frame as the clicked link
  810. // 'popup' (default): popup window (ATTENTION to browser pop-up block).
  811. //
  812. $tlCfg->internal_links->target = 'popup';
  813. // title for automatically created link
  814. // possible values:
  815. // 'string': lang_get() will be used to localize
  816. // 'none': no title will be generated, only link with ID
  817. // 'item' (default): localized type of item (e.g. "Requirement: ", "Req Spec")
  818. // will be used as title for the generated link
  819. //
  820. $tlCfg->internal_links->req_link_title = new stdClass();
  821. $tlCfg->internal_links->req_link_title->type = 'item';
  822. $tlCfg->internal_links->req_link_title->value = '';
  823. $tlCfg->internal_links->req_spec_link_title = new stdClass();
  824. $tlCfg->internal_links->req_spec_link_title->type = 'item';
  825. $tlCfg->internal_links->req_spec_link_title->value = '';
  826. // Relations between requirement documents:
  827. //
  828. // The relation types have to be configured in cfg/const.inc.php
  829. // and their respective localization values in locale strings.txt.
  830. // There are some preconfigured standard types which you can use,
  831. // additionally you can configure your own types.
  832. $tlCfg->req_cfg->relations = new stdClass();
  833. $tlCfg->req_cfg->relations->enable = TRUE;
  834. $tlCfg->req_cfg->relations->interproject_linking = FALSE;
  835. // Requirement/testcase diff
  836. // default value of lines to show before and after each difference
  837. $tlCfg->diffEngine->context = 5;
  838. // Configuration for Requirement Import using DOCBOOK format
  839. $tlCfg->req_cfg->importDocBook = new stdClass();
  840. $tlCfg->req_cfg->importDocBook->requirement= "sect3";
  841. $tlCfg->req_cfg->importDocBook->title= "title";
  842. $tlCfg->req_cfg->importDocBook->paragraph= "para";
  843. $tlCfg->req_cfg->importDocBook->ordered_list="orderedlist";
  844. $tlCfg->req_cfg->importDocBook->list_item="listitem";
  845. $tlCfg->req_cfg->importDocBook->table="informaltable";
  846. $tlCfg->req_cfg->importDocBook->table_group="tgroup";
  847. $tlCfg->req_cfg->importDocBook->table_head="thead";
  848. $tlCfg->req_cfg->importDocBook->table_body="tbody";
  849. $tlCfg->req_cfg->importDocBook->table_row="row";
  850. $tlCfg->req_cfg->importDocBook->table_entry="entry";
  851. $tlCfg->req_cfg->importDocBook->list_item_children = array('para','title');
  852. $tlCfg->req_cfg->importDocBook->table_entry_children = array('para');
  853. // If an external tool is used for requirement management, enable this setting.
  854. // You will get an additional field on requirement specifications where you
  855. // can enter the total count of requirements so that external requirements
  856. // are also counted for metrics/statistics.
  857. $tlCfg->req_cfg->external_req_management = DISABLED;
  858. // ----------------------------------------------------------------------------
  859. /* [TREE FILTER CONFIGURATION] */
  860. /* In the following section, you can configure which filters shall be used
  861. * in combination with the tree view for testcases and requirements.
  862. * There are five available filter modes (four for the testcase tree,
  863. * one for requirement documents), which are used for the different features
  864. * as listed here:
  865. *
  866. * For Test Cases:
  867. * --> execution_mode
  868. * execution of testcases
  869. * --> edit_mode
  870. * create and edit testcases
  871. * assign keywords to testcases
  872. * assign requirements to testcases
  873. * --> plan_mode
  874. * assign testcase execution to users
  875. * update linked versions for testplan
  876. * set urgent testcases
  877. * --> plan_add_mode
  878. * add/remove testcases to/from testplan
  879. *
  880. * For Requirements:
  881. * There are no modes defined, there is only one filter configuration.
  882. * The filters configured here will be used for requirement editing.
  883. */
  884. $tlCfg->tree_filter_cfg = new stdClass();
  885. $tlCfg->tree_filter_cfg->testcases = new stdClass();
  886. $tlCfg->tree_filter_cfg->requirements = new stdClass();
  887. // These are the available filter modes for testcases:
  888. $tlCfg->tree_filter_cfg->testcases->execution_mode = new stdClass();
  889. $tlCfg->tree_filter_cfg->testcases->edit_mode = new stdClass();
  890. $tlCfg->tree_filter_cfg->testcases->plan_mode = new stdClass();
  891. $tlCfg->tree_filter_cfg->testcases->plan_add_mode = new stdClass();
  892. // If you disable one of these items here, you switch
  893. // the complete filter panel off for a specific mode/feature.
  894. // You should rather do this here instead of individually disabling all the filters,
  895. // if you don't want to have any filters at all for a given feature.
  896. $tlCfg->tree_filter_cfg->testcases->execution_mode->show_filters = ENABLED;
  897. $tlCfg->tree_filter_cfg->testcases->edit_mode->show_filters = ENABLED;
  898. $tlCfg->tree_filter_cfg->testcases->plan_mode->show_filters = ENABLED;
  899. $tlCfg->tree_filter_cfg->testcases->plan_add_mode->show_filters = ENABLED;
  900. $tlCfg->tree_filter_cfg->requirements->show_filters = ENABLED;
  901. // Detailed settings for each mode.
  902. // Here, the single filter fields can be disabled if not wanted.
  903. // Also, the choice of advanced filter mode can be disabled.
  904. $tlCfg->tree_filter_cfg->testcases->execution_mode->filter_tc_id = ENABLED;
  905. $tlCfg->tree_filter_cfg->testcases->execution_mode->filter_testcase_name = ENABLED;
  906. $tlCfg->tree_filter_cfg->testcases->execution_mode->filter_toplevel_testsuite = ENABLED;
  907. $tlCfg->tree_filter_cfg->testcases->execution_mode->filter_keywords = ENABLED;
  908. $tlCfg->tree_filter_cfg->testcases->execution_mode->filter_priority = ENABLED;
  909. $tlCfg->tree_filter_cfg->testcases->execution_mode->filter_execution_type = ENABLED;
  910. $tlCfg->tree_filter_cfg->testcases->execution_mode->filter_assigned_user = ENABLED;
  911. $tlCfg->tree_filter_cfg->testcases->execution_mode->filter_custom_fields = ENABLED;
  912. $tlCfg->tree_filter_cfg->testcases->execution_mode->filter_result = ENABLED;
  913. $tlCfg->tree_filter_cfg->testcases->execution_mode->advanced_filter_mode_choice = ENABLED;
  914. $tlCfg->tree_filter_cfg->testcases->edit_mode->filter_tc_id = ENABLED;
  915. $tlCfg->tree_filter_cfg->testcases->edit_mode->filter_testcase_name = ENABLED;
  916. $tlCfg->tree_filter_cfg->testcases->edit_mode->filter_toplevel_testsuite = ENABLED;
  917. $tlCfg->tree_filter_cfg->testcases->edit_mode->filter_keywords = ENABLED;
  918. $tlCfg->tree_filter_cfg->testcases->edit_mode->filter_execution_type = ENABLED;
  919. $tlCfg->tree_filter_cfg->testcases->edit_mode->filter_custom_fields = ENABLED;
  920. // filter mode choice disabled for this mode because there are no filters benefiting from it
  921. $tlCfg->tree_filter_cfg->testcases->edit_mode->advanced_filter_mode_choice = DISABLED;
  922. $tlCfg->tree_filter_cfg->testcases->plan_mode->filter_tc_id = ENABLED;
  923. $tlCfg->tree_filter_cfg->testcases->plan_mode->filter_testcase_name = ENABLED;
  924. $tlCfg->tree_filter_cfg->testcases->plan_mode->filter_toplevel_testsuite = ENABLED;
  925. $tlCfg->tree_filter_cfg->testcases->plan_mode->filter_keywords = ENABLED;
  926. $tlCfg->tree_filter_cfg->testcases->plan_mode->filter_priority = ENABLED;
  927. $tlCfg->tree_filter_cfg->testcases->plan_mode->filter_execution_type = ENABLED;
  928. $tlCfg->tree_filter_cfg->testcases->plan_mode->filter_custom_fields = ENABLED;
  929. $tlCfg->tree_filter_cfg->testcases->plan_mode->filter_result = ENABLED;
  930. $tlCfg->tree_filter_cfg->testcases->plan_mode->advanced_filter_mode_choice = ENABLED;
  931. $tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_tc_id = ENABLED;
  932. $tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_testcase_name = ENABLED;
  933. $tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_toplevel_testsuite = ENABLED;
  934. $tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_keywords = ENABLED;
  935. $tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_priority = ENABLED;
  936. $tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_execution_type = ENABLED;
  937. $tlCfg->tree_filter_cfg->testcases->plan_add_mode->filter_custom_fields = ENABLED;
  938. $tlCfg->tree_filter_cfg->testcases->plan_add_mode->advanced_filter_mode_choice = ENABLED;
  939. $tlCfg->tree_filter_cfg->requirements->filter_doc_id = ENABLED;
  940. $tlCfg->tree_filter_cfg->requirements->filter_title = ENABLED;
  941. $tlCfg->tree_filter_cfg->requirements->filter_status = ENABLED;
  942. $tlCfg->tree_filter_cfg->requirements->filter_type = ENABLED;
  943. $tlCfg->tree_filter_cfg->requirements->filter_spec_type = ENABLED;
  944. $tlCfg->tree_filter_cfg->requirements->filter_coverage = ENABLED;
  945. $tlCfg->tree_filter_cfg->requirements->filter_relation = ENABLED;
  946. $tlCfg->tree_filter_cfg->requirements->filter_tc_id = ENABLED;
  947. $tlCfg->tree_filter_cfg->requirements->filter_custom_fields = ENABLED;
  948. $tlCfg->tree_filter_cfg->requirements->advanced_filter_mode_choice = ENABLED;
  949. // ENABLED -> Every time the user does some operation on requirement spec,
  950. // the tree will be updated on screen. [DEFAULT]
  951. // DISABLED -> The tree will not be updated automatically, but the user can update it manually.
  952. // On graphical user interface any user will is able to change this setting.
  953. $tlCfg->tree_filter_cfg->requirements->automatic_tree_refresh = ENABLED;
  954. // ----------------------------------------------------------------------------
  955. /* [MISC FUNCTIONALITY] */
  956. /** Maximum uploadfile size to importing stuff in TL */
  957. // Also check your PHP settings (default is usually 2MBs)
  958. // unit BYTES is required by MAX_FILE_SIZE HTML option
  959. $tlCfg->import_file_max_size_bytes = '409600';
  960. /** Maximum line size of the imported file */
  961. $tlCfg->import_max_row = '10000'; // in chars
  962. /** Set the default role used for new users */
  963. // - created from the login page.
  964. // - created using user management features
  965. $tlCfg->default_roleid = TL_ROLES_GUEST;
  966. /** used to check size in char for TEXT AREA type custom fields */
  967. // can not be greater that column definition on DB
  968. // 0 => do not check.
  969. $tlCfg->custom_fields->max_length = 255;
  970. // sizes for HTML INPUTS
  971. // for list, multiselection list => number of items
  972. // for checkbox,radio is useless
  973. // Hint: more than 120 produce weird effects on user interface
  974. //
  975. $tlCfg->custom_fields->sizes = array('string' => 100,
  976. 'numeric' => 10,
  977. 'float' => 10,
  978. 'email' => 100,
  979. 'list' => 5,
  980. 'multiselection list' => 5,
  981. 'text area' => array('rows' => 6, 'cols' => 80),
  982. 'script' => 100,
  983. 'server' => 100);
  984. // Use this variable (on custom_config.inc.php) to define new Custom Field types.
  985. // IMPORTANT:
  986. // check $custom_field_types property on cfield_mgr.class.php
  987. // to avoid overwrite of standard types.
  988. //
  989. $tlCfg->gui->custom_fields->types = null;
  990. // Use this variable (on custom_config.inc.php)
  991. // to define possible values behaviour for new Custom Field types.
  992. //
  993. // IMPORTANT:
  994. // check $possible_values_cfg property on cfield_mgr.class.php
  995. // to avoid overwrite of standard values.
  996. //
  997. $tlCfg->gui->custom_fields->possible_values_cfg = null;
  998. /**
  999. * Check unique titles of Test Project, Test Suite and Test Case
  1000. * ENABLED => Check [STANDARD BEHAVIOUR]
  1001. * DISABLED => don't check
  1002. **/
  1003. $tlCfg->check_names_for_duplicates = ENABLED;
  1004. /**
  1005. * Action for duplication check (only if check_names_for_duplicates=ENABLED)
  1006. * 'allow_repeat' => allow the name to be repeated (backward compatibility)
  1007. * 'generate_new' => generate a new name using $g_prefix_name_for_copy
  1008. * 'block' => return with an error
  1009. **/
  1010. $tlCfg->action_on_duplicate_name = 'generate_new';
  1011. /**
  1012. * String checking and conversions
  1013. * Allow automatically convert www URLs and email adresses into clickable links
  1014. * used by function string_display_links() for example by custom fields.
  1015. * Valid values = ENABLED/DISABLED.
  1016. **/
  1017. $tlCfg->html_make_links = ENABLED;
  1018. /**
  1019. * Define the valid html tags for "content driven" single-line and multi-line fields.
  1020. * Do NOT include tags with parameters (eg. <font face="arial">), img and href.
  1021. * It's used by function string_display_links() for example by custom fields.
  1022. */
  1023. $tlCfg->html_valid_tags = 'p, li, ul, ol, br, pre, i, b, u, em';
  1024. $tlCfg->html_valid_tags_single_line = 'i, b, u, em';
  1025. /**
  1026. * Defines the threshold values for filtering TC by a priority according to the formula
  1027. * ui => (urgency*importance)
  1028. * LOW => all Tc's with ui < LOW_Threshold
  1029. * HIGH => all Tc's with ui >= HIGH_Threshold
  1030. * MEDIUM => all Tc's with ui >= LOW_Threshold AND ui < HIGH_Threshold
  1031. */
  1032. $tlCfg->urgencyImportance = new stdClass();
  1033. $tlCfg->urgencyImportance->threshold['low'] = 3;
  1034. $tlCfg->urgencyImportance->threshold['high'] = 6;
  1035. /**
  1036. * @var boolean Demo mode disables some functionality
  1037. * @TODO list with feature are disabled.
  1038. */
  1039. $tlCfg->demoMode = OFF;
  1040. // ----- End of Config ------------------------------------------------------------------
  1041. // --------------------------------------------------------------------------------------
  1042. // DO NOT CHANGE NOTHING BELOW
  1043. // --------------------------------------------------------------------------------------
  1044. // havlatm: @TODO move the next code out of config - configCheck.php -> included via common.php
  1045. /** Functions for check request status */
  1046. require_once('configCheck.php');
  1047. /** root of testlink directory location seen through the web server */
  1048. // @TODO: basehref should be defined by installation script or stored from login in $_SESSION
  1049. /* 20070106 - franciscom - this statement it's not 100% right
  1050. better use $_SESSION['basehref'] in the scripts. */
  1051. define('TL_BASE_HREF', get_home_url());
  1052. clearstatcache();
  1053. if ( file_exists( TL_ABS_PATH . 'custom_config.inc.php' ) )
  1054. {
  1055. require_once( TL_ABS_PATH . 'custom_config.inc.php' );
  1056. }
  1057. // BUGID 3424
  1058. if( !isset($g_attachments->access_icon) )
  1059. {
  1060. $g_attachments->access_icon = '<img src="' . $tlCfg->theme_dir . 'images/new_f2_16.png" style="border:none" />';
  1061. }
  1062. // BUGID 2914
  1063. // Important to do this only after custom_* to use (if exists) redefinition of
  1064. // $tlCfg->results['status_label_for_exec_ui']
  1065. $tlCfg->reportsCfg->exec_status = $tlCfg->results['status_label_for_exec_ui'];
  1066. /** Support for localization */
  1067. // @TODO schlundus, move the code out of config and do it only once and not always in any include!
  1068. // @TODO schlundus, a better parsing function should be include
  1069. $serverLanguage = false;
  1070. if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
  1071. {
  1072. @list($code) = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
  1073. @list($a,$b) = explode("-",$code);
  1074. if ($a && $b)
  1075. {
  1076. $a = strtolower($a);
  1077. $b = strtoupper($a);
  1078. $serverLanguage = $a."_".$b;
  1079. }
  1080. }
  1081. if(false !== $serverLanguage)
  1082. {
  1083. if (array_key_exists($serverLanguage,$g_locales))
  1084. $tlCfg->default_language = $serverLanguage;
  1085. }
  1086. define ('TL_DEFAULT_LOCALE', $tlCfg->default_language);
  1087. // Reverted execution status is used for two applications.
  1088. // 1. To map code to CSS, Please if you add an status you need to add a corresponding CSS Class
  1089. // in the CSS files (see the gui directory)
  1090. // 2. to decode from code to some more human oriented to use in code
  1091. //
  1092. /** Revered list of Test Case execution results */
  1093. $tlCfg->results['code_status'] = array_flip($tlCfg->results['status_code']);
  1094. // var_dump($tlCfg->testcase_cfg->duplicated_name_algorithm);
  1095. // --------------------------------------------------------------------------------------
  1096. /** Converted and derived variables (Users should not modify this section) */
  1097. define('REFRESH_SPEC_TREE',$tlCfg->spec_cfg->automatic_tree_refresh ? 1 : 0);
  1098. define('TL_SORT_TABLE_ENGINE',$g_sort_table_engine);
  1099. define("TL_REPOSITORY_MAXFILESIZE", 1024*1024*$tlCfg->repository_max_filesize);
  1100. define('TL_XMLEXPORT_HEADER', "<?xml version=\"1.0\" encoding=\"" . $tlCfg->charset . "\"?>\n");
  1101. define('TL_THEME_BASE_DIR', $tlCfg->theme_dir);
  1102. define('TL_THEME_IMG_DIR', $tlCfg->theme_dir . 'images/');
  1103. define('TL_THEME_CSS_DIR', $tlCfg->theme_dir . 'css/');
  1104. define('TL_TESTLINK_CSS', TL_THEME_CSS_DIR . TL_CSS_MAIN);
  1105. define('TL_PRINT_CSS', TL_THEME_CSS_DIR . TL_CSS_PRINT);
  1106. define('TL_TREEMENU_CSS', TL_THEME_CSS_DIR . TL_CSS_TREEMENU);
  1107. // --------------------------------------------------------------------------------------
  1108. // when a role is deleted, a new role must be assigned to all users
  1109. // having role to be deleted
  1110. // A right choice seems to be using $g_default_roleid.
  1111. // You can change this adding a config line in custom_config.inc.php
  1112. // @TODO martin: remove - use directly $tlCfg->default_roleid;
  1113. $g_role_replace_for_deleted_roles = $tlCfg->default_roleid;
  1114. /**
  1115. BUGID 0000086: Using "|" in the testsuite name causes malformed URLs
  1116. regexp used to check for chars not allowed in:
  1117. test project, test suite and testcase names.
  1118. @TODO martin: encode harm characters @see http://cz.php.net/urlencode (and remove the parameter)
  1119. */
  1120. // now is preg pattern
  1121. $g_ereg_forbidden = "/[|]/i";
  1122. /** @TODO martin: remove from configuration and use a number in brackets after name ("My Test Title(2)")
  1123. * Used when creating a Test Suite using copy
  1124. and you have choose $g_action_on_duplicate_name = 'generate_new'
  1125. if the name exist.
  1126. */
  1127. $g_prefix_name_for_copy = strftime("%Y%m%d-%H:%M:%S", time());
  1128. /**
  1129. * martin: @TODO remove - $g_action_on_duplicate_name is enough to define behaviour
  1130. * Check unique titles of Test Project, Test Suite and Test Case
  1131. * TRUE => Check [STANDARD BEHAVIOUR]
  1132. * FALSE => don't check
  1133. **/
  1134. // $g_check_names_for_duplicates = TRUE;
  1135. /**
  1136. * @TODO remove from TL - unfinished refactorization;
  1137. * use $tlCfg instead of old variables and constants
  1138. */
  1139. define('TL_IMPORT_ROW_MAX', $tlCfg->import_max_row);
  1140. define('TL_ITEM_BULLET_IMG', TL_THEME_IMG_DIR . $tlCfg->bullet_image);
  1141. define('TL_TPL_CHARSET', $tlCfg->charset);
  1142. define('TITLE_SEP',$tlCfg->gui_title_separator_1);
  1143. define('TITLE_SEP_TYPE2',$tlCfg->gui_title_separator_2);
  1144. define('TITLE_SEP_TYPE3',$tlCfg->gui_title_separator_2); // obsolete: use type 1,2
  1145. define('TL_FRMWORKAREA_LEFT_FRAME_WIDTH', $tlCfg->frame_workarea_default_width);
  1146. define('TL_TEMP_PATH', $tlCfg->temp_dir);
  1147. // $g_log_level=$tlCfg->log_level;
  1148. $tlCfg->document_generator->company_logo = $tlCfg->company_logo;
  1149. $tlCfg->gui->title_separator_1 = $tlCfg->gui_title_separator_1;
  1150. $tlCfg->gui->title_separator_2 = $tlCfg->gui_title_separator_2;
  1151. $tlCfg->gui->role_separator_open = $tlCfg->gui_separator_open;
  1152. $tlCfg->gui->role_separator_close = $tlCfg->gui_separator_close;
  1153. // ----- END OF FILE --------------------------------------------------------------------
  1154. ?>