summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-10-30 20:57:19 +0100
committerBart Visscher <bartv@thisnet.nl>2012-10-30 20:57:19 +0100
commit6d097529405a7e7791b4daac1909bafd38445c5c (patch)
treee8123b428f5b8bb1b14a42a0397de8e7dc4ff98c /lib/base.php
parent246d7ea2ea849b115c0d6eb47e6ea725c6271d0a (diff)
downloadnextcloud-server-6d097529405a7e7791b4daac1909bafd38445c5c.tar.gz
nextcloud-server-6d097529405a7e7791b4daac1909bafd38445c5c.zip
DRY for creating htaccess to protect data-directory
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php
index baa384d102e..de458cedb1e 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -225,9 +225,7 @@ class OC{
if (isset($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) {
if(!OC_Util::ishtaccessworking()) {
if(!file_exists(OC::$SERVERROOT.'/data/.htaccess')) {
- $content = "deny from all\n";
- $content.= "IndexIgnore *";
- file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/.htaccess', $content);
+ OC_Setup::protectDataDirectory();
}
}
}