Commit cb743398 authored by catch's avatar catch
Browse files

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

parent b16784b6
...@@ -144,7 +144,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { ...@@ -144,7 +144,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
} }
// Check for duplicate titles or URLs. // Check for duplicate titles or URLs.
$query = $this->feedStorage->getQuery(); $query = $this->feedStorage->getQuery()->accessCheck(FALSE);
$condition = $query->orConditionGroup() $condition = $query->orConditionGroup()
->condition('title', $feed['title']) ->condition('title', $feed['title'])
->condition('url', $feed['url']); ->condition('url', $feed['url']);
......
...@@ -53,7 +53,8 @@ public function loadByFeed($fid, $limit = NULL) { ...@@ -53,7 +53,8 @@ public function loadByFeed($fid, $limit = NULL) {
* An array of the feed items. * An array of the feed items.
*/ */
protected function executeFeedItemQuery(QueryInterface $query, $limit) { protected function executeFeedItemQuery(QueryInterface $query, $limit) {
$query->sort('timestamp', 'DESC') $query->accessCheck(FALSE)
->sort('timestamp', 'DESC')
->sort('iid', 'DESC'); ->sort('iid', 'DESC');
if (!empty($limit)) { if (!empty($limit)) {
$query->pager($limit); $query->pager($limit);
......
...@@ -259,6 +259,7 @@ public function postProcess(FeedInterface $feed) { ...@@ -259,6 +259,7 @@ public function postProcess(FeedInterface $feed) {
// Delete all items that are older than flush item timer. // Delete all items that are older than flush item timer.
$age = REQUEST_TIME - $aggregator_clear; $age = REQUEST_TIME - $aggregator_clear;
$result = $this->itemStorage->getQuery() $result = $this->itemStorage->getQuery()
->accessCheck(FALSE)
->condition('fid', $feed->id()) ->condition('fid', $feed->id())
->condition('timestamp', $age, '<') ->condition('timestamp', $age, '<')
->execute(); ->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