From abed0f212266895f67add983a478cd0eb88487a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 16 Aug 2013 20:40:31 +0200 Subject: some precisons in updating poche --- inc/poche/Poche.class.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'inc') 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 $msg = ''; $allIsGood = TRUE; - if (file_exists('./install/update.php') && !DEBUG_POCHE) { + if (!is_writable(CACHE)) { + Tools::logm('you don\'t have write access on cache directory'); + die('You don\'t have write access on cache directory.'); + } + else if (file_exists('./install/update.php') && !DEBUG_POCHE) { $msg = 'A poche update is needed. Please execute this update by clicking here. If you have already do the update, please delete /install folder.'; $allIsGood = FALSE; } @@ -55,12 +59,7 @@ class Poche $msg = 'You don\'t have write access on sqlite file.'; $allIsGood = FALSE; } - else if (!is_writable(CACHE)) { - Tools::logm('you don\'t have write access on cache directory'); - $msg = 'You don\'t have write access on cache directory.'; - $allIsGood = FALSE; - } - + if (!$allIsGood) { echo $this->tpl->render('error.twig', array( 'msg' => $msg -- cgit v1.2.3