From f3319f62949f873420d8ebe843b26cc66fc1314f 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 8765b176ac7..3c68429cbd4 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 68f6a5552d8..a4d2bb8692c 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 75a2d03fa7a..903b1fd6a76 100644 --- a/index.php +++ b/index.php @@ -34,8 +34,8 @@ if (version_compare(PHP_VERSION, '5.6.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 20e27e38ce7..13dfa0b3779 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 be0aff8add2..9efca14768e 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 575b509b012..5aec27ad981 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 45f65033056..dc57431e6c6 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 48fca3e8c38..2f86bc92bc6 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 d4c321be802..e5bd3bb8fed 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 e0db479d3e4..a4749bd8b5d 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();