print "<html>
<head>
- <link rel=\"stylesheet\" href=\"utility.css\" type=\"text/css\">
+ <link rel=\"stylesheet\" href=\"css/utility.css\" type=\"text/css\">
<title>".__("OPML Utility")."</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>
</head>
$html_url_qpart = "";
}
- $out .= "<outline text=\"$title\" xmlUrl=\"$url\" $html_url_qpart/>\n";
+ $out .= "<outline type=\"rss\" text=\"$title\" xmlUrl=\"$url\" $html_url_qpart/>\n";
}
if ($cat_title) $out .= "</outline>\n";
WHERE owner_uid = ".$_SESSION["uid"]." ORDER BY id");
while ($line = $this->dbh->fetch_assoc($result)) {
- foreach (array('enabled', 'match_any_rule') as $b) {
+ foreach (array('enabled', 'match_any_rule', 'inverse') as $b) {
$line[$b] = sql_bool_to_bool($line[$b]);
}
}
$tmp_line["cat_filter"] = sql_bool_to_bool($tmp_line["cat_filter"]);
+ $tmp_line["inverse"] = sql_bool_to_bool($tmp_line["inverse"]);
unset($tmp_line["feed_id"]);
unset($tmp_line["cat_id"]);
$feed_title = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('text')->nodeValue, 0, 250));
if (!$feed_title) $feed_title = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('title')->nodeValue, 0, 250));
- $feed_url = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('xmlUrl')->nodeValue, 0, 250));
- if (!$feed_url) $feed_url = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('xmlURL')->nodeValue, 0, 250));
+ $feed_url = $this->dbh->escape_string($attrs->getNamedItem('xmlUrl')->nodeValue);
+ if (!$feed_url) $feed_url = $this->dbh->escape_string($attrs->getNamedItem('xmlURL')->nodeValue);
$site_url = $this->dbh->escape_string(mb_substr($attrs->getNamedItem('htmlUrl')->nodeValue, 0, 250));
if ($filter) {
$match_any_rule = bool_to_sql_bool($filter["match_any_rule"]);
$enabled = bool_to_sql_bool($filter["enabled"]);
+ $inverse = bool_to_sql_bool($filter["inverse"]);
+ $title = db_escape_string($filter["title"]);
$this->dbh->query("BEGIN");
- $this->dbh->query("INSERT INTO ttrss_filters2 (match_any_rule,enabled,owner_uid)
- VALUES ($match_any_rule, $enabled,".$_SESSION["uid"].")");
+ $this->dbh->query("INSERT INTO ttrss_filters2 (match_any_rule,enabled,inverse,title,owner_uid)
+ VALUES ($match_any_rule, $enabled, $inverse, '$title',
+ ".$_SESSION["uid"].")");
$result = $this->dbh->query("SELECT MAX(id) AS id FROM ttrss_filters2 WHERE
owner_uid = ".$_SESSION["uid"]);
$cat_filter = bool_to_sql_bool($rule["cat_filter"]);
$reg_exp = $this->dbh->escape_string($rule["reg_exp"]);
$filter_type = (int)$rule["filter_type"];
+ $inverse = bool_to_sql_bool($rule["inverse"]);
- $this->dbh->query("INSERT INTO ttrss_filters2_rules (feed_id,cat_id,filter_id,filter_type,reg_exp,cat_filter)
- VALUES ($feed_id, $cat_id, $filter_id, $filter_type, '$reg_exp', $cat_filter)");
+ $this->dbh->query("INSERT INTO ttrss_filters2_rules (feed_id,cat_id,filter_id,filter_type,reg_exp,cat_filter,inverse)
+ VALUES ($feed_id, $cat_id, $filter_id, $filter_type, '$reg_exp', $cat_filter,$inverse)");
}
foreach ($filter["actions"] as $action) {