From e38d145b1b5392e9a88101f7dd5a31173e4cfa90 Mon Sep 17 00:00:00 2001
From: jwarnier <jwarnier@ispconfig3>
Date: Fri, 24 Sep 2010 21:26:50 -0400
Subject: [PATCH] - setup and use $conf['ispconfig_log_dir'], somehow replacing ISPC_LOG_PATH/$conf['logpath'] - replace double-quotes with single-quotes whenever appropriate - fix indentation

---
 install/lib/install.lib.php |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index 7ea2d90..997f9a1 100644
--- a/install/lib/install.lib.php
+++ b/install/lib/install.lib.php
@@ -97,7 +97,7 @@
 	}
 	
 	//** OpenSuSE
-	elseif(file_exists("/etc/SuSE-release")) {
+	elseif(file_exists('/etc/SuSE-release')) {
 		if(stristr(file_get_contents('/etc/SuSE-release'),'11.0')) {
 			$distname = 'openSUSE';
 			$distver = '11.0';
@@ -127,7 +127,7 @@
 	
 	
 	//** Redhat
-	elseif(file_exists("/etc/redhat-release")) {
+	elseif(file_exists('/etc/redhat-release')) {
 		
 		$content = file_get_contents('/etc/redhat-release');
 		
@@ -171,7 +171,7 @@
 	}
 	
 	//** Gentoo
- 	elseif(file_exists("/etc/gentoo-release")) {
+ 	elseif(file_exists('/etc/gentoo-release')) {
  		
  		$content = file_get_contents('/etc/gentoo-release');
  
@@ -183,7 +183,7 @@
  		swriteln("Operating System: Gentoo $distver or compatible\n");
 		
 	} else {
-		die('unrecognized Linux distribution');
+		die('Unrecognized GNU/Linux distribution');
 	}
 	
 	return array('name' => $distname, 'version' => $distver, 'id' => $distid, 'baseid' => $distbaseid);
@@ -203,7 +203,7 @@
 }
 
 function ilog($msg){
-  	exec("echo `date` \"- [ISPConfig] - \"".$msg." >> ".ISPC_LOG_FILE);
+  	exec("echo `date` \"- [ISPConfig] - \"".$msg.' >> '.ISPC_LOG_FILE);
 }
 
 function error($msg){
@@ -501,8 +501,8 @@
   $lines = explode("\n", $users);
   if(is_array($lines)){
     foreach($lines as $line){
-      if(trim($line) != ""){
-        list($f1, $f2, $f3, $f4, $f5, $f6, $f7) = explode(":", $line);
+      if(trim($line) != ''){
+        list($f1, $f2, $f3, $f4, $f5, $f6, $f7) = explode(':', $line);
         if($f1 == $user) return true;
       }
     }
@@ -517,8 +517,8 @@
   $lines = explode("\n", $groups);
   if(is_array($lines)){
     foreach($lines as $line){
-      if(trim($line) != ""){
-        list($f1, $f2, $f3, $f4) = explode(":", $line);
+      if(trim($line) != ''){
+        list($f1, $f2, $f3, $f4) = explode(':', $line);
         if($f1 == $group) return true;
       }
     }

--
Gitblit v1.9.1