const.inc.php_20070817

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

下から選んでください:

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