From aa248fb5900797231e058b84f8c169b16a677e36 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Mon, 23 Oct 2006 21:20:08 +0200
Subject: [PATCH] ignore line endings when checking the config file hash for
 the installer

darcs-hash:20061023192008-7ad00-c9772b42081c9c7fcc64e37eb90a2ea200b21850.gz
---
 install.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/install.php b/install.php
index 224388d44..33594e491 100644
--- a/install.php
+++ b/install.php
@@ -358,7 +358,8 @@ function check_configs(){
 
 
     // main dokuwiki config file (conf/dokuwiki.php) must not have been modified
-    $installation_hash = md5(@file_get_contents(DOKU_CONF.'dokuwiki.php'));
+    $installation_hash = md5(preg_replace("/(\015\012)|(\015)/","\012",
+                             @file_get_contents(DOKU_CONF.'dokuwiki.php')));
     if (!in_array($installation_hash, $dokuwiki_hash)) {
         $error[] = sprintf($lang['i_badhash'],$installation_hash);
         $ok = false;
-- 
GitLab