[Fusionforge-commits] FusionForge branch 6.1 updated. v6.1beta1-29-g5668cb3

Franck Villaume nerville at libremir.placard.fr.eu.org
Sun Dec 31 12:54:55 CET 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, 6.1 has been updated
       via  5668cb3e9958dd021dee2cb37684f5cb240f5399 (commit)
      from  f41f03cec5ec0e927e5dfb055cceaa1199ce9bbc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=5668cb3e9958dd021dee2cb37684f5cb240f5399

commit 5668cb3e9958dd021dee2cb37684f5cb240f5399
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 31 12:54:36 2017 +0100

    tracker XML export: make it work again!

diff --git a/src/www/export/tracker.php b/src/www/export/tracker.php
index 292db2a..6a8df19 100644
--- a/src/www/export/tracker.php
+++ b/src/www/export/tracker.php
@@ -1,16 +1,26 @@
 <?php
 /**
-  * sf_tracker_export.php
-  *
-  * SourceForge Exports: Export tracker contents in XML
-  *
-  *
-  * SourceForge: Breaking Down the Barriers to Open Source Development
-  * Copyright 1999-2001 (c) VA Linux Systems
-  * http://sourceforge.net
-  *
-  * @author		Darrell Brogdon <dbrogdon at valinux.com>
-  */
+ * FusionForge Tracker XML export
+ *
+ * Copyright 1999-2001, Darrell Brogdon - VALinux
+ * Copyright 2017, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 
 require_once '../env.inc.php';
 require_once $gfcommon.'include/pre.php';
@@ -20,8 +30,9 @@ require_once $gfcommon.'tracker/ArtifactFile.class.php';
 require_once $gfcommon.'tracker/ArtifactType.class.php';
 require_once $gfcommon.'tracker/ArtifactCanned.class.php';
 
