Commit 87209663 authored by catch's avatar catch
Browse files

Issue #3203369 by jonathanshaw, andypost: EntityQuery accessCheck: aggregator module

(cherry picked from commit cb743398)
parent 79737c36
......@@ -144,7 +144,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
}
// Check for duplicate titles or URLs.
$query = $this->feedStorage->getQuery();
$query = $this->feedStorage->getQuery()->accessCheck(FALSE);
$condition = $query->orConditionGroup()
->condition('title', $feed['title'])
->condition('url', $feed['url']);
......
......@@ -53,7 +53,8 @@ public function loadByFeed($fid, $limit = NULL) {
* An array of the feed items.
*/
protected function executeFeedItemQuery(QueryInterface $query, $limit) {
$query->sort('timestamp', 'DESC')
$query->accessCheck(FALSE)
->sort('timestamp', 'DESC')
->sort('iid', 'DESC');
if (!empty($limit)) {
$query->pager($limit);
......
......@@ -259,6 +259,7 @@ public function postProcess(FeedInterface $feed) {
// Delete all items that are older than flush item timer.
$age = REQUEST_TIME - $aggregator_clear;
$result = $this->itemStorage->getQuery()
->accessCheck(FALSE)
->condition('fid', $feed->id())
->condition('timestamp', $age, '<')
->execute();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment