From e274978132d8f50268c15b780d126a7bb413c6e0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 7 Aug 2008 04:26:23 +0100 Subject: [PATCH] article_publish_link: calculate published feed in a different way (closes #214) --- functions.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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; } -- 2.39.2