Switch 'Handler_Public->rss' to ORM
This commit is contained in:
parent
b6ae280446
commit
7ea48f7a4b
|
@ -312,25 +312,22 @@ class Handler_Public extends Handler {
|
||||||
UserHelper::authenticate("admin", null);
|
UserHelper::authenticate("admin", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
$owner_id = false;
|
|
||||||
|
|
||||||
if ($key) {
|
if ($key) {
|
||||||
$sth = $this->pdo->prepare("SELECT owner_uid FROM
|
$access_key = ORM::for_table('ttrss_access_keys')
|
||||||
ttrss_access_keys WHERE access_key = ? AND feed_id = ?");
|
->select('owner_uid')
|
||||||
$sth->execute([$key, $feed]);
|
->where(['access_key' => $key, 'feed_id' => $feed])
|
||||||
|
->find_one();
|
||||||
|
|
||||||
if ($row = $sth->fetch())
|
if ($access_key) {
|
||||||
$owner_id = $row["owner_uid"];
|
$this->generate_syndicated_feed($access_key->owner_uid, $feed, $is_cat, $limit,
|
||||||
}
|
|
||||||
|
|
||||||
if ($owner_id) {
|
|
||||||
$this->generate_syndicated_feed($owner_id, $feed, $is_cat, $limit,
|
|
||||||
$offset, $search, $view_mode, $format, $order, $orig_guid, $start_ts);
|
$offset, $search, $view_mode, $format, $order, $orig_guid, $start_ts);
|
||||||
} else {
|
return;
|
||||||
header('HTTP/1.1 403 Forbidden');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header('HTTP/1.1 403 Forbidden');
|
||||||
|
}
|
||||||
|
|
||||||
function updateTask() {
|
function updateTask() {
|
||||||
PluginHost::getInstance()->run_hooks(PluginHost::HOOK_UPDATE_TASK);
|
PluginHost::getInstance()->run_hooks(PluginHost::HOOK_UPDATE_TASK);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue