]> git.wh0rd.org - tt-rss.git/commitdiff
article_publish_link: calculate published feed in a different way (closes #214)
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 7 Aug 2008 03:26:23 +0000 (04:26 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 7 Aug 2008 03:26:23 +0000 (04:26 +0100)
functions.php

index 5bb5ea3860fb03cf663482d0c661d8176339f3b6..e23590d7444c017e51ae3ffcbb4926f37d1dbbd5 100644 (file)
 
        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;
        }