From 21ce7d9ec02b0bf7c6e0ac7c28bc7c1bb0a841c5 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 26 Apr 2017 20:57:36 +0300 Subject: update phpmd ruleset to use (subset) of cleancode fix various minor issues reported by static analysis remove redundant php closing tag from several more files --- plugins/share/init.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins/share') diff --git a/plugins/share/init.php b/plugins/share/init.php index a028c057b..133f09447 100644 --- a/plugins/share/init.php +++ b/plugins/share/init.php @@ -78,7 +78,7 @@ class Share extends Plugin { function shareArticle() { $param = db_escape_string($_REQUEST['param']); - $result = db_query("SELECT uuid, ref_id FROM ttrss_user_entries WHERE int_id = '$param' + $result = db_query("SELECT uuid FROM ttrss_user_entries WHERE int_id = '$param' AND owner_uid = " . $_SESSION['uid']); if (db_num_rows($result) == 0) { @@ -86,7 +86,6 @@ class Share extends Plugin { } else { $uuid = db_fetch_result($result, 0, "uuid"); - $ref_id = db_fetch_result($result, 0, "ref_id"); if (!$uuid) { $uuid = db_escape_string(uniqid_short()); @@ -127,5 +126,4 @@ class Share extends Plugin { return 2; } -} -?> +} \ No newline at end of file -- cgit v1.2.3