| | |
| | | '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', |
| | |
| | | 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; |
| | | } |
| | |
| | | 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 |
| | |
| | | * |
| | | * @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) |
| | | { |
| | |
| | | $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(); |
| | |
| | | 'application/zip' => 'zip', |
| | | 'application/x-tar' => 'tar', |
| | | 'application/java-archive' => 'jar', |
| | | 'image/bmp' => 'bmp', |
| | | 'image/gif' => 'gif', |
| | | 'image/svg+xml' => 'svg', |
| | | ); |
| | | |