aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xinstall/index.php32
1 files changed, 28 insertions, 4 deletions
diff --git a/install/index.php b/install/index.php
index 1f11413a..bd9e502d 100755
--- a/install/index.php
+++ b/install/index.php
@@ -49,6 +49,7 @@ else if (isset($_POST['install'])) {
49 $errors[] = 'You must install twig before.'; 49 $errors[] = 'You must install twig before.';
50 } else { 50 } else {
51 $continue = true; 51 $continue = true;
52 $final = false;
52 $salt = generate_salt(); 53 $salt = generate_salt();
53 $content = file_get_contents('inc/poche/config.inc.default.php'); 54 $content = file_get_contents('inc/poche/config.inc.default.php');
54 55
@@ -142,7 +143,7 @@ else if (isset($_POST['install'])) {
142 foreach ($moreQueries as $query) { 143 foreach ($moreQueries as $query) {
143 executeQuery($handle, $query, array()); 144 executeQuery($handle, $query, array());
144 } 145 }
145 $successes[] = 'wallabag is now installed. You can now <a href="index.php?clean=0">access it !</a>'; 146
146 147
147 if (!copy('inc/poche/config.inc.default.php', 'inc/poche/config.inc.php')) { 148 if (!copy('inc/poche/config.inc.default.php', 'inc/poche/config.inc.php')) {
148 $errors[] = 'Installation aborted, impossible to create inc/poche/config.inc.php file. Maybe you don\'t have write access to create it.'; 149 $errors[] = 'Installation aborted, impossible to create inc/poche/config.inc.php file. Maybe you don\'t have write access to create it.';
@@ -153,6 +154,7 @@ else if (isset($_POST['install'])) {
153 } 154 }
154 $content = str_replace("define ('SALT', '');", "define ('SALT', '".$salt."');", $content); 155 $content = str_replace("define ('SALT', '');", "define ('SALT', '".$salt."');", $content);
155 file_put_contents('inc/poche/config.inc.php', $content); 156 file_put_contents('inc/poche/config.inc.php', $content);
157 $final = true;
156 } 158 }
157} 159}
158} 160}
@@ -300,8 +302,8 @@ cursor: pointer;
300 min-height: 50px; 302 min-height: 50px;
301 line-height: 50px; 303 line-height: 50px;
302 text-align: center; 304 text-align: center;
303 margin-bottom: 30px; 305 margin-bottom: 30px;
304 border-radius: 3px; 306 border-radius: 3px;
305} 307}
306 308
307h2, legend { 309h2, legend {
@@ -329,6 +331,21 @@ border: 1px solid #000;
329 background-color: #FFF; 331 background-color: #FFF;
330 color: #000; 332 color: #000;
331} 333}
334.final {
335 margin-top: 10%;
336 margin-left: 30%;
337 max-width: 400px;
338 text-align: center;
339 border-radius: 6px;
340}
341.final h1 {
342 line-height: 50px;
343}
344
345.final em {
346 margin-top: 40px;
347 font-size: 12px;
348}
332 349
333</style> 350</style>
334 351
@@ -346,7 +363,8 @@ border: 1px solid #000;
346 <li><a href="http://doc.wallabag.org/" target="_blank">Online doc</a></li> 363 <li><a href="http://doc.wallabag.org/" target="_blank">Online doc</a></li>
347 <li><a href="http://support.wallabag.org/" target="_blank">help</a></li> 364 <li><a href="http://support.wallabag.org/" target="_blank">help</a></li>
348 <li><a href="http://www.wallabag.org/" target="_blank">wallabag.org</a></li> 365 <li><a href="http://www.wallabag.org/" target="_blank">wallabag.org</a></li>
349 </ul> 366 </ul>
367 <?php if (!$final) : ?>
350 <?php if (!empty($errors)) : ?> 368 <?php if (!empty($errors)) : ?>
351 <div class='messages error install'> 369 <div class='messages error install'>
352 <p>Errors during installation:</p> 370 <p>Errors during installation:</p>
@@ -654,6 +672,12 @@ php composer.phar install</code></pre>
654 </div> 672 </div>
655 </form> 673 </form>
656 </div> 674 </div>
675 <?php else : ?>
676 <div class="final good">
677 <h1>wallabag is now installed ! :-) </h1>
678 <a href="index.php?clean=0">Click here to access the login form</a><br />
679 <em>The installation will now try to delete the install directory. If this fails, delete it manually.</em></div>
680 <?php endif; ?>
657 <script> 681 <script>
658 <?php if (!is_dir('vendor')) : ?> 682 <?php if (!is_dir('vendor')) : ?>
659 $(".database_info").hide(); 683 $(".database_info").hide();