| | |
| | | |
| | | // these config options are required for a working system |
| | | var $required_config = array( |
| | | 'db_dsnw', 'db_table_contactgroups', 'db_table_contactgroupmembers', |
| | | 'des_key', 'session_lifetime', 'support_url', |
| | | 'db_dsnw', 'des_key', 'session_lifetime', |
| | | ); |
| | | |
| | | // list of supported database drivers |
| | |
| | | // save change |
| | | $this->config[$prop] = $value; |
| | | |
| | | $dump = self::_dump_var($value, $prop); |
| | | |
| | | // replace the matching line in config file |
| | | $out = preg_replace( |
| | | '/(\$rcmail_config\[\''.preg_quote($prop).'\'\])\s+=\s+(.+);/Uie', |
| | | "'\\1 = ' . rcube_install::_dump_var(\$value, \$prop) . ';'", |
| | | '/(\$rcmail_config\[\''.preg_quote($prop).'\'\])\s+=\s+(.+);/Ui', |
| | | "\\1 = $dump;", |
| | | $out); |
| | | } |
| | | |
| | |
| | | if ($this->config['log_driver'] == 'syslog') { |
| | | if (!function_exists('openlog')) { |
| | | $out['dependencies'][] = array('prop' => 'log_driver', |
| | | 'explain' => 'This requires the <tt>sylog</tt> extension which could not be loaded.'); |
| | | 'explain' => 'This requires the <tt>syslog</tt> extension which could not be loaded.'); |
| | | } |
| | | if (empty($this->config['syslog_id'])) { |
| | | $out['dependencies'][] = array('prop' => 'syslog_id', |
| | |
| | | * required for this version of Roundcube |
| | | * |
| | | * @param boolean True if the schema schould be updated |
| | | * @return boolean True if the schema is up-to-date, false if not or an error occured |
| | | * @return boolean True if the schema is up-to-date, false if not or an error occurred |
| | | */ |
| | | function db_schema_check($DB, $update = false) |
| | | { |
| | |
| | | '0.7-beta', '0.7', '0.7.1', '0.7.2', '0.7.3', '0.7.4', |
| | | '0.8-beta', '0.8-rc', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', |
| | | '0.9-beta', '0.9-rc', '0.9-rc2', |
| | | // Note: Do not add newer versions here |
| | | )); |
| | | return $select; |
| | | } |
| | |
| | | * @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); |
| | |
| | | */ |
| | | function update_db($version) |
| | | { |
| | | system(INSTALL_PATH . "bin/updatedb.sh --package=roundcube --version=" . $version |
| | | . " --dir=" . INSTALL_PATH . "SQL", $result); |
| | | system(INSTALL_PATH . "bin/updatedb.sh --package=roundcube" |
| | | . " --version=" . escapeshellarg($version) |
| | | . " --dir=" . INSTALL_PATH . "SQL" |
| | | . " 2>&1", $result); |
| | | |
| | | return !$result; |
| | | } |