[Fusionforge-commits] r9742 - trunk/gforge/utils/fixscripts

Roland Mas lolando at libremir.placard.fr.eu.org
Tue May 11 15:51:11 CEST 2010


Author: lolando
Date: 2010-05-11 15:51:11 +0200 (Tue, 11 May 2010)
New Revision: 9742

Removed:
   trunk/gforge/utils/fixscripts/upgrade_bug_data.php
   trunk/gforge/utils/fixscripts/upgrade_filerelease_data.php
   trunk/gforge/utils/fixscripts/upgrade_forum_data.php
   trunk/gforge/utils/fixscripts/upgrade_task_data.php
Log:
Removed old useless files

Deleted: trunk/gforge/utils/fixscripts/upgrade_bug_data.php
===================================================================
--- trunk/gforge/utils/fixscripts/upgrade_bug_data.php	2010-05-11 13:30:08 UTC (rev 9741)
+++ trunk/gforge/utils/fixscripts/upgrade_bug_data.php	2010-05-11 13:51:11 UTC (rev 9742)
@@ -1,69 +0,0 @@
-<?php
-//
-// SourceForge: Breaking Down the Barriers to Open Source Development
-// Copyright 1999-2000 (c) The SourceForge Crew
-// http://sourceforge.net
-
-exit;
-
-/*
-
-	One time use script
-
-*/
-
-require $gfwww.'include/pre.php';    
-
-session_require(array('group'=>'1','admin_flags'=>'A'));
-
-//get all the tasks
-$result=db_query_params ('SELECT bug_id FROM bug ORDER BY bug_id ASC',
-			array());
-$rows=db_numrows($result);
-echo "\nRows: $rows\n";
-flush();
-
-for ($i=0; $i<$rows; $i++) {
-
-	echo "\n".db_result($result,$i,'bug_id')."\n";
-
-	/*
-		//insert a default bug dependency
-	*/
-
-	$res2=db_query_params('SELECT * FROM bug_bug_dependencies WHERE bug_id=$1',
-			      array (db_result($result,$i,'bug_id'))) ;
-	$rows2=db_numrows($res2);
-	if ($rows2 < 1) {
-		db_query_params ('INSERT INTO bug_bug_dependencies VALUES ($1,$2,100)',
-				 array ('',
-					db_result($result,$i,'bug_id'))) ;
-	} else if ($rows2 > 1) {
-		db_query_params ('DELETE FROM bug_bug_dependencies WHERE bug_id=$1 AND is_dependent_on_bug_id=100',
-				 array (db_result($result,$i,'bug_id'))) ;
-	}
-
-	/*
-		//insert a default task dependency
-	*/
-
-	$res2=db_query_params('SELECT * FROM bug_task_dependencies WHERE bug_id=$1',
-			      array (db_result($result,$i,'bug_id'))) ;
-	$rows2=db_numrows($res2);
-	if ($rows2 < 1) {
-		db_query_params ('INSERT INTO bug_task_dependencies VALUES ($1, $2, 100)',
-				 array ('',
-					db_result($result,$i,'bug_id'))) ;
-	} else if ($rows2 > 1) {
-		db_query_params ('DELETE FROM bug_task_dependencies WHERE bug_id=$1 AND is_dependent_on_task_id=100',
-				 array (db_result($result,$i,'bug_id'))) ;
-	}
-
-}
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
-
-?>

