diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-05-06 00:54:14 +0400 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-05-06 00:54:14 +0400 |
commit | c996600786080c54ba853ac8311fafdd3e814e78 (patch) | |
tree | fac953a1e831f5305690be1dd5ac814b83daa726 | |
parent | 6c2fc0cbe853027e265fdf9f1b05b75c5f92c187 (diff) |
push changes
-rwxr-xr-x | apps/calendar/appinfo/app.php | 4 | ||||
-rwxr-xr-x | apps/calendar/appinfo/remote.php | 6 | ||||
-rwxr-xr-x | apps/contacts/appinfo/app.php | 4 | ||||
-rwxr-xr-x | apps/contacts/appinfo/remote.php | 3 | ||||
-rwxr-xr-x | apps/files/appinfo/app.php | 6 | ||||
-rw-r--r-- | apps/files/appinfo/remote.php | 4 | ||||
-rw-r--r-- | remote.php | 12 |
7 files changed, 16 insertions, 23 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/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..13b90745ae7 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'); 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 3ac0023fb84..6d54a4baed2 100644 --- a/apps/files/appinfo/remote.php +++ b/apps/files/appinfo/remote.php @@ -23,10 +23,6 @@ * */ -// Do not load FS ... -$RUNTIME_NOSETUPFS = true; -require_once('../lib/base.php'); - // only need filesystem apps $RUNTIME_APPTYPES=array('filesystem','authentication'); diff --git a/remote.php b/remote.php new file mode 100644 index 00000000000..e11b72ee8c2 --- /dev/null +++ b/remote.php @@ -0,0 +1,12 @@ +<?php +$RUNTIME_NOSETUPFS = true; +//$RUNTIME_NOAPPS = TRUE; +require_once('lib/base.php'); +$file = OCP\CONFIG::getAppValue('core', $_GET['service']); +if(is_null($file)){ + header('HTTP/1.0 404 Not Found'); + exit; +} +$baseuri = OC::$WEBROOT . '/remote.php?service=' . $_GET['service'] . '&p='; +parse_str($_GET['p'], $_GET); +require_once(OC::$APPSROOT . $file);
\ No newline at end of file |