@@ -1,9 +1,9 @@ | |||
ErrorDocument 403 /core/templates/403.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 | |||
Redirect 301 /apps/calendar/caldav.php /remote.php/caldav/ | |||
Redirect 301 /apps/contacts/carddav.php /remote.php/carddav/ | |||
Redirect 301 /apps/files/webdav.php /remote.php/webdav/ | |||
Redirect 301 /files/webdav.php /remote.php/webdav/ | |||
<IfModule mod_php5.c> | |||
php_value upload_max_filesize 512M | |||
php_value post_max_size 512M | |||
@@ -15,9 +15,10 @@ php_value memory_limit 512M | |||
<IfModule mod_rewrite.c> | |||
RewriteEngine on | |||
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | |||
RewriteRule ^.well-known/carddav /remote/carddav.php [R] | |||
RewriteRule ^.well-known/caldav /remote/caldav.php [R] | |||
RewriteRule ^.well-known/carddav /remote.php/carddav/ [R] | |||
RewriteRule ^.well-known/caldav /remote.php/caldav/ [R] | |||
RewriteRule ^apps/([^/]*)/(.*\.(css|php))$ index.php?app=$1&getfile=$2 [QSA,L] | |||
RewriteRule ^remote/(.*) remote.php [QSA,L] | |||
</IfModule> | |||
Options -Indexes |
@@ -215,7 +215,7 @@ class Sabre_DAV_Server { | |||
$DOM->appendChild($error); | |||
$error->appendChild($DOM->createElement('s:exception',get_class($e))); | |||
$error->appendChild($DOM->createElement('s:message',$e->getMessage())); | |||
$error->appendChild($DOM->createElement('s:message',htmlentities($e->getMessage()))); | |||
if ($this->debugExceptions) { | |||
$error->appendChild($DOM->createElement('s:file',$e->getFile())); | |||
$error->appendChild($DOM->createElement('s:line',$e->getLine())); |
@@ -23,6 +23,4 @@ OCP\App::addNavigationEntry( array( | |||
'name' => $l->t('Calendar'))); | |||
OCP\App::registerPersonal('calendar', 'settings'); | |||
OC_Search::registerProvider('OC_Search_Provider_Calendar'); | |||
if(!file_exists(OC::$SERVERROOT.'/remote/caldav.php')){ | |||
file_put_contents(OC::$SERVERROOT.'/remote/caldav.php', file_get_contents(OC::$APPSROOT . '/apps/calendar/appinfo/remote.php')); | |||
} | |||
OCP\CONFIG::setAppValue('core', 'caldav', '/apps/calendar/appinfo/remote.php'); |
@@ -5,10 +5,6 @@ | |||
* later. | |||
* See the COPYING-README file. | |||
*/ | |||
// Do not load FS ... | |||
$RUNTIME_NOSETUPFS = true; | |||
require_once('../lib/base.php'); | |||
OCP\App::checkAppEnabled('calendar'); | |||
// Backends | |||
@@ -24,7 +20,7 @@ $nodes = array( | |||
// Fire up server | |||
$server = new Sabre_DAV_Server($nodes); | |||
$server->setBaseUri(OC::$WEBROOT.'/remote/caldav.php'); | |||
$server->setBaseUri($baseuri); | |||
// Add plugins | |||
$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud')); | |||
$server->addPlugin(new Sabre_CalDAV_Plugin()); |
@@ -19,7 +19,7 @@ | |||
var missing_field_totime = '<?php echo addslashes($l->t('To Time')) ?>'; | |||
var missing_field_startsbeforeends = '<?php echo addslashes($l->t('The event ends before it starts')) ?>'; | |||
var missing_field_dberror = '<?php echo addslashes($l->t('There was a database fail')) ?>'; | |||
var totalurl = '<?php echo OCP\Util::linkToAbsolute('calendar', 'caldav.php'); ?>/calendars'; | |||
var totalurl = '<?php echo OCP\Util::linkToAbsolute('remote.php', 'caldav'); ?>/calendars'; | |||
var firstDay = '<?php echo (OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'firstday', 'mo') == 'mo' ? '1' : '0'); ?>'; | |||
$(document).ready(function() { | |||
<?php |
@@ -47,6 +47,6 @@ | |||
</table> | |||
<?php echo $l->t('Calendar CalDAV syncing address:');?> | |||
<code><?php echo OCP\Util::linkToAbsolute('remote', 'caldav.php'); ?></code><br /> | |||
<code><?php echo OCP\Util::linkToAbsolute('remote.php', 'caldav/'); ?></code><br /> | |||
</fieldset> | |||
</form> |
@@ -25,6 +25,4 @@ OCP\App::addNavigationEntry( array( | |||
OCP\App::registerPersonal('contacts','settings'); | |||
OCP\Util::addscript('contacts', 'loader'); | |||
OC_Search::registerProvider('OC_Search_Provider_Contacts'); | |||
if(!file_exists(OC::$SERVERROOT.'/remote/carddav.php')){ | |||
file_put_contents(OC::$SERVERROOT.'/remote/carddav.php', file_get_contents(OC::$APPSROOT . '/apps/contacts/appinfo/remote.php')); | |||
} | |||
OCP\CONFIG::setAppValue('core', 'carddav', '/apps/contacts/appinfo/remote.php'); |
@@ -19,9 +19,6 @@ | |||
* License along with this library. If not, see <http://www.gnu.org/licenses/>. | |||
* | |||
*/ | |||
// Do not load FS ... | |||
$RUNTIME_NOSETUPFS = true; | |||
require_once('../lib/base.php'); | |||
OCP\App::checkAppEnabled('contacts'); | |||
@@ -38,7 +35,7 @@ $nodes = array( | |||
// Fire up server | |||
$server = new Sabre_DAV_Server($nodes); | |||
$server->setBaseUri(OC::$WEBROOT.'/remote/carddav.php'); | |||
$server->setBaseUri($baseuri); | |||
// Add plugins | |||
$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud')); | |||
$server->addPlugin(new Sabre_CardDAV_Plugin()); |
@@ -1,5 +1,5 @@ | |||
<script type='text/javascript'> | |||
var totalurl = '<?php echo OCP\Util::linkToAbsolute('contacts', 'carddav.php'); ?>/addressbooks'; | |||
var totalurl = '<?php echo OCP\Util::linkToAbsolute('remote.php', 'carddav'); ?>/addressbooks'; | |||
var categories = <?php echo json_encode($_['categories']); ?>; | |||
var lang = '<?php echo OCP\Config::getUserValue(OCP\USER::getUser(), 'core', 'lang', 'en'); ?>'; | |||
</script> |
@@ -4,9 +4,9 @@ | |||
<?php echo $l->t('CardDAV syncing addresses'); ?> (<a href="http://owncloud.org/synchronisation/" target="_blank"><?php echo $l->t('more info'); ?></a>) | |||
<dl> | |||
<dt><?php echo $l->t('Primary address (Kontact et al)'); ?></dt> | |||
<dd><code><?php echo OCP\Util::linkToAbsolute('remote', 'carddav.php'); ?>/</code></dd> | |||
<dd><code><?php echo OCP\Util::linkToAbsolute('remote.php', 'carddav/'); ?></code></dd> | |||
<dt><?php echo $l->t('iOS/OS X'); ?></dt> | |||
<dd><code><?php echo OCP\Util::linkToAbsolute('remote', 'carddav.php'); ?>/principals/<?php echo OCP\USER::getUser(); ?></code>/</dd> | |||
<dd><code><?php echo OCP\Util::linkToAbsolute('remote.php', 'carddav/'); ?>principals/<?php echo OCP\USER::getUser(); ?></code>/</dd> | |||
</dl> | |||
Powered by <a href="http://geonames.org/" target="_blank">geonames.org webservice</a> | |||
</fieldset> |
@@ -1,6 +1,4 @@ | |||
<?php | |||
$l=OC_L10N::get('files'); | |||
OCP\App::register( array( "order" => 2, "id" => "files", "name" => "Files" )); | |||
@@ -9,6 +7,4 @@ OCP\App::registerAdmin('files','admin'); | |||
OCP\App::addNavigationEntry( array( "id" => "files_index", "order" => 0, "href" => OCP\Util::linkTo( "files", "index.php" ), "icon" => OCP\Util::imagePath( "core", "places/home.svg" ), "name" => $l->t("Files") )); | |||
OC_Search::registerProvider('OC_Search_Provider_File'); | |||
if(!file_exists(OC::$SERVERROOT.'/remote/webdav.php')){ | |||
file_put_contents(OC::$SERVERROOT.'/remote/webdav.php', file_get_contents(OC::$APPSROOT . '/apps/files/appinfo/remote.php')); | |||
} | |||
OCP\CONFIG::setAppValue('core', 'webdav', '/apps/files/appinfo/remote.php'); |
@@ -22,12 +22,8 @@ | |||
* 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'); | |||
require_once('../lib/base.php'); | |||
// Backends | |||
$authBackend = new OC_Connector_Sabre_Auth(); | |||
@@ -38,7 +34,7 @@ $publicDir = new OC_Connector_Sabre_Directory(''); | |||
// Fire up server | |||
$server = new Sabre_DAV_Server($publicDir); | |||
$server->setBaseUri(OC::$WEBROOT.'/remote/webdav.php'); | |||
$server->setBaseUri($baseuri); | |||
// Load plugins | |||
$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud')); |
@@ -44,7 +44,7 @@ if($not_installed) { | |||
// Handle WebDAV | |||
if($_SERVER['REQUEST_METHOD']=='PROPFIND'){ | |||
header('location: '.OC_Helper::linkToAbsolute('remote','webdav.php')); | |||
header('location: '.OC_Helper::linkToAbsolute('remote.php','webdav/')); | |||
exit(); | |||
} | |||
@@ -0,0 +1,16 @@ | |||
<?php | |||
$RUNTIME_NOSETUPFS = true; | |||
//$RUNTIME_NOAPPS = TRUE; | |||
require_once('lib/base.php'); | |||
$path_info = $_SERVER['PATH_INFO']; | |||
if (!$pos = strpos($path_info, '/', 1)) { | |||
$pos = strlen($path_info); | |||
} | |||
$service=substr($path_info, 1, $pos-1); | |||
$file = OCP\CONFIG::getAppValue('core', $service); | |||
if(is_null($file)){ | |||
//header('HTTP/1.0 404 Not Found'); | |||
exit; | |||
} | |||
$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/'; | |||
require_once(OC::$APPSROOT . $file); |
@@ -1,2 +0,0 @@ | |||
* | |||
!.gitignore |
@@ -47,7 +47,7 @@ | |||
<p class="personalblock"> | |||
<strong>WebDAV</strong> | |||
<code><?php echo OC_Helper::linkToAbsolute('remote', 'webdav.php'); ?></code><br /> | |||
<code><?php echo OC_Helper::linkToAbsolute('remote.php', 'webdav/'); ?></code><br /> | |||
<em><?php echo $l->t('use this address to connect to your ownCloud in your file manager');?></em> | |||
</p> | |||