[Fusionforge-commits] r12350 - trunk/src

Christian Bayle cbayle at fusionforge.org
Tue Feb 22 20:44:19 CET 2011


Author: cbayle
Date: 2011-02-22 20:44:15 +0100 (Tue, 22 Feb 2011)
New Revision: 12350

Modified:
   trunk/src/fusionforge-install-2.php
   trunk/src/fusionforge-install-3-db.php
Log:
Remove code related to removed local.inc file


Modified: trunk/src/fusionforge-install-2.php
===================================================================
--- trunk/src/fusionforge-install-2.php	2011-02-22 19:43:54 UTC (rev 12349)
+++ trunk/src/fusionforge-install-2.php	2011-02-22 19:44:15 UTC (rev 12350)
@@ -161,9 +161,9 @@
 
 	// Create default location for gforge config files
 	system("mkdir -p /etc/gforge");
-	if (!is_file("/etc/gforge/local.inc")) {
-		system("cp etc/local.inc.example /etc/gforge/local.inc");
-	}
+	#if (!is_file("/etc/gforge/local.inc")) {
+	#	system("cp etc/local.inc.example /etc/gforge/local.inc");
+	#}
 	if (!is_file("/etc/gforge/httpd.conf")) {
 		system("cp etc/httpd.conf-opt /etc/gforge/httpd.conf");
 	}
@@ -276,12 +276,12 @@
 
 	# Generate a random hash for the session_key
 	$hash = md5(microtime());
-	system("perl -spi -e \"s/sys_session_key = 'foobar'/sys_session_key = '$hash'/\" /etc/gforge/local.inc");
+	#system("perl -spi -e \"s/sys_session_key = 'foobar'/sys_session_key = '$hash'/\" /etc/gforge/local.inc");
 
 	# Replace /path/to/gforge to /opt/gforge
-	$config = file_get_contents('/etc/gforge/local.inc');
-	$content = str_replace('/path/to/gforge', '/opt/gforge', $config);
-	file_put_contents('/etc/gforge/local.inc', $content);
+	#$config = file_get_contents('/etc/gforge/local.inc');
+	#$content = str_replace('/path/to/gforge', '/opt/gforge', $config);
+	#file_put_contents('/etc/gforge/local.inc', $content);
 
 	# Set jpgraph path.
 	if (is_dir("/usr/share/jpgraph")) {
@@ -290,7 +290,7 @@
 		system("perl -spi -e \"s!//(.gantt_title_font_style=.*)!\\$1!\" /etc/gforge/local.inc");
 		system("perl -spi -e \"s!//(.gantt_title_font_size=.*)!\\$1!\" /etc/gforge/local.inc");
 		system("perl -spi -e \"s!//(.gantt_task_font_family)='FF_ARIAL';!\\$1='FF_LIBERATION_SANS';!\" /etc/gforge/local.inc");
-		system("perl -spi -e \"s!//(.gantt_task_font_style=.*)!\\$1!\" /etc/gforge/local.inc");
-		system("perl -spi -e \"s!//(.gantt_task_font_size=.*)!\\$1!\" /etc/gforge/local.inc");
+		#system("perl -spi -e \"s!//(.gantt_task_font_style=.*)!\\$1!\" /etc/gforge/local.inc");
+		#system("perl -spi -e \"s!//(.gantt_task_font_size=.*)!\\$1!\" /etc/gforge/local.inc");
 	}
 	print "\n";

Modified: trunk/src/fusionforge-install-3-db.php
===================================================================
--- trunk/src/fusionforge-install-3-db.php	2011-02-22 19:43:54 UTC (rev 12349)
+++ trunk/src/fusionforge-install-3-db.php	2011-02-22 19:44:15 UTC (rev 12350)
@@ -318,19 +318,19 @@
 
 
 	show(' * Saving database configuration in FForge config file');
-	$data = file_get_contents("$fusionforge_etc_dir/local.inc");
-	$lines = explode("\n",$data);
-	$config = '';
-	foreach ($lines as $l) {
-		$l = preg_replace("/^.sys_dbname\s*=\s*'(.*)'/", "\$sys_dbname='$gforge_db'", $l);
-		$l = preg_replace("/^.sys_dbuser\s*=\s*'(.*)'/", "\$sys_dbuser='$gforge_user'", $l);
-		$config .= $l."\n";
-	}
+	#$data = file_get_contents("$fusionforge_etc_dir/local.inc");
+	#$lines = explode("\n",$data);
+	#$config = '';
+	#foreach ($lines as $l) {
+	#	$l = preg_replace("/^.sys_dbname\s*=\s*'(.*)'/", "\$sys_dbname='$gforge_db'", $l);
+	#	$l = preg_replace("/^.sys_dbuser\s*=\s*'(.*)'/", "\$sys_dbuser='$gforge_user'", $l);
+	#	$config .= $l."\n";
+	#}
 
-	if ($fp = fopen("$fusionforge_etc_dir/local.inc", "w")) {
-		fwrite ($fp, $config);
-		fclose($fp);	
-	}
+	#if ($fp = fopen("$fusionforge_etc_dir/local.inc", "w")) {
+	#	fwrite ($fp, $config);
+	#	fclose($fp);	
+	#}
 
 	show(' * Saving installation log in /tmp/gforge-import.log');
 }




More information about the Fusionforge-commits mailing list