testlink/lib/functions testcase.class.php,1.252,1.253

0 views
Skip to first unread message

francisco mancardi

unread,
Mar 15, 2010, 5:51:33 PM3/15/10
to asi...@users.sourceforge.net
Update of /cvsroot/testlink/testlink/lib/functions
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv12039

Modified Files:
testcase.class.php
Log Message:
fixed wrong code layout

Index: testcase.class.php
===================================================================
RCS file: /cvsroot/testlink/testlink/lib/functions/testcase.class.php,v
retrieving revision 1.252
retrieving revision 1.253
diff -C2 -d -r1.252 -r1.253
*** testcase.class.php 15 Mar 2010 12:23:14 -0000 1.252
--- testcase.class.php 15 Mar 2010 21:51:31 -0000 1.253
***************
*** 11,15 ****
*
* @internal Revisions:
! * 20100315 - amitkhullar - Added chkBox options for Requirements and CFields for Export.
* 20100309 - franciscom - get_by_id() - improvements on control to apply when LATEST_VERSION is requested.
* 20100309 - franciscom - get_exec_status() - interface changes
--- 11,15 ----
*
* @internal Revisions:
! * 20100315 - amitkhullar - Added options for Requirements and CFields for Export.
* 20100309 - franciscom - get_by_id() - improvements on control to apply when LATEST_VERSION is requested.
* 20100309 - franciscom - get_exec_status() - interface changes
***************
*** 2927,2947 ****
if ($optExport['CFIELDS'])
{
! $cfMap = $this->get_linked_cfields_at_design($tcase_id,null,null,$tproject_id);
!
! // ||yyy||-> tags, {{xxx}} -> attribute
! // tags and attributes receive different treatment on exportDataToXML()
! //
! // each UPPER CASE word in this map KEY, MUST HAVE AN OCCURENCE on $elemTpl
! // value is a key inside $tc_data[0]
! //
! if( !is_null($cfMap) && count($cfMap) > 0 )
! {
! $cfRootElem = "<custom_fields>{{XMLCODE}}</custom_fields>";
! $cfElemTemplate = "\t" . "<custom_field>\n" .
! "\t<name><![CDATA[||NAME||]]></name>\n" .
! "\t<value><![CDATA[||VALUE||\n]]></value>\n</custom_field>\n";
! $cfDecode = array ("||NAME||" => "name","||VALUE||" => "value");
! $tc_data[0]['xmlcustomfields'] = exportDataToXML($cfMap,$cfRootElem,$cfElemTemplate,$cfDecode,true);
! }
}

--- 2927,2947 ----
if ($optExport['CFIELDS'])
{
! $cfMap = $this->get_linked_cfields_at_design($tcase_id,null,null,$tproject_id);
!
! // ||yyy||-> tags, {{xxx}} -> attribute
! // tags and attributes receive different treatment on exportDataToXML()
! //
! // each UPPER CASE word in this map KEY, MUST HAVE AN OCCURENCE on $elemTpl
! // value is a key inside $tc_data[0]
! //
! if( !is_null($cfMap) && count($cfMap) > 0 )
! {
! $cfRootElem = "<custom_fields>{{XMLCODE}}</custom_fields>";
! $cfElemTemplate = "\t" . "<custom_field>\n" .
! "\t<name><![CDATA[||NAME||]]></name>\n" .
! "\t<value><![CDATA[||VALUE||\n]]></value>\n</custom_field>\n";
! $cfDecode = array ("||NAME||" => "name","||VALUE||" => "value");
! $tc_data[0]['xmlcustomfields'] = exportDataToXML($cfMap,$cfRootElem,$cfElemTemplate,$cfDecode,true);
! }
}

***************
*** 2956,2976 ****
}
}
! // Get Requirements
if ($optExport['REQS'])
{
! $requirements = $reqMgr->get_all_for_tcase($tcase_id);
! if( !is_null($requirements) && count($requirements) > 0 )
! {
! $reqRootElem = "\t<requirements>\n{{XMLCODE}}\t</requirements>\n";
! $reqElemTemplate = "\t\t<requirement>\n" .
! "\t\t\t<req_spec_title><![CDATA[||REQ_SPEC_TITLE||]]></req_spec_title>\n" .
! "\t\t\t<doc_id><![CDATA[||REQ_DOC_ID||]]></doc_id>\n" .
! "\t\t\t<title><![CDATA[||REQ_TITLE||]]></title>\n" .
! "\t\t</requirement>\n";
!
! $reqDecode = array ("||REQ_SPEC_TITLE||" => "req_spec_title",
! "||REQ_DOC_ID||" => "req_doc_id","||REQ_TITLE||" => "title");
! $tc_data[0]['xmlrequirements'] = exportDataToXML($requirements,$reqRootElem,$reqElemTemplate,$reqDecode,true);
! }
}
// ------------------------------------------------------------------------------------
--- 2956,2977 ----
}
}
!
! // Get Requirements
if ($optExport['REQS'])
{
! $requirements = $reqMgr->get_all_for_tcase($tcase_id);
! if( !is_null($requirements) && count($requirements) > 0 )
! {
! $reqRootElem = "\t<requirements>\n{{XMLCODE}}\t</requirements>\n";
! $reqElemTemplate = "\t\t<requirement>\n" .
! "\t\t\t<req_spec_title><![CDATA[||REQ_SPEC_TITLE||]]></req_spec_title>\n" .
! "\t\t\t<doc_id><![CDATA[||REQ_DOC_ID||]]></doc_id>\n" .
! "\t\t\t<title><![CDATA[||REQ_TITLE||]]></title>\n" .
! "\t\t</requirement>\n";
!
! $reqDecode = array ("||REQ_SPEC_TITLE||" => "req_spec_title",
! "||REQ_DOC_ID||" => "req_doc_id","||REQ_TITLE||" => "title");
! $tc_data[0]['xmlrequirements'] = exportDataToXML($requirements,$reqRootElem,$reqElemTemplate,$reqDecode,true);
! }
}
// ------------------------------------------------------------------------------------

Reply all
Reply to author
Forward
0 new messages