Aleksander Machniak
2012-12-20 a079269166d120bcbcb33d34f4b1c8f60d102e32
installer/rcube_install.php
@@ -109,12 +109,12 @@
   */
  function _load_config($suffix)
  {
    if (is_readable($main_inc = RCUBE_CONFIG_DIR . '/main.inc' . $suffix)) {
    if (is_readable($main_inc = RCUBE_CONFIG_DIR . 'main.inc' . $suffix)) {
      include($main_inc);
      if (is_array($rcmail_config))
        $this->config += $rcmail_config;
    }
    if (is_readable($db_inc = RCUBE_CONFIG_DIR . '/db.inc'. $suffix)) {
    if (is_readable($db_inc = RCUBE_CONFIG_DIR . 'db.inc'. $suffix)) {
      include($db_inc);
      if (is_array($rcmail_config))
        $this->config += $rcmail_config;
@@ -149,7 +149,7 @@
   */
  function create_config($which, $force = false)
  {
    $out = @file_get_contents(RCUBE_CONFIG_DIR . "/{$which}.inc.php.dist");
    $out = @file_get_contents(RCUBE_CONFIG_DIR . $which . '.inc.php.dist');
    if (!$out)
      return '[Warning: could not read the config template file]';
@@ -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;
        }