aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche/Poche.class.php')
-rw-r--r--inc/poche/Poche.class.php13
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