From 8f49e4a99c2a35f71b763177b32c2cf1fef9a8c6 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Thu, 04 Jul 2013 17:56:26 -0400
Subject: [PATCH] Check filetype detection in installer and update script (#1489193)

---
 bin/update.sh |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/bin/update.sh b/bin/update.sh
index 05956b9..15edc28 100755
--- a/bin/update.sh
+++ b/bin/update.sh
@@ -143,6 +143,16 @@
     }
   }
 
+  // check file type detection
+  if ($RCI->check_mime_detection()) {
+    echo "WARNING: File type detection doesn't work properly!\n";
+    echo "Please check the 'mime_magic' config option or the finfo functions of PHP andrun this script again.\n";
+  }
+  if ($RCI->check_mime_extensions()) {
+    echo "WARNING: Mimetype to file extension mapping doesn't work properly!\n";
+    echo "Please check the 'mime_types' config option and run this script again.\n";
+  }
+
   // check database schema
   if ($RCI->config['db_dsnw']) {
     echo "Executing database schema update.\n";

--
Gitblit v1.9.1