Aleksander Machniak
2014-04-01 dc0b500e78aae13349b848303302a213ed3a1e65
installer/rcube_install.php
@@ -42,7 +42,6 @@
    'addrbook_show_images' => 'show_images',
    'imap_root'            => 'imap_ns_personal',
    'pagesize'             => 'mail_pagesize',
    'default_imap_folders' => 'default_folders',
    'top_posting'          => 'reply_mode',
    'keep_alive'           => 'refresh_interval',
    'min_keep_alive'       => 'min_refresh_interval',
@@ -228,19 +227,6 @@
      else if ($prop == 'smtp_pass' && !empty($_POST['_smtp_user_u'])) {
        $value = '%p';
      }
      else if ($prop == 'default_folders') {
        $value = array();
        foreach ($this->config['default_folders'] as $_folder) {
          switch ($_folder) {
          case 'Drafts': $_folder = $this->config['drafts_mbox']; break;
          case 'Sent':   $_folder = $this->config['sent_mbox']; break;
          case 'Junk':   $_folder = $this->config['junk_mbox']; break;
          case 'Trash':  $_folder = $this->config['trash_mbox']; break;
          }
        if (!in_array($_folder, $value))
          $value[] = $_folder;
        }
      }
      else if (is_bool($default)) {
        $value = (bool)$value;
      }
@@ -271,6 +257,20 @@
    return $out;
  }
  /**
   * save generated config file in RCUBE_CONFIG_DIR
   *
   * @return boolean True if the file was saved successfully, false if not
   */
  function save_configfile($config)
  {
    if (is_writable(RCUBE_CONFIG_DIR)) {
      return file_put_contents(RCUBE_CONFIG_DIR . 'config.inc.php', $config);
    }
    return false;
  }
  /**
   * Check the current configuration for missing properties
@@ -392,7 +392,7 @@
   *
   * @param rcube_db Database object
   *
   * @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)
  {
@@ -453,7 +453,8 @@
    $files = array(
      'installer/images/roundcube_logo.png' => 'image/png',
      'program/resources/blank.tif' => 'image/tiff',
      'skins/larry/templates/login.html' => 'text/html',
      'skins/larry/images/buttons.gif' => 'image/gif',
      'skins/larry/README' => 'text/plain',
    );
    $errors = array();
@@ -476,7 +477,7 @@
      'application/zip'   => 'zip',
      'application/x-tar' => 'tar',
      'application/java-archive' => 'jar',
      'image/bmp'     => 'bmp',
      'image/gif'     => 'gif',
      'image/svg+xml' => 'svg',
    );