aboutsummaryrefslogtreecommitdiffhomepage
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rwxr-xr-xinstall/index.php17
-rw-r--r--install/install_functions.php8
2 files changed, 20 insertions, 5 deletions
diff --git a/install/index.php b/install/index.php
index 191c2574..31c15f89 100755
--- a/install/index.php
+++ b/install/index.php
@@ -17,8 +17,12 @@ require_once('install_functions.php');
17 17
18if (isset($_GET['clean'])) { 18if (isset($_GET['clean'])) {
19 if (is_dir('install')){ 19 if (is_dir('install')){
20 delTree('install'); 20 delTree('install');
21 header('Location: index.php'); 21 header('Location: index.php');
22 }
23 if (is_dir('cache')) {
24 delTree('cache', false);
25 header('Location: index.php');
22 } 26 }
23} 27}
24 28
@@ -402,8 +406,10 @@ border: 1px solid #000;
402 <?php if (file_exists('inc/poche/config.inc.php') && is_dir('vendor')) : ?> 406 <?php if (file_exists('inc/poche/config.inc.php') && is_dir('vendor')) : ?>
403 <div class='messages success install'> 407 <div class='messages success install'>
404 <p> 408 <p>
405 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>. 409 <a href="index.php?clean=0">Click here to finish update.</a><br>
410 If it fails, just delete the install directory.
406 </p> 411 </p>
412 <p>You may have to clear cache (by going into config screen) after update.</p>
407 </div> 413 </div>
408 <?php endif; ?> 414 <?php endif; ?>
409 <?php endif; ?> 415 <?php endif; ?>
@@ -701,6 +707,7 @@ php composer.phar install</code></pre>
701 $(".database_info").hide(); 707 $(".database_info").hide();
702 $(".usersettings").hide(); 708 $(".usersettings").hide();
703 <?php endif ?> 709 <?php endif ?>
710
704 /* 711 /*
705 * Database showing/hiding 712 * Database showing/hiding
706 */ 713 */
@@ -730,6 +737,10 @@ php composer.phar install</code></pre>
730 endif; 737 endif;
731 ?> 738 ?>
732 739
740 <?php if (file_exists('inc/poche/config.inc.php') && is_dir('vendor')) : ?>
741 $('.technical').hide();
742 <?php endif ?>
743
733 $("#mysql_utf8_mb4").click(function() { 744 $("#mysql_utf8_mb4").click(function() {
734 $("#utf8_mb4_infos").toggle(); 745 $("#utf8_mb4_infos").toggle();
735 }); 746 });
diff --git a/install/install_functions.php b/install/install_functions.php
index a4830569..3cfe13fb 100644
--- a/install/install_functions.php
+++ b/install/install_functions.php
@@ -78,12 +78,16 @@ function pdoDrivers() {
78 * Here in case of .gitignore files 78 * Here in case of .gitignore files
79 */ 79 */
80 80
81function delTree($dir) { 81function delTree($dir, $withdirectory="true") {
82 $files = array_diff(scandir($dir), array('.','..')); 82 $files = array_diff(scandir($dir), array('.','..'));
83 foreach ($files as $file) { 83 foreach ($files as $file) {
84 (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file"); 84 (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file");
85 } 85 }
86 return rmdir($dir); 86 if ($withdirectory) {
87 return rmdir($dir);
88 } else {
89 return true;
90 }
87 } 91 }
88 92
89function generate_salt() { 93function generate_salt() {