some precisons in updating poche

This commit is contained in:
Nicolas Lœuillet 2013-08-16 20:40:31 +02:00
parent 12c4098773
commit abed0f2122
2 changed files with 7 additions and 7 deletions

View file

@ -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 <a href="install/update.php">by clicking here</a>. 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

View file

@ -35,6 +35,7 @@ $old_salt = '464v54gLLw928uz4zUBqkRJeiPY68zCX';
<li><a href="https://github.com/inthepoche/poche/issues/138">#138</a>: change pattern to parse url with #</li>
</ul>
</p>
<p>To update your poche, please fill the following fields.</p>
<p>
<form name="update" method="post">
<div><label for="login">login:</label> <input type="text" name="login" id="login" /></div>