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;
}