unset($rule["feed_id"]);
}
- if (isset($rule["feed_id"])) {
+ if (isset($rule["feed_id"]) && $rule['feed_id'] > 0) {
array_push($scope_qparts, "feed_id = " . $rule["feed_id"]);
- }
-
- if (isset($rule["cat_id"])) {
- array_push($scope_qparts, "cat_id = " . $rule["feed_id"]);
+ } else if (isset($rule["cat_id"])) {
+ array_push($scope_qparts, "cat_id = " . $rule["cat_id"]);
+ } else {
+ array_push($scope_qparts, "true");
}
array_push($filter["rules"], $rule);
print "<div class=\"filterTestHolder\">";
print "<table width=\"100%\" cellspacing=\"0\" id=\"prefErrorFeedList\">";
- $glue = $filter['match_any_rule'] ? " AND " : "OR ";
+ $glue = $filter['match_any_rule'] ? " OR " : " AND ";
$scope_qpart = join($glue, $scope_qparts);
+ if (!$scope_qpart) $scope_qpart = "true";
+
while ($found < $limit && $offset < $limit * 10 && time() - $started < ini_get("max_execution_time") * 0.7) {
$result = db_query("SELECT ttrss_entries.id,
ttrss_entries.title,
ttrss_feeds.id AS feed_id,
+ ttrss_feeds.title AS feed_title,
ttrss_feed_categories.id AS cat_id,
content,
link,
$content_preview = $line["content_preview"];
- if ($line["feed_title"]) $feed_title = $line["feed_title"];
+ if ($line["feed_title"]) $feed_title = "(" . $line["feed_title"] . ")";
print "<tr>";
checked=\"1\" disabled=\"1\" type=\"checkbox\"></td>";
print "<td>";
- foreach ($filter['rules'] as $rule) {
+ /*foreach ($filter['rules'] as $rule) {
$reg_exp = $rule['reg_exp'];
$reg_exp = str_replace('/', '\/', $rule["reg_exp"]);
$content_preview = preg_replace("/($reg_exp)/i",
"<span class=\"highlight\">$1</span>", $content_preview);
- }
+ }*/
print $line["title"];
- print " (";
- print "<b>" . $feed_title . "</b>";
- print "): ";
- print "<span class=\"insensitive\">" . $content_preview . "</span>";
+ print "<div class='small' style='float : right'>" . $feed_title . "</div>";
+ print "<div class=\"insensitive\">" . $content_preview . "</div>";
print " " . mb_substr($line["date_entered"], 0, 16);
print "</td></tr>";
$action["action_id"] == 7)
$title .= ": " . $action["action_param"];
+ if ($action["action_id"] == 9) {
+ list ($pfclass, $pfaction) = explode(":", $action["action_param"]);
+
+ $filter_actions = PluginHost::getInstance()->get_filter_actions();
+
+ foreach ($filter_actions as $fclass => $factions) {
+ foreach ($factions as $faction) {
+ if ($pfaction == $faction["action"] && $pfclass == $fclass) {
+ $title .= ": " . $fclass . ": " . $faction["description"];
+ break;
+ }
+ }
+ }
+ }
+
return $title;
}
print "</select>";
- $param_box_hidden = ($action_id == 7 || $action_id == 4 || $action_id == 6) ?
+ $param_box_hidden = ($action_id == 7 || $action_id == 4 || $action_id == 6 || $action_id == 9) ?
"" : "display : none";
$param_hidden = ($action_id == 4 || $action_id == 6) ?
"" : "display : none";
$label_param_hidden = ($action_id == 7) ? "" : "display : none";
+ $plugin_param_hidden = ($action_id == 9) ? "" : "display : none";
print "<span id=\"filterDlg_paramBox\" style=\"$param_box_hidden\">";
- print " " . __("with parameters:") . " ";
+ print " ";
+ //print " " . __("with parameters:") . " ";
print "<input dojoType=\"dijit.form.TextBox\"
id=\"filterDlg_actionParam\" style=\"$param_hidden\"
name=\"action_param\" value=\"$action_param\">";
"id=\"filterDlg_actionParamLabel\" style=\"$label_param_hidden\"
dojoType=\"dijit.form.Select\"");
+ $filter_actions = PluginHost::getInstance()->get_filter_actions();
+ $filter_action_hash = array();
+
+ foreach ($filter_actions as $fclass => $factions) {
+ foreach ($factions as $faction) {
+
+ $filter_action_hash[$fclass . ":" . $faction["action"]] =
+ $fclass . ": " . $faction["description"];
+ }
+
+ }
+
+ print_select_hash("filterDlg_actionParamPlugin", $action_param, $filter_action_hash,
+ "style=\"$plugin_param_hidden\" dojoType=\"dijit.form.Select\"",
+ "action_param_plugin");
+
print "</span>";
print " "; // tiny layout hack