Deleted: trunk/gforge/utils/fixscripts/upgrade_filerelease_data.php
===================================================================
--- trunk/gforge/utils/fixscripts/upgrade_filerelease_data.php	2010-05-11 13:30:08 UTC (rev 9741)
+++ trunk/gforge/utils/fixscripts/upgrade_filerelease_data.php	2010-05-11 13:51:11 UTC (rev 9742)
@@ -1,99 +0,0 @@
-<?php
-//
-// SourceForge: Breaking Down the Barriers to Open Source Development
-// Copyright 1999-2000 (c) The SourceForge Crew
-// http://sourceforge.net
-
-exit;
-
-/*
-
-
-	One time use script
-	to migrate and normalize the filerelease data
-
-	Methodology:
-
-	1. need to update the frs_release table with the change notes
-
-	2. need to build all the frs_file entries with proper relations to frs_release
-
-
-*/
-
-require_once $gfwww.'include/pre.php';
-
-echo $REMOTE_ADDR;
-
-if (!strstr($REMOTE_ADDR,'192.168.1.')) {
-        exit_permission_denied();
-}
-
-//get all the tasks
-$result=db_query_params ('SELECT * FROM frs_release WHERE release_id > 9290 ORDER BY release_id ASC',
-			array());
-$rows=db_numrows($result);
-echo "\n<br />Rows: $rows\n";
-flush();
-
-for ($i=0; $i<$rows; $i++) {
-	flush();
-	echo "\n<br />Release :: ".db_result($result,$i,'release_id');
-
-	/*
-		Get the files from the old system for this release
-	*/
-	$res2=db_query_params ('SELECT * FROM filerelease WHERE filemodule_id=$1 AND release_version=$2',
-			       array (db_result($result,$i,'package_id'),
-				      db_result($result,$i,'name'))) ;
-
-	$rows2=db_numrows($res2);
-	//echo db_error();
-	if ($rows2 < 1) {
-		/*
-			no matches for this release
-		*/
-		echo "\n<br />Warning - deleting release!";
-		db_query_params ('DELETE FROM frs_release WHERE release_id=$1',
-				 array (db_result($result,$i,'release_id'))) ;
-	} else {
-		$release_id=db_result($result,$i,'release_id');
-
-		/*
-			set the change notes and release time for this release 
-			based on any given file from the release in the old system
-		*/
-		db_query_params ('UPDATE frs_release SET notes=$1,changes=$2,preformatted=$3,released_by=$4,release_date=$5 WHERE release_id=$6',
-				 array (db_result($res2,0,'text_notes'),
-					db_result($res2,0,'text_changes'),
-					db_result($res2,0,'text_format'),
-					db_result($res2,0,'user_id'),
-					db_result($res2,0,'release_time'),
-					$release_id)) ;
-
-		echo "\n<br />Update Release: $release_id :: ".db_error();
-
-		for ($f=0; $f<$rows2; $f++) {
-		  /*
-		   move each of the files from the old system to the new
-		  */
-		  db_query_params ('INSERT INTO frs_file (file_id,filename,release_id,processor_id,release_time,file_size,post_date,type_id) VALUES ($1,$2,$3,$4,$5,$6,$7,$8)',
-				   array (db_result($res2,$f,'filerelease_id'),
-					  db_result($res2,$f,'filename'),
-					  $release_id,
-					  9999,
-					  db_result($res2,$f,'release_time'),
-					  db_result($res2,$f,'file_size'),
-					  db_result($res2,$f,'post_time'),
-					  9999)) ;
-			echo "\n<br />File: ". db_result($res2,$f,'filerelease_id') ." :: ".db_error();
-		}
-	}
-}
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
-
-?>

