From: Joas Schilling Date: Thu, 6 Oct 2016 10:13:02 +0000 (+0200) Subject: Allow to call the files even when you are in another instance atm X-Git-Tag: v10.0.2~106^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=53de74fe825788834af3c799b9a0eaa98dac4809;p=nextcloud-server.git Allow to call the files even when you are in another instance atm Signed-off-by: Joas Schilling --- 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 26fc18f3aab..e72d38cd768 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 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 0ea3ac4c766..2d1e70238c1 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 a24bb30456e..7d1a50f935c 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();