summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-08-07 04:26:23 +0100
committerAndrew Dolgov <[email protected]>2008-08-07 04:26:23 +0100
commite274978132d8f50268c15b780d126a7bb413c6e0 (patch)
tree36f9756631f10f047caf740e3542bf4945a3df91 /functions.php
parent143a497306aea0198c1dae4c03ac8ca344e37f55 (diff)
article_publish_link: calculate published feed in a different way (closes #214)
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/functions.php b/functions.php
index 5bb5ea386..e23590d74 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;
}