diff options
| author | Aleksander Machniak <alec@alec.pl> | 2013-06-18 13:54:26 +0200 | 
|---|---|---|
| committer | Aleksander Machniak <alec@alec.pl> | 2013-06-18 13:54:26 +0200 | 
| commit | e7fa2ce56d0c9e3d791f3c145febbb9ab16be838 (patch) | |
| tree | c48bb3555936631ca9801fc0a138edae92c958a2 | |
| parent | b531277d039c0649736310c9b84efe4758b39537 (diff) | |
Fix so install do not fail when one of DB driver checks fails but other drivers exist (#1489178)
| -rw-r--r-- | CHANGELOG | 1 | ||||
| -rw-r--r-- | installer/check.php | 6 | ||||
| -rw-r--r-- | installer/rcube_install.php | 7 | 
3 files changed, 11 insertions, 3 deletions
| @@ -1,6 +1,7 @@  CHANGELOG Roundcube Webmail  =========================== +- Fix so install do not fail when one of DB driver checks fails but other drivers exist (#1489178)  - Fix so exported vCard specifies encoding in v3-compatible format (#1489183)  - Fix session issues when local and database time differs (#1486132)  - Fix thread cache syncronization/validation (#1489028) diff --git a/installer/check.php b/installer/check.php index fcf35025e..bea8c42e0 100644 --- a/installer/check.php +++ b/installer/check.php @@ -139,10 +139,11 @@ 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'); +            $RCI->fail($database, 'PHP >= 5.3 required', null, true);          }          else {              $RCI->pass($database); +            $found_db_driver = true;          }      }      else { @@ -152,6 +153,9 @@ foreach ($RCI->supported_dbs as $database => $ext) {      }      echo '<br />';  } +if (empty($found_db_driver)) { +  $RCI->failures++; +}  ?> diff --git a/installer/rcube_install.php b/installer/rcube_install.php index c95d936d2..473fd2612 100644 --- a/installer/rcube_install.php +++ b/installer/rcube_install.php @@ -496,10 +496,13 @@ class rcube_install     * @param string Test name     * @param string Error message     * @param string URL for details +   * @param bool   Do not count this failure     */ -  function fail($name, $message = '', $url = '') +  function fail($name, $message = '', $url = '', $optional=false)    { -    $this->failures++; +    if (!$optional) { +      $this->failures++; +    }      echo Q($name) . ':  <span class="fail">NOT OK</span>';      $this->_showhint($message, $url); | 
