mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-18 01:21:29 +00:00
sanity check: better suggestion for SELF_URL_PATH
This commit is contained in:
@@ -2,6 +2,12 @@
|
|||||||
// WARNING: Don't ask for help on tt-rss.org forums or the bugtracker if you have
|
// WARNING: Don't ask for help on tt-rss.org forums or the bugtracker if you have
|
||||||
// modified this file.
|
// modified this file.
|
||||||
|
|
||||||
|
function make_self_url_path() {
|
||||||
|
$url_path = ($_SERVER['HTTPS'] != "on" ? 'http://' : 'https://') . $_SERVER["HTTP_HOST"] . parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
|
||||||
|
|
||||||
|
return $url_path;
|
||||||
|
}
|
||||||
|
|
||||||
function initial_sanity_check($link) {
|
function initial_sanity_check($link) {
|
||||||
|
|
||||||
$errors = array();
|
$errors = array();
|
||||||
@@ -69,12 +75,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (SELF_URL_PATH == "http://yourserver/tt-rss/") {
|
if (SELF_URL_PATH == "http://yourserver/tt-rss/") {
|
||||||
if ($_SERVER['HTTP_REFERER']) {
|
$urlpath = preg_replace("/\w+\.php$/", "", make_self_url_path());
|
||||||
|
|
||||||
array_push($errors,
|
array_push($errors,
|
||||||
"Please set SELF_URL_PATH to the correct value for your server (possible value: <b>" . $_SERVER['HTTP_REFERER'] . "</b>)");
|
"Please set SELF_URL_PATH to the correct value for your server (possible value: <b>$urlpath</b>)");
|
||||||
} else {
|
|
||||||
array_push($errors, "Please set SELF_URL_PATH to the correct value for your server.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_writable(ICONS_DIR)) {
|
if (!is_writable(ICONS_DIR)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user