while ($line = $this->dbh->fetch_assoc($result)) {
- $label_id = label_to_feed_id($line['id']);
+ $label_id = Labels::label_to_feed_id($line['id']);
$feed = $this->feedlist_init_feed($label_id, false, 0);
owner_uid = " . $_SESSION["uid"]);
}
- $order_id = 0;
+ $order_id = 1;
$cat = $data_map[$item_id];
<button class=\"danger\" dojoType=\"dijit.form.Button\" onclick='return unsubscribeFeed($feed_id, \"$title\")'>".
__('Unsubscribe')."</button>";
- if (PUBSUBHUBBUB_ENABLED) {
- $pubsub_state = $this->dbh->fetch_result($result, 0, "pubsub_state");
- $pubsub_btn_disabled = ($pubsub_state == 2) ? "" : "disabled=\"1\"";
-
- print "<button dojoType=\"dijit.form.Button\" id=\"pubsubReset_Btn\" $pubsub_btn_disabled
- onclick='return resetPubSub($feed_id, \"$title\")'>".__('Resubscribe to push updates').
- "</button>";
- }
-
print "</div>";
- print "<div dojoType=\"dijit.Tooltip\" connectId=\"pubsubReset_Btn\" position=\"below\">".
- __('Resets PubSubHubbub subscription status for push-enabled feeds.')."</div>";
-
print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('feedEditDlg').execute()\">".__('Save')."</button>
<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('feedEditDlg').hide()\">".__('Cancel')."</button>
</div>";
WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
if ($reset_basic_info) {
- require_once "rssfuncs.php";
-
- set_basic_feed_info($feed_id);
+ RSSUtils::set_basic_feed_info($feed_id);
}
PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_SAVE_FEED,
return;
}
- function resetPubSub() {
-
- $ids = $this->dbh->escape_string($_REQUEST["ids"]);
-
- $this->dbh->query("UPDATE ttrss_feeds SET pubsub_state = 0 WHERE id IN ($ids)
- AND owner_uid = " . $_SESSION["uid"]);
-
- return;
- }
-
function remove() {
$ids = explode(",", $this->dbh->escape_string($_REQUEST["ids"]));
}
function rescore() {
- require_once "rssfuncs.php";
-
$ids = explode(",", $this->dbh->escape_string($_REQUEST["ids"]));
foreach ($ids as $id) {
$tags = Article::get_article_tags($line["ref_id"]);
- $article_filters = get_article_filters($filters, $line['title'],
+ $article_filters = RSSUtils::get_article_filters($filters, $line['title'],
$line['content'], $line['link'], strtotime($line['updated']),
$line['author'], $tags);
- $new_score = calculate_article_score($article_filters);
+ $new_score = RSSUtils::calculate_article_score($article_filters);
if (!$scores[$new_score]) $scores[$new_score] = array();
$tags = Article::get_article_tags($line["ref_id"]);
- $article_filters = get_article_filters($filters, $line['title'],
+ $article_filters = RSSUtils::get_article_filters($filters, $line['title'],
$line['content'], $line['link'], strtotime($line['updated']),
$line['author'], $tags);
- $new_score = calculate_article_score($article_filters);
+ $new_score = RSSUtils::calculate_article_score($article_filters);
if (!$scores[$new_score]) $scores[$new_score] = array();
print "<button onclick='window.navigator.registerContentHandler(" .
"\"application/vnd.mozilla.maybe.feed\", " .
- "\"" . add_feed_url() . "\", " . " \"Tiny Tiny RSS\")'>" .
+ "\"" . $this->subscribe_to_feed_url() . "\", " . " \"Tiny Tiny RSS\")'>" .
__('Click here to register this site as a feed reader.') .
"</button>";
CCache::remove($id, $owner_uid);
} else {
- label_remove(feed_to_label_id($id), $owner_uid);
+ Labels::remove(Labels::feed_to_label_id($id), $owner_uid);
//CCache::remove($id, $owner_uid); don't think labels are cached
}
}
print (int) $this->dbh->fetch_result($result, 0, "num_inactive");
}
+
+ static function subscribe_to_feed_url() {
+ $url_path = get_self_url_prefix() .
+ "/public.php?op=subscribe&feed_url=%s";
+ return $url_path;
+ }
+
}
\ No newline at end of file