]> git.wh0rd.org - tt-rss.git/blobdiff - classes/article.php
fix sharebyurl identifying articles by link instead of special synthesized guid which...
[tt-rss.git] / classes / article.php
index 1198eefa95cc3ebd7624c981df33b8ab4fe791e5..9aef107ec1e9a0d5a96b4a2985bdc06b4ff7eb23 100644 (file)
@@ -30,7 +30,6 @@ class Article extends Handler_Protected {
                $id = $this->dbh->escape_string($_REQUEST["id"]);
                $cids = explode(",", $this->dbh->escape_string($_REQUEST["cids"]));
                $mode = $this->dbh->escape_string($_REQUEST["mode"]);
-               $omode = $this->dbh->escape_string($_REQUEST["omode"]);
 
                // in prefetch mode we only output requested cids, main article
                // just gets marked as read (it already exists in client cache)
@@ -44,7 +43,7 @@ class Article extends Handler_Protected {
                } else if ($mode == "raw") {
                        if ($_REQUEST['html']) {
                                header("Content-Type: text/html");
-                               print '<link rel="stylesheet" type="text/css" href="tt-rss.css"/>';
+                               print '<link rel="stylesheet" type="text/css" href="css/tt-rss.css"/>';
                        }
 
                        $article = format_article($id, false);
@@ -108,7 +107,7 @@ class Article extends Handler_Protected {
 
                // only check for our user data here, others might have shared this with different content etc
                $result = db_query("SELECT id FROM ttrss_entries, ttrss_user_entries WHERE
-                       link = '$url' AND ref_id = id AND owner_uid = '$owner_uid' LIMIT 1");
+                       guid = '$guid' AND ref_id = id AND owner_uid = '$owner_uid' LIMIT 1");
 
                if (db_num_rows($result) != 0) {
                        $ref_id = db_fetch_result($result, 0, "id");
@@ -215,7 +214,7 @@ class Article extends Handler_Protected {
                $this->dbh->query("UPDATE ttrss_user_entries SET
                        score = '$score' WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]);
 
-               print json_encode(array("id" => $id,
+               print json_encode(array("id" => $ids,
                        "score_pic" => get_score_pic($score)));
        }