diff options
author | Robin Appelman <icewind1991@gmail.com> | 2010-09-06 20:02:17 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2010-09-06 20:02:17 +0200 |
commit | 5162809c8afd722a00de90390f94e173cac8431a (patch) | |
tree | 10831f5d104831dd236d9e0094fca07af8bb9a23 /webdav/owncloud.php | |
parent | b479f9d570054bc5630a600d9321444216e2e4a2 (diff) | |
download | nextcloud-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.php | 18 |
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); |