summaryrefslogtreecommitdiff
path: root/installer/rcube_install.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-12-20 08:53:48 +0100
committerAleksander Machniak <alec@alec.pl>2012-12-20 08:53:48 +0100
commita079269166d120bcbcb33d34f4b1c8f60d102e32 (patch)
treec3ae8596608e94e58ab1624ef78b8ef33c5323a0 /installer/rcube_install.php
parenta8ffab3f4ff54af41c9041a30eb989954d6ffc17 (diff)
Fix version comparisons with -stable suffix (#1488876)
Diffstat (limited to 'installer/rcube_install.php')
-rw-r--r--installer/rcube_install.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/installer/rcube_install.php b/installer/rcube_install.php
index dfd63562d..530be3ebe 100644
--- a/installer/rcube_install.php
+++ b/installer/rcube_install.php
@@ -633,8 +633,8 @@ class rcube_install
*/
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 @@ class rcube_install
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;
}