1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 03:15:56 +00:00

do not use regexps in get_self_url_prefix()

This commit is contained in:
Andrew Dolgov
2012-12-09 13:32:09 +04:00
parent be1af6703f
commit 51cc387347

View File

@@ -3405,9 +3405,12 @@
return $tag;
}
// we need to placate idiots who don't know any better
function get_self_url_prefix() {
return preg_replace("/\/$/", "", SELF_URL_PATH);
if (strrpos(SELF_URL_PATH, "/") === strlen(SELF_URL_PATH)-1) {
return substr(SELF_URL_PATH, 0, strlen(SELF_URL_PATH)-1);
} else {
return SELF_URL_PATH;
}
}
function opml_publish_url($link){