| | |
| | | <?php |
| | | |
| | | if (!class_exists('rcube_install') || !is_object($RCI)) { |
| | | if (!class_exists('rcmail_install', false) || !is_object($RCI)) { |
| | | die("Not allowed! Please open installer/index.php instead."); |
| | | } |
| | | |
| | |
| | | $dirs[] = $RCI->config['log_dir'] ? $RCI->config['log_dir'] : 'logs'; |
| | | |
| | | foreach ($dirs as $dir) { |
| | | $dirpath = $dir[0] == '/' ? $dir : INSTALL_PATH . $dir; |
| | | $dirpath = rcube_utils::is_absolute_path($dir) ? $dir : INSTALL_PATH . $dir; |
| | | if (is_writable(realpath($dirpath))) { |
| | | $RCI->pass($dir); |
| | | $pass = true; |
| | |
| | | if ($RCI->configured) { |
| | | if (!empty($RCI->config['db_dsnw'])) { |
| | | $DB = rcube_db::factory($RCI->config['db_dsnw'], '', false); |
| | | $DB->set_debug((bool)$RCI->config['sql_debug']); |
| | | $DB->db_connect('w'); |
| | | |
| | | if (!($db_error_msg = $DB->is_error())) { |