diff --git a/install/index.php b/install/index.php index 750b6e4..ac2f93b 100755 --- a/install/index.php +++ b/install/index.php @@ -10,6 +10,7 @@ $errors = array(); $successes = array(); +$installed = false; /** @@ -59,14 +60,20 @@ function delTree($dir) { return rmdir($dir); } +/** + * Call to delete install directory if already installed + */ +if (isset($_GET['clean'])) { + clean(); + header('Location: index.php'); +} + /** * Delete install directory */ - -if (isset($_GET['clean'])) { +function clean() { if (is_dir('install')){ - delTree('install'); - header('Location: index.php'); + delTree('install'); } } @@ -105,7 +112,7 @@ if (isset($_POST['download'])) { else if (isset($_POST['install'])) { if (!is_dir('vendor')) { - $errors[] = 'You must install twig before.'; + $errors[] = 'You must install twig before.'; # useless unless JS not enabled } else { $continue = true; @@ -209,6 +216,8 @@ else if (isset($_POST['install'])) { $params = array($id_user, 'language', 'en_EN.UTF8'); $query = executeQuery($handle, $sql, $params); + clean(); + $installed = true; $successes[] = 'wallabag is now installed. You can now access it !'; } } @@ -291,7 +300,8 @@ else if (isset($_POST['install'])) {
  • doc
  • help
  • wallabag.org
  • - + +

    Errors during installation:

    @@ -302,7 +312,6 @@ else if (isset($_POST['install'])) {

    -
    @@ -319,7 +328,7 @@ else if (isset($_POST['install'])) {

    - wallabag seems already installed. If you want to update it, you only have to delete install folder, then reload this page. + wallabag seems already installed. If you wanted to update it, you now have to delete the install directory.

    @@ -442,7 +451,7 @@ php composer.phar install

    Then, please reload the page.

    Reload -
    Twig seems to be already installed. All good !
    +
    Twig seems to be already installed. All good !
    Next Step @@ -585,5 +594,10 @@ php composer.phar install

    Then, please reload the page.

    location.reload(); }); + +
    + wallabag is now installed. You can now access it ! +
    +