diff options
author | Christophe HENRY <christophe.henry@sbgodin.fr> | 2014-08-04 00:38:37 +0200 |
---|---|---|
committer | Christophe HENRY <christophe.henry@sbgodin.fr> | 2014-08-04 00:42:49 +0200 |
commit | 3bb684f59f04511ed157833d3d9552ee0e65d980 (patch) | |
tree | ae77468974990b2463bb4a4fc9a07ef4ce15398d /index.php | |
parent | e7416aba2c7a06fc96e37700f555c2b70a5ac859 (diff) | |
download | Shaarli-3bb684f59f04511ed157833d3d9552ee0e65d980.tar.gz Shaarli-3bb684f59f04511ed157833d3d9552ee0e65d980.tar.zst Shaarli-3bb684f59f04511ed157833d3d9552ee0e65d980.zip |
Removes htaccess file creation and adds them in the repository
I also removed the previously created placeholders, which after all, have no more utility.
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 7 |
1 files changed, 0 insertions, 7 deletions
@@ -88,13 +88,6 @@ header("Pragma: no-cache"); | |||
88 | 88 | ||
89 | // Directories creations (Note that your web host may require differents rights than 705.) | 89 | // Directories creations (Note that your web host may require differents rights than 705.) |
90 | 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>'); | 90 | 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>'); |
91 | if (!is_file($GLOBALS['config']['DATADIR'].'/.htaccess')) { file_put_contents($GLOBALS['config']['DATADIR'].'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. | ||
92 | // Second check to see if Shaarli can write in its directory, because on some hosts is_writable() is not reliable. | ||
93 | 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>'); | ||
94 | if ($GLOBALS['config']['ENABLE_LOCALCACHE']) | ||
95 | { | ||
96 | if (!is_file($GLOBALS['config']['CACHEDIR'].'/.htaccess')) { file_put_contents($GLOBALS['config']['CACHEDIR'].'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. | ||
97 | } | ||
98 | 91 | ||
99 | // Handling of old config file which do not have the new parameters. | 92 | // Handling of old config file which do not have the new parameters. |
100 | if (empty($GLOBALS['title'])) $GLOBALS['title']='Shared links on '.htmlspecialchars(indexUrl()); | 93 | if (empty($GLOBALS['title'])) $GLOBALS['title']='Shared links on '.htmlspecialchars(indexUrl()); |