mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-19 17:01:30 +00:00
filter_test: fix per-feed filter testing; misc tweaks
This commit is contained in:
@@ -19,22 +19,27 @@
|
|||||||
|
|
||||||
$filters[$type_name] = array($filter);
|
$filters[$type_name] = array($filter);
|
||||||
|
|
||||||
if ($feed_id != "NULL")
|
if ($feed_id)
|
||||||
$feed = $feed_id;
|
$feed = $feed_id;
|
||||||
else
|
else
|
||||||
$feed = -4;
|
$feed = -4;
|
||||||
|
|
||||||
$feed_title = getFeedTitle($line, $feed);
|
$feed_title = getFeedTitle($link, $feed);
|
||||||
|
|
||||||
$qfh_ret = queryFeedHeadlines($link, $feed,
|
$qfh_ret = queryFeedHeadlines($link, $feed,
|
||||||
300, "", false, false, false,
|
300, "", false, false, false,
|
||||||
false, "updated DESC", 0, $_SESSION["uid"]);
|
false, "date_entered DESC", 0, $_SESSION["uid"]);
|
||||||
|
|
||||||
$result = $qfh_ret[0];
|
$result = $qfh_ret[0];
|
||||||
|
|
||||||
$articles = array();
|
$articles = array();
|
||||||
$found = 0;
|
$found = 0;
|
||||||
|
|
||||||
|
print __("Articles matching this filter:");
|
||||||
|
|
||||||
|
print "<div class=\"inactiveFeedHolder\">";
|
||||||
|
print "<table width=\"100%\" cellspacing=\"0\" id=\"prefErrorFeedList\">";
|
||||||
|
|
||||||
while ($line = db_fetch_assoc($result)) {
|
while ($line = db_fetch_assoc($result)) {
|
||||||
|
|
||||||
$entry_timestamp = strtotime($line["updated"]);
|
$entry_timestamp = strtotime($line["updated"]);
|
||||||
@@ -52,8 +57,20 @@
|
|||||||
if ($line["feed_title"])
|
if ($line["feed_title"])
|
||||||
$feed_title = $line["feed_title"];
|
$feed_title = $line["feed_title"];
|
||||||
|
|
||||||
array_push($articles, array("title" => $line["title"],
|
print "<tr>";
|
||||||
"content" => $content_preview, "feed" => $feed_title));
|
|
||||||
|
print "<td width='5%' align='center'><input
|
||||||
|
dojoType=\"dijit.form.CheckBox\" checked=\"1\"
|
||||||
|
disabled=\"1\" type=\"checkbox\"></td>";
|
||||||
|
print "<td>";
|
||||||
|
|
||||||
|
print $line["title"];
|
||||||
|
print " (";
|
||||||
|
print "<b>" . $feed_title . "</b>";
|
||||||
|
print "): ";
|
||||||
|
print "<span class=\"insensitive\">" . $content_preview . "</span>";
|
||||||
|
|
||||||
|
print "</td></tr>";
|
||||||
|
|
||||||
$found++;
|
$found++;
|
||||||
}
|
}
|
||||||
@@ -63,34 +80,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($found == 0) {
|
if ($found == 0) {
|
||||||
print __("No recent articles matching this filter has been found.");
|
print "<tr><td align='center'>" .
|
||||||
} else {
|
__("No recent articles matching this filter has been found.") . "</td></tr>";
|
||||||
|
|
||||||
print __("Recent articles matching this filter:");
|
|
||||||
|
|
||||||
print "<div class=\"inactiveFeedHolder\">";
|
|
||||||
print "<table width=\"100%\" cellspacing=\"0\" id=\"prefErrorFeedList\">";
|
|
||||||
|
|
||||||
foreach ($articles as $article) {
|
|
||||||
print "<tr>";
|
|
||||||
|
|
||||||
print "<td width='5%' align='center'><input
|
|
||||||
dojoType=\"dijit.form.CheckBox\" checked=\"1\"
|
|
||||||
disabled=\"1\"
|
|
||||||
type=\"checkbox\"></td>";
|
|
||||||
print "<td>";
|
|
||||||
|
|
||||||
print $article["title"];
|
|
||||||
print " (";
|
|
||||||
print "<b>" . $article["feed"] . "</b>";
|
|
||||||
print "): ";
|
|
||||||
print "<span class=\"insensitive\">" . $article["content"] . "</span>";
|
|
||||||
|
|
||||||
print "</td></tr>";
|
|
||||||
}
|
|
||||||
print "</table>";
|
|
||||||
print "</div>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "</table>";
|
||||||
|
print "</div>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function module_pref_filters($link) {
|
function module_pref_filters($link) {
|
||||||
@@ -410,7 +406,7 @@
|
|||||||
|
|
||||||
filter_test($link, $filter_type, $reg_exp,
|
filter_test($link, $filter_type, $reg_exp,
|
||||||
$action_id, $action_param, $filter_param, sql_bool_to_bool($inverse),
|
$action_id, $action_param, $filter_param, sql_bool_to_bool($inverse),
|
||||||
$feed_id);
|
(int) $_REQUEST["feed_id"]);
|
||||||
|
|
||||||
print "<div align='center'>";
|
print "<div align='center'>";
|
||||||
print "<button dojoType=\"dijit.form.Button\"
|
print "<button dojoType=\"dijit.form.Button\"
|
||||||
@@ -487,7 +483,7 @@
|
|||||||
|
|
||||||
filter_test($link, $filter_type, $regexp,
|
filter_test($link, $filter_type, $regexp,
|
||||||
$action_id, $action_param, $filter_param, sql_bool_to_bool($inverse),
|
$action_id, $action_param, $filter_param, sql_bool_to_bool($inverse),
|
||||||
$feed_id);
|
(int) $_REQUEST["feed_id"]);
|
||||||
|
|
||||||
print "<div align='center'>";
|
print "<div align='center'>";
|
||||||
print "<button dojoType=\"dijit.form.Button\"
|
print "<button dojoType=\"dijit.form.Button\"
|
||||||
|
|||||||
Reference in New Issue
Block a user