From: Christophe HENRY Date: Sun, 3 Aug 2014 22:38:37 +0000 (+0200) Subject: Removes htaccess file creation and adds them in the repository X-Git-Tag: v0.0.43beta~44^2 X-Git-Url: https://git.immae.eu/?p=github%2Fshaarli%2FShaarli.git;a=commitdiff_plain;h=3bb684f59f04511ed157833d3d9552ee0e65d980 Removes htaccess file creation and adds them in the repository I also removed the previously created placeholders, which after all, have no more utility. --- diff --git a/cache/.htaccess b/cache/.htaccess new file mode 100644 index 00000000..b584d98c --- /dev/null +++ b/cache/.htaccess @@ -0,0 +1,2 @@ +Allow from none +Deny from all diff --git a/cache/.placeholder b/cache/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/data/.htaccess b/data/.htaccess new file mode 100644 index 00000000..b584d98c --- /dev/null +++ b/data/.htaccess @@ -0,0 +1,2 @@ +Allow from none +Deny from all diff --git a/data/.placeholder b/data/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/index.php b/index.php index 747f113a..3136193f 100644 --- a/index.php +++ b/index.php @@ -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('
ERROR: Shaarli does not have the right to write in its own directory ('.realpath(dirname(__FILE__)).').
'); -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('
ERROR: Shaarli does not have the right to write in its data directory ('.realpath($GLOBALS['config']['DATADIR']).').
'); -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()); diff --git a/pagecache/.htaccess b/pagecache/.htaccess new file mode 100644 index 00000000..b584d98c --- /dev/null +++ b/pagecache/.htaccess @@ -0,0 +1,2 @@ +Allow from none +Deny from all diff --git a/pagecache/.placeholder b/pagecache/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/tmp/.htaccess b/tmp/.htaccess new file mode 100644 index 00000000..b584d98c --- /dev/null +++ b/tmp/.htaccess @@ -0,0 +1,2 @@ +Allow from none +Deny from all diff --git a/tmp/.placeholder b/tmp/.placeholder deleted file mode 100644 index e69de29b..00000000