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');
}
}
<?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; ?>
$(".database_info").hide();
$(".usersettings").hide();
<?php endif ?>
+
/*
* Database showing/hiding
*/
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();
});
* 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() {