1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

update improvements

This commit is contained in:
Thomas Citharel 2015-02-14 16:15:17 +01:00
parent 650928831b
commit 8df902951b
2 changed files with 20 additions and 5 deletions

View file

@ -17,8 +17,12 @@ require_once('install_functions.php');
if (isset($_GET['clean'])) { if (isset($_GET['clean'])) {
if (is_dir('install')){ if (is_dir('install')){
delTree('install'); delTree('install');
header('Location: index.php'); 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')) : ?> <?php if (file_exists('inc/poche/config.inc.php') && is_dir('vendor')) : ?>
<div class='messages success install'> <div class='messages success install'>
<p> <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>
<p>You may have to clear cache (by going into config screen) after update.</p>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
@ -701,6 +707,7 @@ php composer.phar install</code></pre>
$(".database_info").hide(); $(".database_info").hide();
$(".usersettings").hide(); $(".usersettings").hide();
<?php endif ?> <?php endif ?>
/* /*
* Database showing/hiding * Database showing/hiding
*/ */
@ -730,6 +737,10 @@ php composer.phar install</code></pre>
endif; endif;
?> ?>
<?php if (file_exists('inc/poche/config.inc.php') && is_dir('vendor')) : ?>
$('.technical').hide();
<?php endif ?>
$("#mysql_utf8_mb4").click(function() { $("#mysql_utf8_mb4").click(function() {
$("#utf8_mb4_infos").toggle(); $("#utf8_mb4_infos").toggle();
}); });

View file

@ -78,12 +78,16 @@ function pdoDrivers() {
* Here in case of .gitignore files * Here in case of .gitignore files
*/ */
function delTree($dir) { function delTree($dir, $withdirectory="true") {
$files = array_diff(scandir($dir), array('.','..')); $files = array_diff(scandir($dir), array('.','..'));
foreach ($files as $file) { foreach ($files as $file) {
(is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$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() { function generate_salt() {