summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}