]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
update improvements
authorThomas Citharel <tcit@tcit.fr>
Sat, 14 Feb 2015 15:15:17 +0000 (16:15 +0100)
committerThomas Citharel <tcit@tcit.fr>
Sat, 14 Feb 2015 15:15:17 +0000 (16:15 +0100)
install/index.php
install/install_functions.php

index 191c2574c5c039459833c4e0c6df118112d93b6a..31c15f89f2850105d2bdcc2d00f7a711eb7ce8ac 100755 (executable)
@@ -17,8 +17,12 @@ require_once('install_functions.php');
 
 if (isset($_GET['clean'])) {
     if (is_dir('install')){
-    delTree('install');
-    header('Location: index.php');      
+        delTree('install');
+        header('Location: index.php');      
+    }
+    if (is_dir('cache')) {
+        delTree('cache', false);
+        header('Location: index.php');      
     }
 }
 
@@ -402,8 +406,10 @@ border: 1px solid #000;
                 <?php if (file_exists('inc/poche/config.inc.php') && is_dir('vendor')) : ?>
                 <div class='messages success install'>
                     <p>
-                        wallabag seems already installed. If you want to update it, you only have to delete install folder, then <a href="index.php">reload this page</a>.
+                        <a href="index.php?clean=0">Click here to finish update.</a><br>
+                        If it fails, just delete the install directory.
                     </p>
+                    <p>You may have to clear cache (by going into config screen) after update.</p>
                 </div>
                 <?php endif; ?>    
             <?php endif; ?>
@@ -701,6 +707,7 @@ php composer.phar install</code></pre>
             $(".database_info").hide();
             $(".usersettings").hide();
             <?php endif ?>
+
             /* 
              * Database showing/hiding
              */ 
@@ -730,6 +737,10 @@ php composer.phar install</code></pre>
             endif;
             ?>
 
+            <?php if (file_exists('inc/poche/config.inc.php') && is_dir('vendor')) : ?>
+                $('.technical').hide();
+            <?php endif ?>
+
             $("#mysql_utf8_mb4").click(function() {
                 $("#utf8_mb4_infos").toggle();
             });
index a483056952392af012be926dabbb551b2604ed5e..3cfe13fb49a341d89b669124115e162bac44e875 100644 (file)
@@ -78,12 +78,16 @@ function pdoDrivers() {
  * Here in case of .gitignore files
  */
 
-function delTree($dir) {
+function delTree($dir, $withdirectory="true") {
     $files = array_diff(scandir($dir), array('.','..'));
     foreach ($files as $file) {
       (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file");
     }
-    return rmdir($dir);
+    if ($withdirectory) {
+        return rmdir($dir);
+    } else {
+        return true;
+    }
   }
 
 function generate_salt() {