mirror of
https://github.com/friendica/friendica
synced 2025-01-08 20:04:43 +00:00
refactor chdir() call
This commit is contained in:
parent
126ec1977b
commit
bb0900093d
1 changed files with 1 additions and 10 deletions
|
@ -23,16 +23,7 @@ if (php_sapi_name() !== 'cli') {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure that Jetstream.php is executed from the base path of the installation
|
// Ensure that Jetstream.php is executed from the base path of the installation
|
||||||
if (!file_exists('index.php') && (sizeof((array)$_SERVER['argv']) != 0)) {
|
chdir(dirname(__DIR__));
|
||||||
$directory = dirname($_SERVER['argv'][0]);
|
|
||||||
|
|
||||||
if (substr($directory, 0, 1) != '/') {
|
|
||||||
$directory = $_SERVER['PWD'] . '/' . $directory;
|
|
||||||
}
|
|
||||||
$directory = realpath($directory . '/..');
|
|
||||||
|
|
||||||
chdir($directory);
|
|
||||||
}
|
|
||||||
|
|
||||||
require dirname(__DIR__) . '/vendor/autoload.php';
|
require dirname(__DIR__) . '/vendor/autoload.php';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue