[Fusionforge-commits] r7742 - in branches/Branch_4_8/gforge/plugins/svntracker: common www

Guillaume Smet gsmet at libremir.placard.fr.eu.org
Sun Jun 7 12:53:54 CEST 2009


Author: gsmet
Date: 2009-06-07 12:53:54 +0200 (Sun, 07 Jun 2009)
New Revision: 7742

Modified:
   branches/Branch_4_8/gforge/plugins/svntracker/common/svntrackerPlugin.class.php
   branches/Branch_4_8/gforge/plugins/svntracker/www/newcommit.php
Log:
fixed the SVNTracker plugin
per patch from Laurent Almeras (Open Wide)

Modified: branches/Branch_4_8/gforge/plugins/svntracker/common/svntrackerPlugin.class.php
===================================================================
--- branches/Branch_4_8/gforge/plugins/svntracker/common/svntrackerPlugin.class.php	2009-06-07 10:48:10 UTC (rev 7741)
+++ branches/Branch_4_8/gforge/plugins/svntracker/common/svntrackerPlugin.class.php	2009-06-07 10:53:54 UTC (rev 7742)
@@ -111,7 +111,7 @@
 	*
 	*/
 	function getFileLink($GroupName, $FileName, $LatestRevision) {
-		return util_make_link ('/plugins/scmsvn/viewcvs.php/'.$FileName .
+		return util_make_link ('/scm/viewvc.php'.$FileName .
 				       '?root='.$GroupName.'&view=log&rev=' .
 				       $LatestRevision,
 				       $FileName) ;
@@ -128,7 +128,7 @@
 	*
 	*/
 	function getActualVersionLink($GroupName, $FileName, $Version) {
-		return util_make_link ('/plugins/scmsvn/viewcvs.php/'.$FileName .
+		return util_make_link ('/scm/viewvc.php'.$FileName .
 				       '?root='.$GroupName.'&rev='.$Version,
 				       $Version);
 	}
@@ -145,7 +145,7 @@
 	*
 	*/
 	function getDiffLink($GroupName, $FileName, $PrevVersion, $ActualVersion) {
-		return util_make_link ('/plugins/scmsvn/viewcvs.php/'.$FileName .
+		return util_make_link ('/scm/viewvc.php'.$FileName .
 				       '?root='.$GroupName.'&r1='.$PrevVersion .
 				       '&r2='.$ActualVersion,
 				       _('Diff To').' '.$PrevVersion);

Modified: branches/Branch_4_8/gforge/plugins/svntracker/www/newcommit.php
===================================================================
--- branches/Branch_4_8/gforge/plugins/svntracker/www/newcommit.php	2009-06-07 10:48:10 UTC (rev 7741)
+++ branches/Branch_4_8/gforge/plugins/svntracker/www/newcommit.php	2009-06-07 10:53:54 UTC (rev 7742)
@@ -16,6 +16,7 @@
  *
  */
 
+require_once dirname(__FILE__)."/../../env.inc.php";
 require_once $gfwww.'include/squal_pre.php';
 require_once $gfconfig.'plugins/svntracker/config.php';
 
@@ -30,10 +31,11 @@
  */
 $Config = array();
 $SubmittedVars = array();
-$SubmittedVars = unserialize(str_replace('\"','"',$_POST['data']));
+$SubmittedVars = unserialize(str_replace('\\\\', '\\', str_replace('\"','"',$_POST['data'])));
 
 $i = 0;
 foreach ($SubmittedVars as $SubmittedVar) {
+	$Configs[$i] = array();
 	$Configs[$i]['UserName']        = $SubmittedVar['UserName'];
 	//$Configs[$i]['UserName']        = 'def_admin';   use this to make tests, just replace with a gforge user
 	$Configs[$i]['Repository']      = $SubmittedVar['Repository'];
@@ -127,7 +129,7 @@
  */
 function addArtifactLog($Config, $GroupId, $Num)
 {
-	global $file;
+	global $file, $svn_tracker_debug;
 	$return = array();
 	$Query = "SELECT * from artifact,artifact_group_list WHERE ".
 		"artifact.group_artifact_id=artifact_group_list.group_artifact_id ".
@@ -140,7 +142,7 @@
 		fwrite($file,"rows : " . $Rows ."\n");
 	}
 	if ($Rows == 0) {
-		$return['Error'] .= "Artifact ".$Num." Not Found.";
+		$return['Error'] = "Artifact ".$Num." Not Found.";
 	}
 
 	if ($Rows == 1) {
@@ -238,7 +240,7 @@
 }
 
 foreach ($Configs as $Config) {
-	$Result = parseConfig(&$Config);
+	$Result = parseConfig($Config);
 	if ($Result['check'] == false) {
 		exit_error('Check_error', $Result['error']);
 	}




More information about the Fusionforge-commits mailing list