Switch 'Handler_Public->rss' to ORM
This commit is contained in:
parent
b6ae280446
commit
7ea48f7a4b
|
@ -312,23 +312,20 @@ 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,
|
||||||
|
$offset, $search, $view_mode, $format, $order, $orig_guid, $start_ts);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($owner_id) {
|
header('HTTP/1.1 403 Forbidden');
|
||||||
$this->generate_syndicated_feed($owner_id, $feed, $is_cat, $limit,
|
|
||||||
$offset, $search, $view_mode, $format, $order, $orig_guid, $start_ts);
|
|
||||||
} else {
|
|
||||||
header('HTTP/1.1 403 Forbidden');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateTask() {
|
function updateTask() {
|
||||||
|
|
Loading…
Reference in New Issue