aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSébastien SAUVAGE <sebsauvage@sebsauvage.net>2013-09-24 02:07:21 -0700
committerSébastien SAUVAGE <sebsauvage@sebsauvage.net>2013-09-24 02:07:21 -0700
commit0b88c6022d494c9c4de779ef10df3ecd1328a55c (patch)
tree7c6f5deaedfd7c819233d9f8be5d2f41fd9898fe
parent371a6fc2d2ee8a2350a01ab37b2c5c2f173ee204 (diff)
parentff63b7d111e4074d96bcc3a824202e7847b29830 (diff)
downloadShaarli-0b88c6022d494c9c4de779ef10df3ecd1328a55c.tar.gz
Shaarli-0b88c6022d494c9c4de779ef10df3ecd1328a55c.tar.zst
Shaarli-0b88c6022d494c9c4de779ef10df3ecd1328a55c.zip
Merge pull request #118 from Alkarex/patch-1
Corrected error message for lack of write access in ./data
-rw-r--r--index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.php b/index.php
index d3e105f9..8567efb5 100644
--- a/index.php
+++ b/index.php
@@ -89,7 +89,7 @@ if (!is_dir($GLOBALS['config']['DATADIR'])) { mkdir($GLOBALS['config']['DATADIR'
89if (!is_dir('tmp')) { mkdir('tmp',0705); chmod('tmp',0705); } // For RainTPL temporary files. 89if (!is_dir('tmp')) { mkdir('tmp',0705); chmod('tmp',0705); } // For RainTPL temporary files.
90if (!is_file($GLOBALS['config']['DATADIR'].'/.htaccess')) { file_put_contents($GLOBALS['config']['DATADIR'].'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. 90if (!is_file($GLOBALS['config']['DATADIR'].'/.htaccess')) { file_put_contents($GLOBALS['config']['DATADIR'].'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files.
91// Second check to see if Shaarli can write in its directory, because on some hosts is_writable() is not reliable. 91// Second check to see if Shaarli can write in its directory, because on some hosts is_writable() is not reliable.
92if (!is_file($GLOBALS['config']['DATADIR'].'/.htaccess')) die('<pre>ERROR: Shaarli does not have the right to write in its own directory ('.realpath(dirname(__FILE__)).').</pre>'); 92if (!is_file($GLOBALS['config']['DATADIR'].'/.htaccess')) die('<pre>ERROR: Shaarli does not have the right to write in its data directory ('.realpath($GLOBALS['config']['DATADIR']).').</pre>');
93if ($GLOBALS['config']['ENABLE_LOCALCACHE']) 93if ($GLOBALS['config']['ENABLE_LOCALCACHE'])
94{ 94{
95 if (!is_dir($GLOBALS['config']['CACHEDIR'])) { mkdir($GLOBALS['config']['CACHEDIR'],0705); chmod($GLOBALS['config']['CACHEDIR'],0705); } 95 if (!is_dir($GLOBALS['config']['CACHEDIR'])) { mkdir($GLOBALS['config']['CACHEDIR'],0705); chmod($GLOBALS['config']['CACHEDIR'],0705); }