Removes htaccess file creation and adds them in the repository

I also removed the previously created placeholders, which after all, have no more utility.
This commit is contained in:
Christophe HENRY 2014-08-04 00:38:37 +02:00
parent e7416aba2c
commit 3bb684f59f
9 changed files with 8 additions and 7 deletions

2
cache/.htaccess vendored Normal file
View File

@ -0,0 +1,2 @@
Allow from none
Deny from all

0
cache/.placeholder vendored
View File

2
data/.htaccess Normal file
View File

@ -0,0 +1,2 @@
Allow from none
Deny from all

View File

View File

@ -88,13 +88,6 @@ header("Pragma: no-cache");
// Directories creations (Note that your web host may require differents rights than 705.)
if (!is_writable(realpath(dirname(__FILE__)))) die('<pre>ERROR: Shaarli does not have the right to write in its own directory ('.realpath(dirname(__FILE__)).').</pre>');
if (!is_file($GLOBALS['config']['DATADIR'].'/.htaccess')) { file_put_contents($GLOBALS['config']['DATADIR'].'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files.
// Second check to see if Shaarli can write in its directory, because on some hosts is_writable() is not reliable.
if (!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>');
if ($GLOBALS['config']['ENABLE_LOCALCACHE'])
{
if (!is_file($GLOBALS['config']['CACHEDIR'].'/.htaccess')) { file_put_contents($GLOBALS['config']['CACHEDIR'].'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files.
}
// Handling of old config file which do not have the new parameters.
if (empty($GLOBALS['title'])) $GLOBALS['title']='Shared links on '.htmlspecialchars(indexUrl());

2
pagecache/.htaccess Normal file
View File

@ -0,0 +1,2 @@
Allow from none
Deny from all

View File

2
tmp/.htaccess Normal file
View File

@ -0,0 +1,2 @@
Allow from none
Deny from all

View File