| | |
| | | require_once INSTALL_PATH . 'installer/rcube_install.php'; |
| | | |
| | | // get arguments |
| | | $opts = get_opt(array('v' => 'version')); |
| | | $opts = rcube_utils::get_opt(array('v' => 'version')); |
| | | |
| | | // ask user if no version is specified |
| | | if (!$opts['version']) { |
| | |
| | | $opts['version'] = $input; |
| | | } |
| | | |
| | | if ($opts['version'] && version_compare($opts['version'], RCMAIL_VERSION, '>')) |
| | | if ($opts['version'] && version_compare(version_parse($opts['version']), version_parse(RCMAIL_VERSION), '>')) |
| | | die("Nothing to be done here. Bye!\n"); |
| | | |
| | | |
| | |
| | | if ($write1 && $write2) { |
| | | echo "Done.\n"; |
| | | echo "Your configuration files are now up-to-date!\n"; |
| | | |
| | | if ($messages['missing']) { |
| | | echo "But you still need to add the following missing options:\n"; |
| | | foreach ($messages['missing'] as $msg) |
| | | echo "- '" . $msg['prop'] . ($msg['name'] ? "': " . $msg['name'] : "'") . "\n"; |
| | | } |
| | | } |
| | | else { |
| | | echo "Failed to write config files!\n"; |
| | |
| | | } |
| | | |
| | | // index contacts for fulltext searching |
| | | if (version_compare($opts['version'], '0.6', '<')) { |
| | | if (version_compare(version_parse($opts['version']), '0.6.0', '<')) { |
| | | system(INSTALL_PATH . 'bin/indexcontacts.sh'); |
| | | } |
| | | |