aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlexandre Alapetite <alexandre@alapetite.fr>2013-08-23 17:02:15 +0200
committerAlexandre Alapetite <alexandre@alapetite.fr>2013-08-23 17:02:15 +0200
commitff63b7d111e4074d96bcc3a824202e7847b29830 (patch)
treeb20916fa74ca12ed63aa239bbf78b2729690e576
parent002ef0e5c8ed2bab38e205a5d54617780f25c3a9 (diff)
downloadShaarli-ff63b7d111e4074d96bcc3a824202e7847b29830.tar.gz
Shaarli-ff63b7d111e4074d96bcc3a824202e7847b29830.tar.zst
Shaarli-ff63b7d111e4074d96bcc3a824202e7847b29830.zip
Corrected error message for lack of write access in ./data
-rw-r--r--index.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.php b/index.php
index d88f471c..e6d607ee 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); }
@@ -2440,4 +2440,4 @@ if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'do=d
2440if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'ws=')) { processWS(); exit; } // Webservices (for jQuery/jQueryUI) 2440if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'ws=')) { processWS(); exit; } // Webservices (for jQuery/jQueryUI)
2441if (!isset($_SESSION['LINKS_PER_PAGE'])) $_SESSION['LINKS_PER_PAGE']=$GLOBALS['config']['LINKS_PER_PAGE']; 2441if (!isset($_SESSION['LINKS_PER_PAGE'])) $_SESSION['LINKS_PER_PAGE']=$GLOBALS['config']['LINKS_PER_PAGE'];
2442renderPage(); 2442renderPage();
2443?> \ No newline at end of file 2443?>