From 53de74fe825788834af3c799b9a0eaa98dac4809 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 6 Oct 2016 12:13:02 +0200 Subject: [PATCH] Allow to call the files even when you are in another instance atm Signed-off-by: Joas Schilling --- console.php | 2 +- cron.php | 2 +- index.php | 4 ++-- ocs-provider/index.php | 2 +- ocs/providers.php | 2 +- ocs/v1.php | 2 +- ocs/v2.php | 2 +- public.php | 2 +- remote.php | 2 +- status.php | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/console.php b/console.php index 8765b176ac..3c68429cbd 100644 --- a/console.php +++ b/console.php @@ -45,7 +45,7 @@ function exceptionHandler($exception) { exit(1); } try { - require_once 'lib/base.php'; + require_once __DIR__ . '/lib/base.php'; // set to run indefinitely if needed set_time_limit(0); diff --git a/cron.php b/cron.php index 68f6a5552d..a4d2bb8692 100644 --- a/cron.php +++ b/cron.php @@ -32,7 +32,7 @@ try { - require_once 'lib/base.php'; + require_once __DIR__ . '/lib/base.php'; if (\OCP\Util::needUpgrade()) { \OCP\Util::writeLog('cron', 'Update required, skipping cron', \OCP\Util::DEBUG); diff --git a/index.php b/index.php index 26fc18f3aa..e72d38cd76 100644 --- a/index.php +++ b/index.php @@ -42,8 +42,8 @@ if (version_compare(PHP_VERSION, '7.1.0') !== -1) { } try { - - require_once 'lib/base.php'; + + require_once __DIR__ . '/lib/base.php'; OC::handleRequest(); diff --git a/ocs-provider/index.php b/ocs-provider/index.php index 20e27e38ce..13dfa0b377 100644 --- a/ocs-provider/index.php +++ b/ocs-provider/index.php @@ -19,7 +19,7 @@ * */ -require_once('../lib/base.php'); +require_once __DIR__ . '/../lib/base.php'; header('Content-Type: application/json'); diff --git a/ocs/providers.php b/ocs/providers.php index be0aff8add..9efca14768 100644 --- a/ocs/providers.php +++ b/ocs/providers.php @@ -23,7 +23,7 @@ * */ -require_once '../lib/base.php'; +require_once __DIR__ . '/../lib/base.php'; header('Content-type: application/xml'); diff --git a/ocs/v1.php b/ocs/v1.php index 0ea3ac4c76..2d1e70238c 100644 --- a/ocs/v1.php +++ b/ocs/v1.php @@ -29,7 +29,7 @@ * */ -require_once '../lib/base.php'; +require_once __DIR__ . '/../lib/base.php'; if (\OCP\Util::needUpgrade() || \OC::$server->getSystemConfig()->getValue('maintenance', false) diff --git a/ocs/v2.php b/ocs/v2.php index 45f6503305..dc57431e6c 100644 --- a/ocs/v2.php +++ b/ocs/v2.php @@ -20,4 +20,4 @@ * */ -require_once 'v1.php'; +require_once __DIR__ . '/v1.php'; diff --git a/public.php b/public.php index 48fca3e8c3..2f86bc92bc 100644 --- a/public.php +++ b/public.php @@ -29,7 +29,7 @@ */ try { - require_once 'lib/base.php'; + require_once __DIR__ . '/lib/base.php'; if (\OCP\Util::needUpgrade()) { // since the behavior of apps or remotes are unpredictable during // an upgrade, return a 503 directly diff --git a/remote.php b/remote.php index d4c321be80..e5bd3bb8fe 100644 --- a/remote.php +++ b/remote.php @@ -107,7 +107,7 @@ function resolveService($service) { } try { - require_once 'lib/base.php'; + require_once __DIR__ . '/lib/base.php'; // All resources served via the DAV endpoint should have the strictest possible // policy. Exempted from this is the SabreDAV browser plugin which overwrites diff --git a/status.php b/status.php index a24bb30456..7d1a50f935 100644 --- a/status.php +++ b/status.php @@ -29,7 +29,7 @@ try { - require_once 'lib/base.php'; + require_once __DIR__ . '/lib/base.php'; $systemConfig = \OC::$server->getSystemConfig();