_get_version:
- don't bother with git if open_basedir is enabled - check for SCRIPT_ROOT instead of TTRSS_.. anything because that would be set regardless of install method
This commit is contained in:
parent
7cfc30ac25
commit
9dabfbfa11
|
@ -308,6 +308,8 @@ class Config {
|
||||||
$ttrss_version["version"] = "UNKNOWN (Unsupported, Darwin)";
|
$ttrss_version["version"] = "UNKNOWN (Unsupported, Darwin)";
|
||||||
} else if (file_exists("$root_dir/version_static.txt")) {
|
} else if (file_exists("$root_dir/version_static.txt")) {
|
||||||
$this->version["version"] = trim(file_get_contents("$root_dir/version_static.txt")) . " (Unsupported)";
|
$this->version["version"] = trim(file_get_contents("$root_dir/version_static.txt")) . " (Unsupported)";
|
||||||
|
} else if (ini_get("open_basedir")) {
|
||||||
|
$this->version["version"] .= "UNKNOWN (Unsupported, open_basedir)";
|
||||||
} else if (is_dir("$root_dir/.git")) {
|
} else if (is_dir("$root_dir/.git")) {
|
||||||
$this->version = self::get_version_from_git($root_dir);
|
$this->version = self::get_version_from_git($root_dir);
|
||||||
|
|
||||||
|
@ -315,7 +317,7 @@ class Config {
|
||||||
user_error("Unable to determine version: " . $this->version["version"], E_USER_WARNING);
|
user_error("Unable to determine version: " . $this->version["version"], E_USER_WARNING);
|
||||||
|
|
||||||
$this->version["version"] = "UNKNOWN (Unsupported, Git error)";
|
$this->version["version"] = "UNKNOWN (Unsupported, Git error)";
|
||||||
} else if (!getenv("TTRSS_SELF_URL_PATH") || !file_exists("/.dockerenv")) {
|
} else if (!getenv("SCRIPT_ROOT") || !file_exists("/.dockerenv")) {
|
||||||
$this->version["version"] .= " (Unsupported)";
|
$this->version["version"] .= " (Unsupported)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue