diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-16 20:40:31 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-16 20:40:31 +0200 |
commit | abed0f212266895f67add983a478cd0eb88487a9 (patch) | |
tree | 48abe1cc81b33dddfd2a3c49ccce395194d43540 /inc | |
parent | 12c40987735de13be8361e76ac97b3999f5099f3 (diff) | |
download | wallabag-abed0f212266895f67add983a478cd0eb88487a9.tar.gz wallabag-abed0f212266895f67add983a478cd0eb88487a9.tar.zst wallabag-abed0f212266895f67add983a478cd0eb88487a9.zip |
some precisons in updating poche
Diffstat (limited to 'inc')
-rw-r--r-- | inc/poche/Poche.class.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index cb865a2a..e0dc0d20 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -42,7 +42,11 @@ class Poche | |||
42 | $msg = ''; | 42 | $msg = ''; |
43 | $allIsGood = TRUE; | 43 | $allIsGood = TRUE; |
44 | 44 | ||
45 | if (file_exists('./install/update.php') && !DEBUG_POCHE) { | 45 | if (!is_writable(CACHE)) { |
46 | Tools::logm('you don\'t have write access on cache directory'); | ||
47 | die('You don\'t have write access on cache directory.'); | ||
48 | } | ||
49 | else if (file_exists('./install/update.php') && !DEBUG_POCHE) { | ||
46 | $msg = 'A poche update is needed. Please execute this update <a href="install/update.php">by clicking here</a>. If you have already do the update, please delete /install folder.'; | 50 | $msg = 'A poche update is needed. Please execute this update <a href="install/update.php">by clicking here</a>. If you have already do the update, please delete /install folder.'; |
47 | $allIsGood = FALSE; | 51 | $allIsGood = FALSE; |
48 | } | 52 | } |
@@ -55,12 +59,7 @@ class Poche | |||
55 | $msg = 'You don\'t have write access on sqlite file.'; | 59 | $msg = 'You don\'t have write access on sqlite file.'; |
56 | $allIsGood = FALSE; | 60 | $allIsGood = FALSE; |
57 | } | 61 | } |
58 | else if (!is_writable(CACHE)) { | 62 | |
59 | Tools::logm('you don\'t have write access on cache directory'); | ||
60 | $msg = 'You don\'t have write access on cache directory.'; | ||
61 | $allIsGood = FALSE; | ||
62 | } | ||
63 | |||
64 | if (!$allIsGood) { | 63 | if (!$allIsGood) { |
65 | echo $this->tpl->render('error.twig', array( | 64 | echo $this->tpl->render('error.twig', array( |
66 | 'msg' => $msg | 65 | 'msg' => $msg |