From 73daa945892cdcb7878c9c80a5040b2c77beb422 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Wed, 22 Jan 2014 15:11:44 -0500
Subject: [PATCH] Merge branch 'stable-3.0.5' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.0.5

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

diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index eac79e9..501cf3b 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) {

--
Gitblit v1.9.1