]> git.wh0rd.org - tt-rss.git/blobdiff - functions.php
localization updates
[tt-rss.git] / functions.php
index 336a6d4b9f991ec7642b675984d61a38610e200f..7a959153503cb44bea5736559c9ac38314e8627b 100644 (file)
                $feed_title = $qfh_ret[1];
                $feed_site_url = $qfh_ret[2];
                $last_error = $qfh_ret[3];
-               
+
+               if ($feed == -2) {
+                       $feed_site_url = article_publish_url($link);
+               }
+
                /// STOP //////////////////////////////////////////////////////////////////////////////////
 
                if (!$offset) {
                return sha1(uniqid(rand(), true));
        }
 
+       function article_publish_url($link) {
+
+               $url_path = 'http://' . $_SERVER["HTTP_HOST"] . \
+                       parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
+
+               $url_path .= "?op=publish&key=" . get_pref($link, "_PREFS_PUBLISH_KEY");
+
+               return $url_path;
+       }
+
 ?>