print "<html>
<head>
- <link rel=\"stylesheet\" href=\"css/utility.css\" type=\"text/css\">
+ ".stylesheet_tag("css/default.css")."
<title>".__("OPML Utility")."</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>
</head>
- <body>
+ <body class='claro ttrss_utility'>
<div class=\"floatingLogo\"><img src=\"images/logo_small.png\"></div>
<h1>".__('OPML Utility')."</h1><div class='content'>";
$site_url = mb_substr($attrs->getNamedItem('htmlUrl')->nodeValue, 0, 250);
- if ($feed_url && $feed_title) {
+ if ($feed_url) {
$sth = $this->pdo->prepare("SELECT id FROM ttrss_feeds WHERE
feed_url = ? AND owner_uid = ?");
$sth->execute([$feed_url, $owner_uid]);
+ if (!$feed_title) $feed_title = '[Unknown]';
+
if (!$sth->fetch()) {
#$this->opml_notice("[FEED] [$feed_title/$feed_url] dst_CAT=$cat_id");
- $this->opml_notice(T_sprintf("Adding feed: %s", $feed_title));
+ $this->opml_notice(T_sprintf("Adding feed: %s", $feed_title == '[Unknown]' ? $feed_url : $feed_title));
if (!$cat_id) $cat_id = null;
$sth->execute([$feed_title, $feed_url, $owner_uid, $cat_id, $site_url]);
} else {
- $this->opml_notice(T_sprintf("Duplicate feed: %s", $feed_title));
+ $this->opml_notice(T_sprintf("Duplicate feed: %s", $feed_title == '[Unknown]' ? $feed_url : $feed_title));
}
}
}
$inverse = bool_to_sql_bool($filter["inverse"]);
$title = $filter["title"];
- print "F: $title, $inverse, $enabled, $match_any_rule";
+ //print "F: $title, $inverse, $enabled, $match_any_rule";
$sth = $this->pdo->prepare("INSERT INTO ttrss_filters2 (match_any_rule,enabled,inverse,title,owner_uid)
VALUES (?, ?, ?, ?, ?)");