[CS-Project-svn_notify] SF.net SVN: cs-project:[933] trunk/1.2/includes/content/project/view.inc
Brought to you by:
crazedsanity
From: <cra...@us...> - 2009-02-06 18:25:26
|
Revision: 933 http://cs-project.svn.sourceforge.net/cs-project/?rev=933&view=rev Author: crazedsanity Date: 2009-02-06 18:25:22 +0000 (Fri, 06 Feb 2009) Log Message: ----------- Fix problem error when linking an unlinked issue to a project (#248). /includes/content/project/view.inc: * only include a link to the old parent project if there actually was one. Modified Paths: -------------- trunk/1.2/includes/content/project/view.inc Modified: trunk/1.2/includes/content/project/view.inc =================================================================== --- trunk/1.2/includes/content/project/view.inc 2009-02-06 17:45:43 UTC (rev 932) +++ trunk/1.2/includes/content/project/view.inc 2009-02-06 18:25:22 UTC (rev 933) @@ -82,7 +82,6 @@ } elseif($action == "view" && is_numeric($_GET['ID'])) { - $showAllProjects = FALSE; $projectId = $page->ui->magic_cache("ID", NULL, "project","_GET,_SESSION"); $detailsArr = $proj->get_details($projectId); @@ -106,16 +105,21 @@ $helpdeskObj->remark($linkIssue, $remarkDetails); if($linkRes) { - $oldIsHelpdesk = $proj->helpdeskObj->isHelpdeskIssue; - $proj->helpdeskObj->isHelpdeskIssue=FALSE; - $oldProjData = $proj->helpdeskObj->get_parent_record($issueData['ancestry']); - $proj->helpdeskObj->isHelpdeskIssue=$oldIsHelpdesk; - $oldProjLinkList = $proj->get_ancestry_link_list($oldProjData['public_id'], TRUE, TRUE, TRUE); + $linkData = ""; + if($issueData['record_id'] != $issueData['ancestry']) { + $oldIsHelpdesk = $proj->helpdeskObj->isHelpdeskIssue; + $proj->helpdeskObj->isHelpdeskIssue=FALSE; + $oldProjData = $proj->helpdeskObj->get_parent_record($issueData['ancestry']); + $proj->helpdeskObj->isHelpdeskIssue=$oldIsHelpdesk; + + //build the "go back to old project" link. + $oldProjLinkList = $proj->get_ancestry_link_list($oldProjData['public_id'], TRUE, TRUE, TRUE); + $linkData = "<BR><BR>\nBack to old project:</b> [". $oldProjLinkList ."]"; + } $page->set_message_wrapper(array( 'title' => "Issue Linked Successfully", - 'message' => "Issue #". $linkIssue ." was successfully linked to this project.<BR><BR>" . - "<b>Back to old project:</b> [". $oldProjLinkList ."]", + 'message' => "Issue #". $linkIssue ." was successfully linked to this project." . $linkData, 'type' => "status" )); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |