From: Andrew Dolgov Date: Thu, 7 Aug 2008 03:26:23 +0000 (+0100) Subject: article_publish_link: calculate published feed in a different way (closes #214) X-Git-Tag: 1.2.26~29 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e274978132d8f50268c15b780d126a7bb413c6e0;p=tt-rss.git article_publish_link: calculate published feed in a different way (closes #214) --- diff --git a/functions.php b/functions.php index 5bb5ea38..e23590d7 100644 --- a/functions.php +++ b/functions.php @@ -5396,9 +5396,17 @@ function article_publish_url($link) { - $url_path = ($_SERVER['HTTPS'] != "on" ? 'http://' : 'https://') . $_SERVER["HTTP_HOST"] . parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH); + $url_path = ""; + + + if ($_SERVER['HTTPS'] != "on") { + $url_path = "http://"; + } else { + $url_path = "https://"; + } - $url_path .= "?op=publish&key=" . get_pref($link, "_PREFS_PUBLISH_KEY"); + $url_path .= $_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']); + $url_path .= "/backend.php?op=publish&key=" . get_pref($link, "_PREFS_PUBLISH_KEY"); return $url_path; }