mirror of
https://github.com/friendica/friendica
synced 2025-01-03 18:02:18 +00:00
Do the directory change only when it is needed.
This commit is contained in:
parent
96c642661e
commit
6d8c126179
1 changed files with 7 additions and 8 deletions
|
@ -1,7 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
if (sizeof($_SERVER["argv"]) == 0)
|
if (!file_exists("boot.php") AND (sizeof($_SERVER["argv"]) != 0)) {
|
||||||
die();
|
|
||||||
|
|
||||||
$directory = dirname($_SERVER["argv"][0]);
|
$directory = dirname($_SERVER["argv"][0]);
|
||||||
|
|
||||||
if (substr($directory, 0, 1) != "/")
|
if (substr($directory, 0, 1) != "/")
|
||||||
|
@ -10,6 +8,7 @@ if (substr($directory, 0, 1) != "/")
|
||||||
$directory = realpath($directory."/..");
|
$directory = realpath($directory."/..");
|
||||||
|
|
||||||
chdir($directory);
|
chdir($directory);
|
||||||
|
}
|
||||||
|
|
||||||
require_once("boot.php");
|
require_once("boot.php");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue