summaryrefslogtreecommitdiff
path: root/include/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions.php')
-rw-r--r--include/functions.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/functions.php b/include/functions.php
index 95881dd9e..53aaa92b3 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -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){