From f798aa098a52e1fb7d9c8d0e91b072f74e677d6b Mon Sep 17 00:00:00 2001
From: Falko Timme <ft@falkotimme.com>
Date: Wed, 12 Feb 2014 10:10:10 -0500
Subject: [PATCH] - Implemented FS#3310 - add support for multiple email addresses in send copy to field (patch).

---
 install/lib/install.lib.php |   54 +++++++++++++++++-------------------------------------
 1 files changed, 17 insertions(+), 37 deletions(-)

diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index eac79e9..4d5fe87 100644
--- a/install/lib/install.lib.php
+++ b/install/lib/install.lib.php
@@ -666,6 +666,23 @@
 	}
 }
 
+function hasLine($filename, $search_pattern, $strict = 0) {
+	if($lines = @file($filename)) {
+		foreach($lines as $line) {
+			if($strict == 0) {
+				if(stristr($line, $search_pattern)) {
+					return true;
+				}
+			} else {
+				if(trim($line) == $search_pattern) {
+					return true;
+				}
+			}
+		}
+	}
+	return false;
+}
+
 function is_installed($appname) {
 	exec('which '.escapeshellcmd($appname).' 2> /dev/null', $out, $returncode);
 	if(isset($out[0]) && stristr($out[0], $appname) && $returncode == 0) {
@@ -673,43 +690,6 @@
 	} else {
 		return false;
 	}
-}
-
-/*
- * Compare ISPConfig version number.
- * return values:
- * -1 $current version is newer then $new version (downgrade)
- * 0 $current version = $new version
- * 1 $current version is older then new version (update)
-
-*/
-function compare_ispconfig_version($current, $new) {
-	if( $current == $new) {
-		return 0;
-	}
-
-	$p = explode('.', $current);
-	$tmp = '';
-	$tmp .= str_pad(intval($p[0]), 3, '0', STR_PAD_LEFT);
-	$tmp .= (isset($p[1]))?str_pad(intval($p[1]), 3, '0', STR_PAD_LEFT):'000';
-	$tmp .= (isset($p[2]))?str_pad(intval($p[2]), 3, '0', STR_PAD_LEFT):'000';
-	$tmp .= (isset($p[3]))?str_pad(intval($p[3]), 3, '0', STR_PAD_LEFT):'000';
-	$current = $tmp;
-
-	$p = explode('.', $new);
-	$tmp = '';
-	$tmp .= str_pad(intval($p[0]), 3, '0', STR_PAD_LEFT);
-	$tmp .= (isset($p[1]))?str_pad(intval($p[1]), 3, '0', STR_PAD_LEFT):'000';
-	$tmp .= (isset($p[2]))?str_pad(intval($p[2]), 3, '0', STR_PAD_LEFT):'000';
-	$tmp .= (isset($p[3]))?str_pad(intval($p[3]), 3, '0', STR_PAD_LEFT):'000';
-	$new = $tmp;
-
-	if($new > $current) {
-		return 1;
-	} else {
-		return -1;
-	}
-
 }
 
 /*

--
Gitblit v1.9.1