diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-05-07 17:07:16 +0400 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-05-07 17:07:16 +0400 |
commit | 5904d5cf50ba5567fac40e6fa1f1ded6a9f48bcd (patch) | |
tree | 702cef4bef9929971a5f5baf1d79fa237c058fd7 /apps | |
parent | d032345191c57294d5723639f777692c85bd2b1a (diff) | |
parent | 1138df0f4b0cd2e151fa65670705a578c718a0c2 (diff) |
Merge branch 'remote.php'
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/calendar/appinfo/app.php | 4 | ||||
-rwxr-xr-x | apps/calendar/appinfo/remote.php | 6 | ||||
-rwxr-xr-x | apps/calendar/templates/calendar.php | 2 | ||||
-rwxr-xr-x | apps/calendar/templates/settings.php | 2 | ||||
-rwxr-xr-x | apps/contacts/appinfo/app.php | 4 | ||||
-rwxr-xr-x | apps/contacts/appinfo/remote.php | 5 | ||||
-rwxr-xr-x | apps/contacts/templates/index.php | 2 | ||||
-rwxr-xr-x | apps/contacts/templates/settings.php | 4 | ||||
-rwxr-xr-x | apps/files/appinfo/app.php | 6 | ||||
-rw-r--r-- | apps/files/appinfo/remote.php | 6 |
10 files changed, 11 insertions, 30 deletions
diff --git a/apps/calendar/appinfo/app.php b/apps/calendar/appinfo/app.php index 055066de0df..297d8e44b67 100755 --- a/apps/calendar/appinfo/app.php +++ b/apps/calendar/appinfo/app.php @@ -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')); -}
\ No newline at end of file +OCP\CONFIG::setAppValue('core', 'caldav', '/apps/calendar/appinfo/remote.php');
\ No newline at end of file diff --git a/apps/calendar/appinfo/remote.php b/apps/calendar/appinfo/remote.php index 32b454ee90c..7ff6a2fbbe2 100755 --- a/apps/calendar/appinfo/remote.php +++ b/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()); diff --git a/apps/calendar/templates/calendar.php b/apps/calendar/templates/calendar.php index 7e767e36732..19c9a4d8d76 100755 --- a/apps/calendar/templates/calendar.php +++ b/apps/calendar/templates/calendar.php @@ -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 diff --git a/apps/calendar/templates/settings.php b/apps/calendar/templates/settings.php index 0a325ccbc24..0d6c8735ecc 100755 --- a/apps/calendar/templates/settings.php +++ b/apps/calendar/templates/settings.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> diff --git a/apps/contacts/appinfo/app.php b/apps/contacts/appinfo/app.php index c8c1d779dae..216e89d5c09 100755 --- a/apps/contacts/appinfo/app.php +++ b/apps/contacts/appinfo/app.php @@ -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')); -}
\ No newline at end of file +OCP\CONFIG::setAppValue('core', 'carddav', '/apps/contacts/appinfo/remote.php');
\ No newline at end of file diff --git a/apps/contacts/appinfo/remote.php b/apps/contacts/appinfo/remote.php index 804c560e3d0..67006b77f97 100755 --- a/apps/contacts/appinfo/remote.php +++ b/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()); diff --git a/apps/contacts/templates/index.php b/apps/contacts/templates/index.php index c28b47e7c28..791e3ced26c 100755 --- a/apps/contacts/templates/index.php +++ b/apps/contacts/templates/index.php @@ -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> diff --git a/apps/contacts/templates/settings.php b/apps/contacts/templates/settings.php index 9dffdfb0e4f..ce14e52e0ce 100755 --- a/apps/contacts/templates/settings.php +++ b/apps/contacts/templates/settings.php @@ -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> diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php index 3f4e1705fb0..2cc2d48602c 100755 --- a/apps/files/appinfo/app.php +++ b/apps/files/appinfo/app.php @@ -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')); -}
\ No newline at end of file +OCP\CONFIG::setAppValue('core', 'webdav', '/apps/files/appinfo/remote.php');
\ No newline at end of file diff --git a/apps/files/appinfo/remote.php b/apps/files/appinfo/remote.php index defb97ab152..465e0c0a935 100644 --- a/apps/files/appinfo/remote.php +++ b/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')); |