Skip to content
Snippets Groups Projects
Commit da03d057 authored by Georg Ehrke's avatar Georg Ehrke
Browse files

create folder 'remote' for the remote services like caldav, carddav and webdav

parent c536e930
No related branches found
No related tags found
No related merge requests found
ErrorDocument 403 /core/templates/403.php ErrorDocument 403 /core/templates/403.php
ErrorDocument 404 /core/templates/404.php ErrorDocument 404 /core/templates/404.php
Redirect 301 /apps/calendar/caldav.php /remote/caldav.php
Redirect 301 /apps/contacts/carddav.php /remote/carddav.php
Redirect 301 /apps/files/webdav.php /remote/webdav.php
Redirect 301 /files/webdav.php /remote/webdav.php
<IfModule mod_php5.c> <IfModule mod_php5.c>
php_value upload_max_filesize 512M php_value upload_max_filesize 512M
php_value post_max_size 512M php_value post_max_size 512M
...@@ -11,7 +15,7 @@ php_value memory_limit 512M ...@@ -11,7 +15,7 @@ php_value memory_limit 512M
<IfModule mod_rewrite.c> <IfModule mod_rewrite.c>
RewriteEngine on RewriteEngine on
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last] RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]
RewriteRule ^.well-known/carddav /apps/contacts/carddav.php [R] RewriteRule ^.well-known/carddav /remote/carddav.php [R]
RewriteRule ^.well-known/caldav /apps/calendar/caldav.php [R] RewriteRule ^.well-known/caldav /remote/caldav.php [R]
</IfModule> </IfModule>
Options -Indexes Options -Indexes
\ No newline at end of file
<?php
if(!file_exists(OC::$WEBROOT.'/remote/caldav.php')){
file_put_contents(OC::$WEBROOT.'/remote/caldav.php', file_get_contents(OC::$APPROOT . '/apps/calendar/appinfo/remote.php'));
}
\ No newline at end of file
...@@ -5,10 +5,9 @@ ...@@ -5,10 +5,9 @@
* later. * later.
* See the COPYING-README file. * See the COPYING-README file.
*/ */
// Do not load FS ... // Do not load FS ...
$RUNTIME_NOSETUPFS = true; $RUNTIME_NOSETUPFS = true;
require_once('../inc.php'); require_once('../lib/base.php');
OC_Util::checkAppEnabled('calendar'); OC_Util::checkAppEnabled('calendar');
...@@ -25,7 +24,7 @@ $nodes = array( ...@@ -25,7 +24,7 @@ $nodes = array(
// Fire up server // Fire up server
$server = new Sabre_DAV_Server($nodes); $server = new Sabre_DAV_Server($nodes);
$server->setBaseUri(OC::$APPSWEBROOT.'/apps/calendar/caldav.php'); $server->setBaseUri(OC::$WEBROOT.'/remote/caldav.php');
// Add plugins // Add plugins
$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud')); $server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
$server->addPlugin(new Sabre_CalDAV_Plugin()); $server->addPlugin(new Sabre_CalDAV_Plugin());
......
...@@ -15,3 +15,6 @@ if (version_compare($installedVersion, '0.2.1', '<')) { ...@@ -15,3 +15,6 @@ if (version_compare($installedVersion, '0.2.1', '<')) {
$r = $stmt->execute(array($color,$id)); $r = $stmt->execute(array($color,$id));
} }
} }
if(!file_exists(OC::$WEBROOT.'/remote/caldav.php')){
file_put_contents(OC::$WEBROOT.'/remote/caldav.php', file_get_contents(OC::$APPROOT . '/apps/calendar/appinfo/remote.php'));
}
\ No newline at end of file
<?php
if(!file_exists(OC::$WEBROOT.'/remote/carddav.php')){
file_put_contents(OC::$WEBROOT.'/remote/carddav.php', file_get_contents(OC::$APPROOT . '/apps/contacts/appinfo/remote.php'));
}
\ No newline at end of file
...@@ -19,10 +19,9 @@ ...@@ -19,10 +19,9 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
// Do not load FS ... // Do not load FS ...
$RUNTIME_NOSETUPFS = true; $RUNTIME_NOSETUPFS = true;
require_once('../inc.php'); require_once('../lib/base.php');
OC_Util::checkAppEnabled('contacts'); OC_Util::checkAppEnabled('contacts');
...@@ -39,7 +38,7 @@ $nodes = array( ...@@ -39,7 +38,7 @@ $nodes = array(
// Fire up server // Fire up server
$server = new Sabre_DAV_Server($nodes); $server = new Sabre_DAV_Server($nodes);
$server->setBaseUri(OC::$APPSWEBROOT.'/apps/contacts/carddav.php'); $server->setBaseUri(OC::$WEBROOT.'/remote/carddav.php');
// Add plugins // Add plugins
$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud')); $server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
$server->addPlugin(new Sabre_CardDAV_Plugin()); $server->addPlugin(new Sabre_CardDAV_Plugin());
......
<?php
if(!file_exists(OC::$WEBROOT.'/remote/carddav.php')){
file_put_contents(OC::$WEBROOT.'/remote/carddav.php', file_get_contents(OC::$APPROOT . '/apps/contacts/appinfo/remote.php'));
}
\ No newline at end of file
<?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
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
// Do not load FS ... // Do not load FS ...
$RUNTIME_NOSETUPFS = true; $RUNTIME_NOSETUPFS = true;
require_once('../inc.php');
// only need filesystem apps // only need filesystem apps
$RUNTIME_APPTYPES=array('filesystem','authentication'); $RUNTIME_APPTYPES=array('filesystem','authentication');
...@@ -41,7 +40,7 @@ $publicDir = new OC_Connector_Sabre_Directory(''); ...@@ -41,7 +40,7 @@ $publicDir = new OC_Connector_Sabre_Directory('');
// Fire up server // Fire up server
$server = new Sabre_DAV_Server($publicDir); $server = new Sabre_DAV_Server($publicDir);
$server->setBaseUri(OC::$APPSWEBROOT.'/apps/files/webdav.php'); $server->setBaseUri(OC::$WEBROOT.'/remote/webdav.php');
// Load plugins // Load plugins
$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud')); $server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
......
<?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
<?php require_once('/Applications/MAMP/htdocs/owncloud/lib/base.php'); ?>
\ No newline at end of file
...@@ -44,7 +44,7 @@ if($not_installed) { ...@@ -44,7 +44,7 @@ if($not_installed) {
// Handle WebDAV // Handle WebDAV
if($_SERVER['REQUEST_METHOD']=='PROPFIND'){ if($_SERVER['REQUEST_METHOD']=='PROPFIND'){
header('location: '.OC_Helper::linkToAbsolute('files','webdav.php')); header('location: '.OC_Helper::linkToAbsolute('remote','webdav.php'));
exit(); exit();
} }
......
...@@ -451,8 +451,6 @@ class OC{ ...@@ -451,8 +451,6 @@ class OC{
exit; exit;
} }
} }
//update path to lib base
@file_put_contents(OC::$APPSROOT . '/apps/inc.php', '<?php require_once(\'' . OC::$SERVERROOT . '/lib/base.php' . '\'); ?>');
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment