aboutsummaryrefslogtreecommitdiffstats
path: root/webdav/owncloud.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2010-09-06 20:02:17 +0200
committerRobin Appelman <icewind1991@gmail.com>2010-09-06 20:02:17 +0200
commit5162809c8afd722a00de90390f94e173cac8431a (patch)
tree10831f5d104831dd236d9e0094fca07af8bb9a23 /webdav/owncloud.php
parentb479f9d570054bc5630a600d9321444216e2e4a2 (diff)
downloadnextcloud-server-5162809c8afd722a00de90390f94e173cac8431a.tar.gz
nextcloud-server-5162809c8afd722a00de90390f94e173cac8431a.zip
make the filesystem configurable (no gui yet)
Diffstat (limited to 'webdav/owncloud.php')
-rw-r--r--webdav/owncloud.php18
1 files changed, 1 insertions, 17 deletions
diff --git a/webdav/owncloud.php b/webdav/owncloud.php
index 575e9b43a92..387eae3c193 100644
--- a/webdav/owncloud.php
+++ b/webdav/owncloud.php
@@ -39,23 +39,7 @@ if(empty($_SERVER['PHP_AUTH_USER']) && empty($_SERVER['REDIRECT_REMOTE_USER']))
$user=$_SERVER['PHP_AUTH_USER'];
$passwd=$_SERVER['PHP_AUTH_PW'];
if(OC_USER::login($user,$passwd)){
- $CONFIG_DATADIRECTORY=$CONFIG_DATADIRECTORY_ROOT.'/'.$user;
- if(!is_dir($CONFIG_DATADIRECTORY)){
- mkdir($CONFIG_DATADIRECTORY);
- }
- $rootStorage=new OC_FILESTORAGE_LOCAL(array('datadir'=>$CONFIG_DATADIRECTORY));
- if($CONFIG_ENABLEBACKUP){
- if(!is_dir($CONFIG_BACKUPDIRECTORY)){
- mkdir($CONFIG_BACKUPDIRECTORY);
- }
- if(!is_dir($CONFIG_BACKUPDIRECTORY.'/'.$user)){
- mkdir($CONFIG_BACKUPDIRECTORY.'/'.$user);
- }
- $backupStorage=new OC_FILESTORAGE_LOCAL(array('datadir'=>$CONFIG_BACKUPDIRECTORY.'/'.$user));
- $backup=new OC_FILEOBSERVER_BACKUP(array('storage'=>$backupStorage));
- $rootStorage->addObserver($backup);
- }
- OC_FILESYSTEM::mount($rootStorage,'/');
+ OC_UTIL::setUpFS();
$server = new HTTP_WebDAV_Server_Filesystem();
$server->db_name = $CONFIG_DBNAME;
$server->ServeRequest($CONFIG_DATADIRECTORY);