-function beginDocument() {
+$sysdebug_enable = false;
 
+function beginDocument() {
 	header("Content-Type: text/plain");
 	echo '<tracker version="1.0" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://'.forge_get_config('web_host').'/export/tracker.xsd">'."\n";
 }
@@ -63,7 +74,7 @@ if ($group_id && $atid) {
 	//
 	//  Add checks to see if they have perms to view this
 	//
-	if (!session_check_perm ('tracker', $atid)) {
+	if (!forge_check_perm('tracker', $atid, 'read')) {
 		endOnError('Permission Denied');
 		$errors = true;
 	}
@@ -102,87 +113,86 @@ if ($group_id && $atid) {
 
 	for ($i=0; $i<count($alist); $i++) {
 ?>
-	<artifact id="<?php echo $alist[$i]->getID(); ?>">
-		<submitted_by><?php echo $alist[$i]->getSubmittedUnixName(); ?></submitted_by>
-		<submitted_date><?php echo date( _('Y-m-d H:i'), $alist[$i]->getOpenDate() ); ?></submitted_date>
-		<artifact_type id="<?php echo $ath->getID(); ?>"><?php echo $ath->getID(); ?></artifact_type>
-		<assigned_to><?php echo $alist[$i]->getAssignedRealName(); ?></assigned_to>
-		<priority id="<?php echo $alist[$i]->getPriority(); ?>"><?php echo $alist[$i]->getPriority(); ?></priority>
-		<status><?php echo $alist[$i]->getStatusName(); ?></status>
-		<resolution><?php echo $alist[$i]->getResolutionName(); ?></resolution>
-		<summary><?php echo $alist[$i]->getSummary(); ?></summary>
-		<detail><?php echo $alist[$i]->getDetails(); ?></detail>
+		<artifact id="<?php echo $alist[$i]->getID(); ?>">
+			<submitted_by><?php echo $alist[$i]->getSubmittedUnixName(); ?></submitted_by>
+			<submitted_date><?php echo date( _('Y-m-d H:i'), $alist[$i]->getOpenDate() ); ?></submitted_date>
+			<artifact_type id="<?php echo $ath->getID(); ?>"><?php echo $ath->getID(); ?></artifact_type>
+			<assigned_to><?php echo $alist[$i]->getAssignedRealName(); ?></assigned_to>
+			<priority id="<?php echo $alist[$i]->getPriority(); ?>"><?php echo $alist[$i]->getPriority(); ?></priority>
+			<status><?php echo $alist[$i]->getStatusName(); ?></status>
+			<summary><?php echo $alist[$i]->getSummary(); ?></summary>
+			<detail><?php echo $alist[$i]->getDetails(); ?></detail>
 <?php
-	$result = $alist[$i]->getMessages();
-	$rows = db_numrows($result);
-	if ($rows > 0) {
+		$result = $alist[$i]->getMessages();
+		$rows = db_numrows($result);
+		if ($rows > 0) {
 ?>
-		<follow_ups>
+			<follow_ups>
 <?php
-		for ($x=0; $x<$rows; $x++) {
+			for ($x=0; $x<$rows; $x++) {
 ?>
-			<item>
-				<date><?php echo db_result($result, $x, 'adddate'); ?></date>
-				<sender><?php echo db_result($result, $x, 'user_name'); ?></sender>
-				<text><?php echo db_result($result, $x, 'body'); ?></text>
-			</item>
+				<item>
+					<date><?php echo db_result($result, $x, 'adddate'); ?></date>
+					<sender><?php echo db_result($result, $x, 'user_name'); ?></sender>
+					<text><?php echo db_result($result, $x, 'body'); ?></text>
+				</item>
 <?php
-		}
+			}
 ?>
 		</follow_ups>
 <?php
 	}
 
-	$file_list =& $alist[$i]->getFiles();
-	$count=count($file_list);
-	if ($count > 0) {
+		$file_list =& $alist[$i]->getFiles();
+		$count=count($file_list);
+		if ($count > 0) {
 ?>
-		<existingfiles>
+			<existingfiles>
 <?php
-		for ($x=0; $x<$count; $x++) {
+			for ($x=0; $x<$count; $x++) {
 ?>
-			<file>
-				<id><?php echo $file_list[$x]->getID(); ?></id>
-				<name><?php echo $file_list[$x]->getName(); ?></name>
-				<description><?php echo $file_list[$x]->getDescription(); ?></description>
-				<filesize><?php echo $file_list[$x]->getSize(); ?></filesize>
-				<filetype><?php echo $file_list[$x]->getType(); ?></filetype>
-				<adddate><?php echo $file_list[$x]->getDate(); ?></adddate>
-				<submitted_by><?php echo $file_list[$x]->getSubmittedBy(); ?></submitted_by>
-			</file>
+				<file>
+					<id><?php echo $file_list[$x]->getID(); ?></id>
+					<name><?php echo $file_list[$x]->getName(); ?></name>
+					<description><?php echo $file_list[$x]->getDescription(); ?></description>
+					<filesize><?php echo $file_list[$x]->getSize(); ?></filesize>
+					<filetype><?php echo $file_list[$x]->getType(); ?></filetype>
+					<adddate><?php echo $file_list[$x]->getDate(); ?></adddate>
+					<submitted_by><?php echo $file_list[$x]->getSubmittedBy(); ?></submitted_by>
+				</file>
 <?php
-		}
+			}
 ?>
-		</existingfiles>
+			</existingfiles>
 <?php
-	}
+		}
 
-	$result = $alist[$i]->getHistory();
-	$rows = db_numrows($result);
+		$result = $alist[$i]->getHistory();
+		$rows = db_numrows($result);
 
-	if ($rows > 0) {
+		if ($rows > 0) {
 ?>
-		<change_log>
+			<change_log>
 <?php
-		for ($x=0; $x<$rows; $x++) {
+			for ($x=0; $x<$rows; $x++) {
 ?>
-			<item>
-				<field><?php echo db_result($result, $x, 'field_name'); ?></field>
-				<old_value><?php echo db_result($result, $x, 'old_value'); ?></old_value>
-				<date><?php echo db_result($result, $x, 'entrydate'); ?></date>
-				<by><?php echo db_result($result, $x, 'user_name'); ?></by>
-			</item>
+				<item>
+					<field><?php echo db_result($result, $x, 'field_name'); ?></field>
+					<old_value><?php echo db_result($result, $x, 'old_value'); ?></old_value>
+					<date><?php echo db_result($result, $x, 'entrydate'); ?></date>
+					<by><?php echo db_result($result, $x, 'user_name'); ?></by>
+				</item>
 <?php
-		}
+			}
 ?>
-		</change_log>
+			</change_log>
 <?php
-	}
+		}
 ?>
-	</artifact>
-</tracker>
+		</artifact>
 <?php
 	}
+	echo '</tracker>';
 } else {
 	beginDocument();
 	displayError('Project ID or Artifact ID Not Set');
diff --git a/src/www/export/tracker.xsd b/src/www/export/tracker.xsd
index 47d1721..24c9d45 100644
--- a/src/www/export/tracker.xsd
+++ b/src/www/export/tracker.xsd
@@ -162,19 +162,6 @@
 			</xsd:simpleContent>
 		</xsd:complexType>
 	</xsd:element>
-	<xsd:element name="resolution">
-		<xsd:complexType>
-			<xsd:simpleContent>
-				<xsd:extension base="xsd:string">
-					<xsd:attribute name="id">
-						<xsd:simpleType>
-							<xsd:restriction base="xsd:int"/>
-						</xsd:simpleType>
-					</xsd:attribute>
-				</xsd:extension>
-			</xsd:simpleContent>
-		</xsd:complexType>
-	</xsd:element>
 	<xsd:element name="sender" type="xsd:string"/>
 	<xsd:element name="status">
 		<xsd:complexType>

-----------------------------------------------------------------------

Summary of changes:
 src/www/export/tracker.php | 144 ++++++++++++++++++++++++---------------------
 src/www/export/tracker.xsd |  13 ----
 2 files changed, 77 insertions(+), 80 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list