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:
parent
e7416aba2c
commit
3bb684f59f
9 changed files with 8 additions and 7 deletions
2
cache/.htaccess
vendored
Normal file
2
cache/.htaccess
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
Allow from none
|
||||
Deny from all
|
0
cache/.placeholder
vendored
0
cache/.placeholder
vendored
2
data/.htaccess
Normal file
2
data/.htaccess
Normal file
|
@ -0,0 +1,2 @@
|
|||
Allow from none
|
||||
Deny from all
|
|
@ -88,13 +88,6 @@ function stripslashes_deep($value) { $value = is_array($value) ? array_map('stri
|
|||
|
||||
// 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
2
pagecache/.htaccess
Normal file
|
@ -0,0 +1,2 @@
|
|||
Allow from none
|
||||
Deny from all
|
2
tmp/.htaccess
Normal file
2
tmp/.htaccess
Normal file
|
@ -0,0 +1,2 @@
|
|||
Allow from none
|
||||
Deny from all
|
Loading…
Reference in a new issue