]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Removes htaccess file creation and adds them in the repository 11/head
authorChristophe HENRY <christophe.henry@sbgodin.fr>
Sun, 3 Aug 2014 22:38:37 +0000 (00:38 +0200)
committerChristophe HENRY <christophe.henry@sbgodin.fr>
Sun, 3 Aug 2014 22:42:49 +0000 (00:42 +0200)
I also removed the previously created placeholders, which after all, have no more utility.

cache/.htaccess [new file with mode: 0644]
cache/.placeholder [deleted file]
data/.htaccess [new file with mode: 0644]
data/.placeholder [deleted file]
index.php
pagecache/.htaccess [new file with mode: 0644]
pagecache/.placeholder [deleted file]
tmp/.htaccess [new file with mode: 0644]
tmp/.placeholder [deleted file]

diff --git a/cache/.htaccess b/cache/.htaccess
new file mode 100644 (file)
index 0000000..b584d98
--- /dev/null
@@ -0,0 +1,2 @@
+Allow from none
+Deny from all
diff --git a/cache/.placeholder b/cache/.placeholder
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/data/.htaccess b/data/.htaccess
new file mode 100644 (file)
index 0000000..b584d98
--- /dev/null
@@ -0,0 +1,2 @@
+Allow from none
+Deny from all
diff --git a/data/.placeholder b/data/.placeholder
deleted file mode 100644 (file)
index e69de29..0000000
index 747f113a339b808e34979933ad0e613020cb7584..3136193f179e33533107384c33939658f36f82eb 100644 (file)
--- 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('<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());
diff --git a/pagecache/.htaccess b/pagecache/.htaccess
new file mode 100644 (file)
index 0000000..b584d98
--- /dev/null
@@ -0,0 +1,2 @@
+Allow from none
+Deny from all
diff --git a/pagecache/.placeholder b/pagecache/.placeholder
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tmp/.htaccess b/tmp/.htaccess
new file mode 100644 (file)
index 0000000..b584d98
--- /dev/null
@@ -0,0 +1,2 @@
+Allow from none
+Deny from all
diff --git a/tmp/.placeholder b/tmp/.placeholder
deleted file mode 100644 (file)
index e69de29..0000000