File was renamed from installer/rcube_install.php |
| | |
| | | |
| | | /* |
| | | +-----------------------------------------------------------------------+ |
| | | | rcube_install.php | |
| | | | rcmail_install.php | |
| | | | | |
| | | | This file is part of the Roundcube Webmail package | |
| | | | Copyright (C) 2008-2012, The Roundcube Dev Team | |
| | | | Copyright (C) 2008-2014, The Roundcube Dev Team | |
| | | | | |
| | | | Licensed under the GNU General Public License version 3 or | |
| | | | any later version with exceptions for skins & plugins. | |
| | |
| | | * @package Roundcube |
| | | * @author Thomas Bruederli |
| | | */ |
| | | class rcube_install |
| | | class rcmail_install |
| | | { |
| | | var $step; |
| | | var $is_post = false; |
| | |
| | | static $inst; |
| | | |
| | | if (!$inst) |
| | | $inst = new rcube_install(); |
| | | $inst = new rcmail_install(); |
| | | |
| | | return $inst; |
| | | } |
| | |
| | | $value = $this->config[$name]; |
| | | |
| | | if ($name == 'des_key' && !$this->configured && !isset($_REQUEST["_$name"])) |
| | | $value = rcube_install::random_key(24); |
| | | $value = self::random_key(24); |
| | | |
| | | return $value !== null && $value !== '' ? $value : $default; |
| | | } |
| | |
| | | $value = ''; |
| | | } |
| | | else if ($prop == 'default_host' && is_array($value)) { |
| | | $value = rcube_install::_clean_array($value); |
| | | $value = self::_clean_array($value); |
| | | if (count($value) <= 1) |
| | | $value = $value[0]; |
| | | } |
| | |
| | | foreach ($config as $prop => $value) { |
| | | // copy option descriptions from existing config or defaults.inc.php |
| | | $out .= $this->comments[$prop]; |
| | | $out .= "\$config['$prop'] = " . rcube_install::_dump_var($value, $prop) . ";\n\n"; |
| | | $out .= "\$config['$prop'] = " . self::_dump_var($value, $prop) . ";\n\n"; |
| | | } |
| | | |
| | | return $out; |
| | |
| | | function check_mime_detection() |
| | | { |
| | | $files = array( |
| | | 'installer/images/roundcube_logo.png' => 'image/png', |
| | | 'skins/larry/images/roundcube_logo.png' => 'image/png', |
| | | 'program/resources/blank.tif' => 'image/tiff', |
| | | 'skins/larry/images/buttons.gif' => 'image/gif', |
| | | 'program/resources/blocked.gif' => 'image/gif', |
| | | 'skins/larry/README' => 'text/plain', |
| | | ); |
| | | |
| | |
| | | } |
| | | |
| | | if ($isnum) |
| | | return 'array(' . join(', ', array_map(array('rcube_install', '_dump_var'), $var)) . ')'; |
| | | return 'array(' . join(', ', array_map(array('rcmail_install', '_dump_var'), $var)) . ')'; |
| | | } |
| | | } |
| | | |