const.inc.php_20070828

  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.  * Filename $RCSfile: const.inc.php,v $
  7.  *
  8.  * @version $Revision: 1.37 $
  9.  * @modified $Date: 2007/08/27 06:36:40 $ by $Author: franciscom $
  10.  * @author Martin Havl叩t
  11.  *
  12.  * SCOPE:
  13.  * Global Constants used throughout TestLink
  14.  * Script is included via config.inc.php
  15.  * There should be changed for your environment
  16.  *
  17.  *-------------------------------------------------------------------
  18.  * Revisions:
  19.  * 20070822 - franciscom - localisation ru_RU
  20.  * 20070818 - franciscom - $g_default_roleid
  21.  * 20070705 - franciscom - config of $g_req_status.
  22.  * 20070624 - franciscom - $g_title_sep*
  23.  * 20070607 - franciscom
  24.  * to solve BUGID: 887
  25.  * GET_ACTIVE_BUILD, GET_INACTIVE_BUILD
  26.  * GET_OPEN_BUILD,GET_CLOSED_BUILD
  27.  *
  28.  * 20070523 - franciscom
  29.  * MENU_ITEM_OPEN, MENU_ITEM_CLOSE
  30.  *
  31.  * 20070519 - franciscom
  32.  * $g_locales_html_select_date_field_order
  33.  *
  34.  *-------------------------------------------------------------------
  35. **/
  36.  
  37. // ----------------------------------------------------------------------------
  38. /** [GLOBAL] */
  39.  
  40. // ----------------------------------------------------------------------------
  41. /** [GUI] */
  42.  
  43. /* Release MUST BE changed at the release day */
  44. define('TL_VERSION', '1.7.0 RC 3');
  45. define('TL_BACKGROUND_DEFAULT', "#9BD"); // default color
  46.  
  47. // planAddTC_m1-tpl
  48. define('TL_STYLE_FOR_ADDED_TC', "background-color:yellow;");
  49.  
  50.  
  51. define('TL_COOKIE_KEEPTIME', (time()+60*60*24*30)); // 30 days
  52.  
  53. // Configurable templates this can help if you want to use a non standard template.
  54. // i.e. you want to develop a new one without loosing the original template.
  55. //
  56. $g_tpl = array(
  57. 'tcView' => "tcView.tpl",
  58. 'tcSearchView' => "tcSearchView.tpl",
  59. 'tcEdit' => "tcEdit.tpl",
  60. 'tcNew' => "tcNew.tpl",
  61. 'execSetResults' => "execSetResults.tpl",
  62. 'tcView' => "tcView.tpl",
  63. 'tcSearchView' => "tcView.tpl",
  64. 'usersview' => "usersview.tpl"
  65. );
  66.  
  67.  
  68.  
  69. // -------------------------------------------------------------------
  70. /** [LDAP authentication errors */
  71. //
  72. // Based on mantis issue tracking system code
  73. // ERROR_LDAP_*
  74. define( 'ERROR_LDAP_AUTH_FAILED', 1400 );
  75. define( 'ERROR_LDAP_SERVER_CONNECT_FAILED', 1401 );
  76. define( 'ERROR_LDAP_UPDATE_FAILED', 1402 );
  77. define( 'ERROR_LDAP_USER_NOT_FOUND', 1403 );
  78. define( 'ERROR_LDAP_BIND_FAILED', 1404 );
  79.  
  80.  
  81.  
  82. // ----------------------------------------------------------------------------
  83. /** [LOCALIZATION] */
  84.  
  85. // String that will used as prefix, to generate an string when a label to be localized
  86. // is passed to lang_get() to be translated, by the label is not present in the strings
  87. // file.
  88. // The resulting string will be: TL_LOCALIZE_TAG . label
  89. // Example:
  90. // want to translate "Hello" -> LOCALIZE: Hello
  91. //
  92. define('TL_LOCALIZE_TAG',"LOCALIZE: ");
  93.  
  94. // These are the supported locales.
  95. // This array will be used to create combo box at user interface.
  96. // Please mantain the alphabetical order when adding new locales.
  97. // Attention:
  98. // The locale selected by default in the combo box when
  99. // creating a new user WILL BE fixed by the value of the default locale,
  100. // NOT by the order of the elements in this array.
  101. //
  102. $g_locales = array(
  103. 'zh_CN' => 'Chinese Simplified',
  104. 'en_GB' => 'English (UK)',
  105. 'en_US' => 'English (US)',
  106. 'fr_FR' => 'Fran&ccedil;ais',
  107. 'de_DE' => 'German',
  108. 'it_IT' => 'Italian',
  109. 'pl_PL' => 'Polski',
  110. 'pt_BR' => 'Portuguese (Brazil)',
  111. 'es_AR' => 'Spanish (Argentine)',
  112. 'es_ES' => 'Spanish',
  113. 'ru_RU' => 'Russian',
  114. 'jp_JP' => 'Japanese'
  115. );
  116.  
  117. // see strftime() in PHP manual
  118. // Very IMPORTANT:
  119. // setting according local is done in testlinkInitPage() using set_dt_formats()
  120. // Default values
  121. $g_date_format ="%d/%m/%Y";
  122. $g_timestamp_format = "%d/%m/%Y %H:%M:%S";
  123.  
  124. $g_locales_date_format = array(
  125. 'en_GB' => "%d/%m/%Y",
  126. 'en_US' => "%m/%d/%Y",
  127. 'it_IT' => "%d/%m/%Y",
  128. 'es_AR' => "%d/%m/%Y",
  129. 'es_ES' => "%d/%m/%Y",
  130. 'de_DE' => "%d.%m.%Y",
  131. 'pl_PL' => "%d.%m.%Y",
  132. 'fr_FR' => "%d/%m/%Y",
  133. 'pt_BR' => "%d/%m/%Y",
  134. 'ru_RU' => "%d/%m/%Y",
  135. 'zh_CN' => "%Y鐃緒申%m鐃緒申%d鐃緒申",
  136. 'jp_JP' => "%Y/%m/%d"
  137. );
  138.  
  139. $g_locales_timestamp_format = array(
  140. 'en_GB' => "%d/%m/%Y %H:%M:%S",
  141. 'en_US' => "%m/%d/%Y %H:%M:%S",
  142. 'it_IT' => "%d/%m/%Y %H:%M:%S",
  143. 'es_AR' => "%d/%m/%Y %H:%M:%S",
  144. 'es_ES' => "%d/%m/%Y %H:%M:%S",
  145. 'de_DE' => "%d.%m.%Y %H:%M:%S",
  146. 'pl_PL' => "%d.%m.%Y %H:%M:%S",
  147. 'fr_FR' => "%d/%m/%Y %H:%M:%S",
  148. 'pt_BR' => "%d/%m/%Y %H:%M:%S",
  149. 'ru_RU' => "%d/%m/%Y %H:%M:%S",
  150. 'zh_CN' => "%Y鐃緒申%m鐃緒申%d鐃緒申 %H扮%M鐃緒申%S鐃緒申",
  151. 'jp_JP' => "%Y/%m/%d %H:%M:%S"
  152. );
  153.  
  154. // for smarty html_select_date custom function
  155. $g_locales_html_select_date_field_order = array(
  156. 'en_GB' => "dmY",
  157. 'en_US' => "mdY",
  158. 'it_IT' => "dmY",
  159. 'es_AR' => "dmY",
  160. 'es_ES' => "dmY",
  161. 'de_DE' => "dmY",
  162. 'pl_PL' => "dmY",
  163. 'fr_FR' => "dmY",
  164. 'pt_BR' => "dmY",
  165. 'ru_RU' => "dmY",
  166. 'zh_CN' => "Ymd",
  167. 'jp_JP' => "Ymd"
  168. );
  169.  
  170.  
  171.  
  172. // -------------------------------------------------------------------
  173. /** ATTACHMENTS */
  174.  
  175. /* some attachment related defines, no need to modify them */
  176. define("TL_REPOSITORY_TYPE_DB",1);
  177. define("TL_REPOSITORY_TYPE_FS",2);
  178.  
  179. define("TL_REPOSITORY_COMPRESSIONTYPE_NONE",1);
  180. define("TL_REPOSITORY_COMPRESSIONTYPE_GZIP",2);
  181.  
  182.  
  183. // Two models to manage attachment interface in the execution screen
  184. // $att_model_m1 -> shows upload button and title
  185. //
  186. $att_model_m1->show_upload_btn = true;
  187. $att_model_m1->show_title = true;
  188. $att_model_m1->num_cols = 4;
  189. $att_model_m1->show_upload_column = false;
  190.  
  191. // $att_model_m2 -> hides upload button and title
  192. //
  193. $att_model_m2->show_upload_btn = false;
  194. $att_model_m2->show_title = false;
  195. $att_model_m2->num_cols = 5;
  196. $att_model_m2->show_upload_column = true;
  197.  
  198.  
  199. // -------------------------------------------------------------------
  200. /** [MISC] */
  201.  
  202. /** [Test Case Status] */
  203.  
  204. // $g_tc_status
  205. // $g_tc_status_css
  206. // $g_tc_status_verbose_labels
  207. // $g_tc_status_for_ui
  208. //
  209. //
  210. // These are the possible Test Case statuses.
  211. //
  212. // Localisation Note:
  213. // IMPORTANT:
  214. // Do not do localisation here, i.e do not change "passed"
  215. // with the corresponding word in you national language.
  216. // These strings ARE NOT USED at User interface level.
  217. //
  218. // Labels showed to users will be created using lang_get()
  219. // function, getting key from:
  220. // $g_tc_status_verbose_labels
  221. // example:
  222. // lang_get($g_tc_status_verbose_labels["passed"]);
  223. //
  224. // If you add new statuses, please use custom_strings.txt to add your
  225. // localized strings
  226. //
  227. $g_tc_status = array (
  228. "failed" => 'f',
  229. "blocked" => 'b',
  230. "passed" => 'p',
  231. "not_run" => 'n',
  232. "not_available" => 'x',
  233. "unknown" => 'u',
  234. "all" => 'all'
  235. );
  236.  
  237. // Please if you add an status you need to add a corresponding CSS Class
  238. // in the CSS files (see the gui directory)
  239. $g_tc_status_css = array_flip($g_tc_status);
  240.  
  241.  
  242. // Used to get localized string to show to users
  243. // key: status
  244. // value: id to use with lang_get() to get the string, from strings.txt
  245. // or custom_strings.txt
  246. //
  247. $g_tc_status_verbose_labels = array(
  248. "all" => "test_status_all_status",
  249. "not_run" => "test_status_not_run",
  250. "passed" => "test_status_passed",
  251. "failed" => "test_status_failed",
  252. "blocked" => "test_status_blocked",
  253. "not_available" => "test_status_not_available",
  254. "unknown" => "test_status_unknown"
  255. );
  256.  
  257.  
  258. // Used to generate radio and buttons at user interface level.
  259. // Order is important, because this will be display order on User Interface
  260. //
  261. // key => verbose status as defined in $g_tc_status
  262. // value => string id defined in the strings.txt file,
  263. // used to localize the strings.
  264. //
  265. // $g_tc_status_for_ui = array(
  266. // "not_run" => "test_status_not_run",
  267. // "passed" => "test_status_passed",
  268. // "failed" => "test_status_failed",
  269. // "blocked" => "test_status_blocked"
  270. // );
  271.  
  272. $g_tc_status_for_ui = array(
  273. "passed" => "test_status_passed",
  274. "failed" => "test_status_failed",
  275. "blocked" => "test_status_blocked"
  276. );
  277.  
  278. // radio button selected by default
  279. $g_tc_status_for_ui_default="blocked";
  280.  
  281. // -------------------------------------------------------------------------------
  282.  
  283.  
  284. /** [Roles] */
  285. define("TL_ROLES_GUEST",5);
  286. define("TL_ROLES_NONE",3);
  287. define("TL_ROLES_NO_RIGHTS",3);
  288.  
  289. define("TL_ROLES_UNDEFINED",0);
  290. define("TL_ROLES_INHERITED",0);
  291.  
  292. // Roles with id > to this role can be deleted from user interface
  293. define("TL_LAST_SYSTEM_ROLE",9);
  294.  
  295.  
  296. // you can change the default role used for new users:
  297. // - created from the login page.
  298. // - created using user management features
  299. //
  300. // use custom_config.inc.php instead of doing changes here
  301. $g_default_roleid=TL_ROLES_GUEST;
  302.  
  303. // when a role is deleted, a new role must be assigned to all users
  304. // having role to be deleted
  305. // A right choice seems to be using $g_default_roleid.
  306. // You can change this adding a config line in custom_config.inc.php
  307. $g_role_replace_for_deleted_roles=$g_default_roleid;
  308.  
  309.  
  310. // used to mark up inactive objects (test projects, etc)
  311. define("TL_INACTIVE_MARKUP","* ");
  312.  
  313. // used on user management page to give different colour
  314. // to different roles.
  315. // If you don't want use colouring then configure in this way
  316. // $g_role_colour = array ( );
  317. //
  318. $g_role_colour = array (
  319. "admin" => 'white',
  320. "tester" => 'wheat',
  321. 'leader' => 'acqua',
  322. 'senior tester' => '#FFA',
  323. 'guest' => 'pink',
  324. 'test designer' => 'cyan',
  325. '<no rights>' => 'salmon',
  326. '<inherited>' => 'seashell'
  327. );
  328.  
  329.  
  330. $g_tc_risks = array('L1', 'L2', 'L3','M1', 'M2', 'M3','H1', 'H2', 'H3');
  331.  
  332.  
  333. // use when componing an title using several strings
  334. $g_title_sep=' : ';
  335. $g_title_sep_type2=' >> ';
  336. $g_title_sep_type3=' - ';
  337.  
  338. // used when created a test suite path, concatenating test suite names
  339. $g_testsuite_sep='/';
  340.  
  341.  
  342. // [Main page]
  343. // define('MENU_ITEM_OPEN','<div class="module-grey"><div><div><div>');
  344. // define('MENU_ITEM_CLOSE','</div></div></div></div>');
  345.  
  346. // using niftycorners
  347. define('MENU_ITEM_OPEN','<div class="menu_bubble">');
  348. define('MENU_ITEM_CLOSE','</div><p>');
  349.  
  350.  
  351.  
  352. // moved from requirements.inc.php
  353. define('TL_REQ_STATUS_VALID', 'V');
  354. define('TL_REQ_STATUS_NOT_TESTABLE', 'N');
  355.  
  356. $g_req_status=array(TL_REQ_STATUS_VALID => 'req_state_valid',
  357. TL_REQ_STATUS_NOT_TESTABLE => 'req_state_not_testable');
  358.  
  359.  
  360. //
  361. // [FUNCTION MAGIC NUMBERS] [DON'T BOTHER ABOUT]
  362. // used in several functions instead of MAGIC NUMBERS - Don't change
  363. define('ALL_PRODUCTS',0);
  364. define('TP_ALL_STATUS',null);
  365. define('FILTER_BY_PRODUCT',1);
  366. define('FILTER_BY_TESTPROJECT',FILTER_BY_PRODUCT);
  367. define('TP_STATUS_ACTIVE',1);
  368. define('NON_TESTABLE_REQ','n');
  369. define('VALID_REQ','v');
  370.  
  371. define('DSN',FALSE); // for method connect() of database.class
  372. define('ANY_BUILD',null);
  373. define('GET_NO_EXEC',1);
  374.  
  375.  
  376. define('ACTIVE',1);
  377. define('INACTIVE',0);
  378. define('OPEN',1);
  379. define('CLOSED',0);
  380.  
  381. // moved from testSetNavigator.php
  382. define('FILTER_BY_BUILD_OFF',0);
  383. define('FILTER_BY_OWNER_OFF',0);
  384. define('FILTER_BY_TC_STATUS_OFF',null);
  385.  
  386. // moved from testSetRemove.php
  387. define('WRITE_BUTTON_ONLY_IF_LINKED',1);
  388.  
  389. // moved from tc_exec_assignment.php
  390. define('FILTER_BY_TC_OFF',null);
  391. define('ALL_USERS_FILTER',null);
  392. define('ADD_BLANK_OPTION',true);
  393.  
  394.  
  395.  
  396. define('DO_LANG_GET',1);
  397. define('DONT_DO_LANG_GET',0);
  398.  
  399. //
  400. define('FILTER_BY_SHOW_ON_EXECUTION',1);
  401.  
  402. define('GET_ALSO_NOT_EXECUTED',null);
  403. define('GET_ONLY_EXECUTED','executed');
  404.  
  405. // generateTestSpecTree()
  406. define('HIDE_TESTCASES',1);
  407. define('SHOW_TESTCASES',0);
  408. define('FILTER_INACTIVE_TESTCASES',1);
  409. define('DO_NOT_FILTER_INACTIVE_TESTCASES',0);
  410.  
  411. define('DO_ON_TESTCASE_CLICK',1);
  412. define('NO_ADDITIONAL_ARGS','');
  413. define('NO_KEYWORD_ID_TO_FILTER',0);
  414.  
  415.  
  416. define('RECURSIVE_MODE',TRUE);
  417. define('NO_NODE_TYPE_TO_FILTER',null);
  418. define('ANY_OWNER',null);
  419.  
  420. define('ALL_BUILDS','a');
  421. define('ALL_TEST_SUITES','all');
  422.  
  423. define('GET_ACTIVE_BUILD',1);
  424. define('GET_INACTIVE_BUILD',0);
  425. define('GET_OPEN_BUILD',1);
  426. define('GET_CLOSED_BUILD',0);
  427.  
  428.  
  429. // bug_interface->buildViewBugLink()
  430. define('GET_BUG_SUMMARY',true);
  431.  
  432. // gen_spec_view()
  433. define('DO_PRUNE',1);
  434.  
  435. // getAllRoles()
  436. define('EXCLUDE_UNDEFINED_ROLE',0);
  437. // -------------------------------------------------------------------
  438. ?>
最終更新:2007年08月28日 14:12
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。