summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-05-02 16:41:00 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-05-02 16:41:23 +0200
commitda03d057007d885914dfac7c92cca51747b5f44b (patch)
tree042198fa223b761710480fdc96466649fae321d6 /apps/files/appinfo
parentc536e930f40f1bf4dd551ca6fefca15b2f88eee7 (diff)
downloadnextcloud-server-da03d057007d885914dfac7c92cca51747b5f44b.tar.gz
nextcloud-server-da03d057007d885914dfac7c92cca51747b5f44b.zip
create folder 'remote' for the remote services like caldav, carddav and webdav
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r--apps/files/appinfo/install.php4
-rw-r--r--apps/files/appinfo/remote.php51
-rw-r--r--apps/files/appinfo/update.php4
3 files changed, 59 insertions, 0 deletions
diff --git a/apps/files/appinfo/install.php b/apps/files/appinfo/install.php
new file mode 100644
index 00000000000..d00a1a321eb
--- /dev/null
+++ b/apps/files/appinfo/install.php
@@ -0,0 +1,4 @@
+<?php
+if(!file_exists(OC::$WEBROOT.'/remote/webdav.php')){
+ file_put_contents(OC::$WEBROOT.'/remote/webdav.php', file_get_contents(OC::$APPROOT . '/apps/files/appinfo/webdav.php'));
+} \ No newline at end of file
diff --git a/apps/files/appinfo/remote.php b/apps/files/appinfo/remote.php
new file mode 100644
index 00000000000..232a61ed944
--- /dev/null
+++ b/apps/files/appinfo/remote.php
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * ownCloud
+ *
+ * @author Frank Karlitschek
+ * @author Jakob Sack
+ * @copyright 2010 Frank Karlitschek karlitschek@kde.org
+ * @copyright 2011 Jakob Sack kde@jakobsack.de
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+// Do not load FS ...
+$RUNTIME_NOSETUPFS = true;
+
+// only need filesystem apps
+$RUNTIME_APPTYPES=array('filesystem','authentication');
+
+
+
+// Backends
+$authBackend = new OC_Connector_Sabre_Auth();
+$lockBackend = new OC_Connector_Sabre_Locks();
+
+// Create ownCloud Dir
+$publicDir = new OC_Connector_Sabre_Directory('');
+
+// Fire up server
+$server = new Sabre_DAV_Server($publicDir);
+$server->setBaseUri(OC::$WEBROOT.'/remote/webdav.php');
+
+// Load plugins
+$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
+$server->addPlugin(new Sabre_DAV_Locks_Plugin($lockBackend));
+$server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload
+
+// And off we go!
+$server->exec();
diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php
new file mode 100644
index 00000000000..d00a1a321eb
--- /dev/null
+++ b/apps/files/appinfo/update.php
@@ -0,0 +1,4 @@
+<?php
+if(!file_exists(OC::$WEBROOT.'/remote/webdav.php')){
+ file_put_contents(OC::$WEBROOT.'/remote/webdav.php', file_get_contents(OC::$APPROOT . '/apps/files/appinfo/webdav.php'));
+} \ No newline at end of file