From 8cc567c00423a343f3b785ee4dd856111b985fe7 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 22 Mar 2014 07:56:49 -0400
Subject: [PATCH] Drop support for PHP < 5.3.7

---
 CHANGELOG                                |    5 +++--
 INSTALL                                  |    3 +--
 program/lib/Roundcube/rcube_db_mysql.php |    7 -------
 installer/check.php                      |   12 +++---------
 4 files changed, 7 insertions(+), 20 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 240e046..503acd9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,10 +1,9 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
-- Fix message import dialog when no file is selected (#1489685)
-- Fix opening compose screen in new window after saving as draft (#1489643)
 - Added toolbar button to move message in message view
 - Improve UI integration of ACL settings
+- Drop support for PHP < 5.3.7
 - Fix directories check in Installer on Windows (#1489576)
 - Fix issue when default_addressbook option is set to integer value (#1489407)
 - Fix Opera > 15 detection (#1489562)
@@ -13,6 +12,8 @@
 - Fix regression in handling of 'attachments' result in message_compose hook (#1489627)
 - Fix issue where msgexport.sh printed the message to STDOUT instead of a file (#1489634)
 - Fix opening compose screen in new window after saving as draft (#1489643)
+- Fix message import dialog when no file is selected (#1489685)
+- Fix opening compose screen in new window after saving as draft (#1489643)
 
 RELEASE 1.0-rc
 --------------
diff --git a/INSTALL b/INSTALL
index 4eb7530..7bc0b88 100644
--- a/INSTALL
+++ b/INSTALL
@@ -11,10 +11,9 @@
 
 * The Apache, Lighttpd, Cherokee or Hiawatha web server
 * .htaccess support allowing overrides for DirectoryIndex
-* PHP Version 5.2.1 or greater including
+* PHP Version 5.3.7 or greater including
    - PCRE, DOM, JSON, XML, Session, Sockets (required)
    - PHP Data Objects (PDO) with driver for either MySQL, PostgreSQL or SQLite (required)
-     Note: MySQL database driver requires PHP 5.3.7 or newer.
    - Libiconv, Zip (recommended)
    - Fileinfo, Mcrypt, mbstring (optional)
 * PEAR packages distributed with Roundcube or external:
diff --git a/installer/check.php b/installer/check.php
index ee0c9f3..d4c3f66 100644
--- a/installer/check.php
+++ b/installer/check.php
@@ -83,7 +83,7 @@
 <h3>Checking PHP version</h3>
 <?php
 
-define('MIN_PHP_VERSION', '5.2.1');
+define('MIN_PHP_VERSION', '5.3.7');
 if (version_compare(PHP_VERSION, MIN_PHP_VERSION, '>=')) {
     $RCI->pass('Version', 'PHP ' . PHP_VERSION . ' detected');
 } else {
@@ -138,14 +138,8 @@
 $prefix = (PHP_SHLIB_SUFFIX === 'dll') ? 'php_' : '';
 foreach ($RCI->supported_dbs as $database => $ext) {
     if (extension_loaded($ext)) {
-        // MySQL driver requires PHP >= 5.3 (#1488875)
-        if ($ext == 'pdo_mysql' && version_compare(PHP_VERSION, '5.3.0', '<')) {
-            $RCI->fail($database, 'PHP >= 5.3 required', null, true);
-        }
-        else {
-            $RCI->pass($database);
-            $found_db_driver = true;
-        }
+        $RCI->pass($database);
+        $found_db_driver = true;
     }
     else {
         $_ext = $ext_dir . '/' . $prefix . $ext . '.' . PHP_SHLIB_SUFFIX;
diff --git a/program/lib/Roundcube/rcube_db_mysql.php b/program/lib/Roundcube/rcube_db_mysql.php
index e6417cc..400813d 100644
--- a/program/lib/Roundcube/rcube_db_mysql.php
+++ b/program/lib/Roundcube/rcube_db_mysql.php
@@ -38,13 +38,6 @@
      */
     public function __construct($db_dsnw, $db_dsnr = '', $pconn = false)
     {
-        if (version_compare(PHP_VERSION, '5.3.0', '<')) {
-            rcube::raise_error(array('code' => 600, 'type' => 'db',
-                'line' => __LINE__, 'file' => __FILE__,
-                'message' => "MySQL driver requires PHP >= 5.3, current version is " . PHP_VERSION),
-                true, true);
-        }
-
         parent::__construct($db_dsnw, $db_dsnr, $pconn);
 
         // SQL identifiers quoting

--
Gitblit v1.9.1