From d78ed105069455bdf43a8d6f4f4ecc99152c55ec Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Sun, 16 Feb 2014 10:01:29 +0100
Subject: [PATCH] Fixed: FS#2912 - /etc/suphp/suphp.conf fills with double
 lines on each update

---
 install/lib/install.lib.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index e8ff31f85a..5686ac18a5 100644
--- a/install/lib/install.lib.php
+++ b/install/lib/install.lib.php
@@ -637,6 +637,11 @@ function replaceLine($filename, $search_pattern, $new_line, $strict = 0, $append
 					$out .= $line;
 				}
 			}
+			if (!$found) {
+				if (trim($line) == $new_line) {
+					$found = 1;
+				}
+			}
 		}
 		if($found == 0) {
 			//* add \n if the last line does not end with \n or \r
-- 
GitLab