From: Andrew Dolgov Date: Mon, 4 Dec 2017 07:39:50 +0000 (+0300) Subject: some (very minor) code cleanup in feeds class X-Git-Tag: 18.8~132 X-Git-Url: https://git.wh0rd.org/?p=tt-rss.git;a=commitdiff_plain;h=8f92a67e6f1831d9cf1e746ddf8a06cc065d94ce some (very minor) code cleanup in feeds class --- diff --git a/classes/feeds.php b/classes/feeds.php index 87830673..7b553146 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -339,6 +339,8 @@ class Feeds extends Handler_Protected { $label_cache = $line["label_cache"]; $labels = false; + $mouseover_attrs = "onmouseover='postMouseIn(event, $id)' onmouseout='postMouseOut($id)'"; + if ($label_cache) { $label_cache = json_decode($label_cache, true); @@ -367,29 +369,13 @@ class Feeds extends Handler_Protected { ++$num_unread; } - if ($line["marked"]) { - $marked_pic = "\"Unstar"; - $class .= " marked"; - } else { - $marked_pic = "\"Star"; - } + $marked_pic_src = $line["marked"] ? "mark_set.png" : "mark_unset.png"; + $class .= $line["marked"] ? " marked" : ""; + $marked_pic = ""; - if ($line["published"]) { - $published_pic = "\"Unpublish"; - $class .= " published"; - } else { - $published_pic = "\"Publish"; - } + $published_pic_src = $line["published"] ? "pub_set.png" : "pub_unset.png"; + $class .= $line["published"] ? " published" : ""; + $published_pic = ""; $updated_fmt = make_local_datetime($line["updated"], false, false, false, true); $date_entered_fmt = T_sprintf("Imported at %s", @@ -456,9 +442,6 @@ class Feeds extends Handler_Protected { } } - $mouseover_attrs = "onmouseover='postMouseIn(event, $id)' - onmouseout='postMouseOut($id)'"; - $reply['content'] .= "
"; $reply['content'] .= "
"; @@ -551,9 +534,6 @@ class Feeds extends Handler_Protected { } } - $mouseover_attrs = "onmouseover='postMouseIn(event, $id)' - onmouseout='postMouseOut($id)'"; - $expanded_class = $expand_cdm ? "expanded" : "expandable"; $tmp_content = "