}
function last_error() {
- return mysqli_error();
+ return mysqli_error($this->link);
}
function last_query_error() {
$user_id = sprintf("%d", $user_id);
}
- if ($profile) {
- $profile_qpart = "AND profile = '$profile'";
- } else {
- $profile_qpart = "AND profile IS NULL";
- }
-
if (!$profile || get_schema_version() < 63) $profile = null;
$type_name = "";
$target = "target=\"_blank\"";
$reply .= "<a title=\"$last_updated\" $target href=\"$feed_site_url\">".
- truncate_string($feed_title, 30)."</a>";
+ truncate_string(strip_tags($feed_title), 30)."</a>";
if ($error) {
$error = htmlspecialchars($error);
}
} else {
- $reply .= $feed_title;
+ $reply .= strip_tags($feed_title);
}
$reply .= "</span>";
if ($vfeed_group_enabled) {
if ($feed_id != $vgroup_last_feed && $line["feed_title"]) {
- $cur_feed_title = $line["feed_title"];
$vgroup_last_feed = $feed_id;
- $cur_feed_title = htmlspecialchars($cur_feed_title);
-
$vf_catchup_link = "<a class='catchup' onclick='catchupFeedInGroup($feed_id);' href='#'>".__('mark feed as read')."</a>";
$reply['content'] .= "<div data-feed-id='$feed_id' id='FTITLE-$feed_id' class='cdmFeedTitle'>".
$tmp_content .= "</div>";
- if ($highlight_words && count($highlight_words > 0)) {
+ if ($highlight_words && count($highlight_words) > 0) {
foreach ($highlight_words as $word) {
$line["title"] = preg_replace("/(\Q$word\E)/i",
"<span class=\"highlight\">$1</span>", $line["title"]);
$url = key($feedUrls);
}
- if ($cat_id == "0" || !$cat_id) {
- $cat_qpart = "NULL";
- } else {
- $cat_qpart = "'$cat_id'";
- }
-
- if (!(int)$cat_id) $cat_id = null;
+ if (!$cat_id) $cat_id = null;
$sth = $pdo->prepare("SELECT id FROM ttrss_feeds
WHERE feed_url = ? AND owner_uid = ?");
} else {
return false;
}
-
- return false;
}
function get_commands() {
print $error_button;
print $inactive_button;
- if (defined('_ENABLE_FEED_DEBUGGING')) {
-
- print "<select id=\"feedActionChooser\" onchange=\"feedActionChange()\">
- <option value=\"facDefault\" selected>".__('More actions...')."</option>";
-
- if (FORCE_ARTICLE_PURGE == 0) {
- print
- "<option value=\"facPurge\">".__('Manual purge')."</option>";
- }
-
- print "
- <option value=\"facClear\">".__('Clear feed data')."</option>
- <option value=\"facRescore\">".__('Rescore articles')."</option>";
-
- print "</select>";
-
- }
-
print "</div>"; # toolbar
//print '</div>';
function index() {
- $sort = $_REQUEST["sort"];
-
- if (!$sort || $sort == "undefined") {
- $sort = "reg_exp";
- }
-
$filter_search = $_REQUEST["search"];
if (array_key_exists("search", $_REQUEST)) {
print "<div id=\"pref-filter-header\" dojoType=\"dijit.layout.ContentPane\" region=\"top\">";
print "<div id=\"pref-filter-toolbar\" dojoType=\"dijit.Toolbar\">";
- $filter_search = $_REQUEST["search"];
-
if (array_key_exists("search", $_REQUEST)) {
$_SESSION["prefs_filter_search"] = $filter_search;
} else {
foreach (array_keys($_POST) as $pref_name) {
- $pref_name = $pref_name;
$value = $_POST[$pref_name];
if ($pref_name == 'DIGEST_PREFERRED_TIME') {
$rss = new FeedParser($feed_data);
$rss->init();
- $feed = $feed;
-
if (!$rss->error()) {
// We use local pluginhost here because we need to load different per-user feed plugins