From 4a4d48104ba8fe3483aa3ac45d6fe35a7c00ece1 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sat, 13 Sep 2008 07:26:01 -0400
Subject: [PATCH] Removed some fields of the advanced options tab of the website.

---
 install/lib/install.lib.php |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index ff47eee..c78c0f0 100644
--- a/install/lib/install.lib.php
+++ b/install/lib/install.lib.php
@@ -105,6 +105,14 @@
 			swriteln("Operating System: Fedora 9 or compatible\n");
 		}
 		
+		if(stristr($content,'CentOS release 5.2 (Final)')) {
+			$distname = 'CentOS';
+			$distver = '5.2';
+			$distid = 'centos52';
+			$distbaseid = 'fedora';
+			swriteln("Operating System: CentOS 5.2 or compatible\n");
+		}
+		
 		
 	} else {
 		die('unrecognized linux distribution');
@@ -502,7 +510,7 @@
 }
 
 function replaceLine($filename,$search_pattern,$new_line,$strict = 0) {
-		$lines = file($filename);
+	if($lines = @file($filename)) {
 		$out = '';
 		$found = 0;
 		foreach($lines as $line) {
@@ -526,10 +534,11 @@
 			$out .= $new_line."\n";
 		}
 		file_put_contents($filename,$out);
+	}
 }
 	
 function removeLine($filename,$search_pattern,$strict = 0) {
-		$lines = file($filename);
+	if($lines = @file($filename)) {
 		$out = '';
 		foreach($lines as $line) {
 			if($strict == 0) {
@@ -543,6 +552,7 @@
 			}
 		}
 		file_put_contents($filename,$out);
+	}
 }
 
 

--
Gitblit v1.9.1