mirror of https://github.com/BOINC/boinc.git
server: fix bug that prevented PHP scripts from working
This commit is contained in:
parent
bc6cf03a89
commit
4208b640d6
|
@ -21,13 +21,17 @@
|
|||
|
||||
$generating_xml = false;
|
||||
|
||||
function project_dir() {
|
||||
return dirname(dirname(getcwd()));
|
||||
}
|
||||
|
||||
function web_stopped() {
|
||||
$d = dirname(dirname(dirname($_SERVER["SCRIPT_FILENAME"])));
|
||||
$d = project_dir();
|
||||
return file_exists("$d/stop_web");
|
||||
}
|
||||
|
||||
function sched_stopped() {
|
||||
$d = dirname(dirname(dirname($_SERVER["SCRIPT_FILENAME"])));
|
||||
$d = project_dir();
|
||||
return file_exists("$d/stop_sched");
|
||||
}
|
||||
|
||||
|
@ -68,7 +72,7 @@ $g_config = null;
|
|||
function get_config() {
|
||||
global $g_config;
|
||||
if ($g_config == null) {
|
||||
$d = dirname(dirname(dirname($_SERVER["SCRIPT_FILENAME"])));
|
||||
$d = project_dir();
|
||||
$g_config = file_get_contents("$d/config.xml");
|
||||
}
|
||||
return $g_config;
|
||||
|
|
Loading…
Reference in New Issue