Deleted: trunk/gforge/utils/fixscripts/upgrade_forum_data.php
===================================================================
--- trunk/gforge/utils/fixscripts/upgrade_forum_data.php	2010-05-11 13:30:08 UTC (rev 9741)
+++ trunk/gforge/utils/fixscripts/upgrade_forum_data.php	2010-05-11 13:51:11 UTC (rev 9742)
@@ -1,59 +0,0 @@
-<?php
-//
-// SourceForge: Breaking Down the Barriers to Open Source Development
-// Copyright 1999-2000 (c) The SourceForge Crew
-// http://sourceforge.net
-
-exit;
-
-/*
-
-	One time use script
-
-	calculates and updates the has_followups flag in the forums
-
-*/
-
-require $gfwww.'include/pre.php';    
-
-session_require(array('group'=>'1','admin_flags'=>'A'));
-
-//get all the tasks
-$result=db_query_params('SELECT msg_id FROM forum ORDER BY msg_id ASC', array(), 10000, $z);
-$rows=db_numrows($result);
-echo db_error();
-echo "\nRows: $rows\n";
-flush();
-
-for ($i=0; $i<$rows; $i++) {
-
-	//echo "\n".db_result($result,$i,'msg_id')."\n";
-
-	/*
-		//insert a default bug dependency
-	*/
-
-	$res2=db_query_params('SELECT count(*) FROM forum WHERE is_followup_to=$1',
-			      array (db_result($result,$i,'msg_id'))) ;
-	$rows2=db_numrows($res2);
-	if (db_result($res2,0,0) < 1) {
-		// don't do anything
-		$counter2++;
-		//echo db_error();
-	} else {
-		$counter++;
-		db_query_params ('UPDATE forum SET has_followups=1 WHERE msg_id=$1',
-				 array (db_result($result,$i,'msg_id'))) ;
-	}
-}
-
-echo "\n\nUpdated: $counter";
-echo "\n\nSkipped: $counter2";
-flush();
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
-
-?>

Deleted: trunk/gforge/utils/fixscripts/upgrade_task_data.php
===================================================================
--- trunk/gforge/utils/fixscripts/upgrade_task_data.php	2010-05-11 13:30:08 UTC (rev 9741)
+++ trunk/gforge/utils/fixscripts/upgrade_task_data.php	2010-05-11 13:51:11 UTC (rev 9742)
@@ -1,69 +0,0 @@
-<?php
-//
-// SourceForge: Breaking Down the Barriers to Open Source Development
-// Copyright 1999-2000 (c) The SourceForge Crew
-// http://sourceforge.net
-
-exit;
-
-/*
-
-	One-time use script
-
-*/
-
-require $gfwww.'include/pre.php';    
-
-session_require(array('group'=>'1','admin_flags'=>'A'));
-
-//get all the tasks
-$result=db_query_params ('SELECT project_task_id FROM project_task ORDER BY project_task_id ASC',
-			array());
-$rows=db_numrows($result);
-echo "\nRows: $rows\n";
-flush();
-
-for ($i=0; $i<$rows; $i++) {
-
-	echo "\n".db_result($result,$i,'project_task_id')."\n";
-
-	/*
-		//insert a default dependency
-	*/
-
-	$res2=db_query_params('SELECT * FROM project_dependencies WHERE project_task_id=$1',
-			      array (db_result($result,$i,'project_task_id'))) ;
-	$rows2=db_numrows($res2);
-	if ($rows2 < 1) {
-		db_query_params ('INSERT INTO project_dependencies VALUES ($1,$2,100)',
-				 array ('',
-					db_result($result,$i,'project_task_id'))) ;
-	} else if ($rows2 > 1) {
-		db_query_params ('DELETE FROM project_dependencies WHERE project_task_id=$1 AND is_dependent_on_task_id=100',
-				 array (db_result($result,$i,'project_task_id'))) ;
-	}
-
-	/*
-		//insert a default assignee 
-	*/
-
-	$res2=db_query_params('SELECT * FROM project_assigned_to WHERE project_task_id=$1',
-			      array (db_result($result,$i,'project_task_id'))) ;
-	$rows2=db_numrows($res2);
-	if ($rows2 < 1) {
-		db_query_params ('INSERT INTO project_assigned_to VALUES ($1,$2,100)',
-				 array ('',
-					db_result($result,$i,'project_task_id'))) ;
-	} else if ($rows2 > 1) {
-		db_query_params ('DELETE FROM project_assigned_to WHERE project_task_id=$1 AND assigned_to_id=100',
-				 array (db_result($result,$i,'project_task_id'))) ;
-	}
-
-}
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:
-
-?>




More information about the Fusionforge-commits mailing list