From a079269166d120bcbcb33d34f4b1c8f60d102e32 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 20 Dec 2012 02:53:48 -0500
Subject: [PATCH] Fix version comparisons with -stable suffix (#1488876)
---
installer/rcube_install.php | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/installer/rcube_install.php b/installer/rcube_install.php
index dfd6356..530be3e 100644
--- a/installer/rcube_install.php
+++ b/installer/rcube_install.php
@@ -633,8 +633,8 @@
*/
function update_db($DB, $version)
{
- $version = strtolower($version);
- $engine = isset($this->db_map[$DB->db_provider]) ? $this->db_map[$DB->db_provider] : $DB->db_provider;
+ $version = version_parse(strtolower($version));
+ $engine = isset($this->db_map[$DB->db_provider]) ? $this->db_map[$DB->db_provider] : $DB->db_provider;
// read schema file from /SQL/*
$fname = INSTALL_PATH . "SQL/$engine.update.sql";
@@ -643,7 +643,7 @@
foreach ($lines as $line) {
$is_comment = preg_match('/^--/', $line);
if (!$from && $is_comment && preg_match('/from version\s([0-9.]+[a-z-]*)/', $line, $m)) {
- $v = strtolower($m[1]);
+ $v = version_parse(strtolower($m[1]));
if ($v == $version || version_compare($version, $v, '<='))
$from = true;
}
--
Gitblit v1.9.1