Skip to content

Commit b05c1f3

Browse files
authored
Merge pull request #1638 from nextcloud/allow-cross-repository-execution
Allow to call the files even when you are in another instance atm
2 parents 55e72ca + f3319f6 commit b05c1f3

10 files changed

Lines changed: 11 additions & 11 deletions

File tree

console.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function exceptionHandler($exception) {
4545
exit(1);
4646
}
4747
try {
48-
require_once 'lib/base.php';
48+
require_once __DIR__ . '/lib/base.php';
4949

5050
// set to run indefinitely if needed
5151
set_time_limit(0);

cron.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
try {
3434

35-
require_once 'lib/base.php';
35+
require_once __DIR__ . '/lib/base.php';
3636

3737
if (\OCP\Util::needUpgrade()) {
3838
\OCP\Util::writeLog('cron', 'Update required, skipping cron', \OCP\Util::DEBUG);

index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
}
3535

3636
try {
37-
38-
require_once 'lib/base.php';
37+
38+
require_once __DIR__ . '/lib/base.php';
3939

4040
OC::handleRequest();
4141

ocs-provider/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
*/
2121

22-
require_once('../lib/base.php');
22+
require_once __DIR__ . '/../lib/base.php';
2323

2424
header('Content-Type: application/json');
2525

ocs/providers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
*/
2525

26-
require_once '../lib/base.php';
26+
require_once __DIR__ . '/../lib/base.php';
2727

2828
header('Content-type: application/xml');
2929

ocs/v1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*
3030
*/
3131

32-
require_once '../lib/base.php';
32+
require_once __DIR__ . '/../lib/base.php';
3333

3434
if (\OCP\Util::needUpgrade()
3535
|| \OC::$server->getSystemConfig()->getValue('maintenance', false)

ocs/v2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
*
2121
*/
2222

23-
require_once 'v1.php';
23+
require_once __DIR__ . '/v1.php';

public.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030
try {
3131

32-
require_once 'lib/base.php';
32+
require_once __DIR__ . '/lib/base.php';
3333
if (\OCP\Util::needUpgrade()) {
3434
// since the behavior of apps or remotes are unpredictable during
3535
// an upgrade, return a 503 directly

remote.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function resolveService($service) {
107107
}
108108

109109
try {
110-
require_once 'lib/base.php';
110+
require_once __DIR__ . '/lib/base.php';
111111

112112
// All resources served via the DAV endpoint should have the strictest possible
113113
// policy. Exempted from this is the SabreDAV browser plugin which overwrites

status.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
try {
3131

32-
require_once 'lib/base.php';
32+
require_once __DIR__ . '/lib/base.php';
3333

3434
$systemConfig = \OC::$server->getSystemConfig();
3535

0 commit comments

Comments
 (0)