comparison installer/index.php @ 8:bf99236cc5cd

try to recover from upgrade fail
author Charlie Root
date Sat, 29 Dec 2018 07:07:34 -0500
parents 4681f974d28b
children
comparison
equal deleted inserted replaced
7:65fd7d441cf1 8:bf99236cc5cd
1 <?php 1 <?php
2 2
3 /* 3 /**
4 +-------------------------------------------------------------------------+ 4 +-------------------------------------------------------------------------+
5 | Roundcube Webmail setup tool | 5 | Roundcube Webmail setup tool |
6 | Version 1.1.5 | 6 | Version 1.3.3 |
7 | | 7 | |
8 | Copyright (C) 2009-2015, The Roundcube Dev Team | 8 | Copyright (C) 2009-2015, The Roundcube Dev Team |
9 | | 9 | |
10 | This program is free software: you can redistribute it and/or modify | 10 | This program is free software: you can redistribute it and/or modify |
11 | it under the terms of the GNU General Public License (with exceptions | 11 | it under the terms of the GNU General Public License (with exceptions |
53 if (@file_exists(INSTALL_PATH . 'vendor/autoload.php')) { 53 if (@file_exists(INSTALL_PATH . 'vendor/autoload.php')) {
54 require INSTALL_PATH . 'vendor/autoload.php'; 54 require INSTALL_PATH . 'vendor/autoload.php';
55 } 55 }
56 56
57 require_once 'Roundcube/bootstrap.php'; 57 require_once 'Roundcube/bootstrap.php';
58 // deprecated aliases (to be removed)
59 require_once 'bc.php';
60 58
61 if (function_exists('session_start')) 59 if (function_exists('session_start'))
62 session_start(); 60 session_start();
63 61
64 $RCI = rcmail_install::get_instance(); 62 $RCI = rcmail_install::get_instance();
65 $RCI->load_config(); 63 $RCI->load_config();
66 64
67 if (isset($_GET['_getconfig'])) { 65 if (isset($_GET['_getconfig'])) {
68 $filename = 'config.inc.php'; 66 $filename = 'config.inc.php';
69 if (!empty($_SESSION['config'])) { 67 if (!empty($_SESSION['config']) && $_GET['_getconfig'] == 2) {
68 $path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $filename;
69 @unlink($path);
70 file_put_contents($path, $_SESSION['config']);
71 exit;
72 }
73 else if (!empty($_SESSION['config'])) {
70 header('Content-type: text/plain'); 74 header('Content-type: text/plain');
71 header('Content-Disposition: attachment; filename="'.$filename.'"'); 75 header('Content-Disposition: attachment; filename="'.$filename.'"');
72 echo $_SESSION['config']; 76 echo $_SESSION['config'];
73 exit; 77 exit;
74 } 78 }
114 <div class="banner-bg"></div> 118 <div class="banner-bg"></div>
115 <div class="banner-logo"><a href="http://roundcube.net"><img src="images/roundcube_logo.png" width="210" height="55" border="0" alt="Roundcube - open source webmail software" /></a></div> 119 <div class="banner-logo"><a href="http://roundcube.net"><img src="images/roundcube_logo.png" width="210" height="55" border="0" alt="Roundcube - open source webmail software" /></a></div>
116 </div> 120 </div>
117 121
118 <div id="topnav"> 122 <div id="topnav">
119 <a href="http://trac.roundcube.net/wiki/Howto_Install">How-to Wiki</a> 123 <a href="https://github.com/roundcube/roundcubemail/wiki/Installation">How-to Wiki</a>
120 </div> 124 </div>
121 125
122 <div id="content"> 126 <div id="content">
123 127
124 <?php 128 <?php
156 $RCI->step = 1; 160 $RCI->step = 1;
157 } 161 }
158 162
159 foreach (array('Check environment', 'Create config', 'Test config') as $i => $item) { 163 foreach (array('Check environment', 'Create config', 'Test config') as $i => $item) {
160 $j = $i + 1; 164 $j = $i + 1;
161 $link = ($RCI->step >= $j || $RCI->configured) ? '<a href="./index.php?_step='.$j.'">' . Q($item) . '</a>' : Q($item); 165 $link = ($RCI->step >= $j || $RCI->configured) ? '<a href="./index.php?_step='.$j.'">' . rcube::Q($item) . '</a>' : rcube::Q($item);
162 printf('<li class="step%d%s">%s</li>', $j+1, $RCI->step > $j ? ' passed' : ($RCI->step == $j ? ' current' : ''), $link); 166 printf('<li class="step%d%s">%s</li>', $j+1, $RCI->step > $j ? ' passed' : ($RCI->step == $j ? ' current' : ''), $link);
163 } 167 }
164 ?> 168 ?>
165 </ol> 169 </ol>
166 170