Skip to content
Snippets Groups Projects
Commit 0b40f2a0 authored by Alex Barth's avatar Alex Barth
Browse files

#760140 lyricnz: FeedsBatch->total not updated when addItem() is called.

parent 8c54da49
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
Feeds 6.x 1.0 xxxxxxxxxxxxxxxxxxxx Feeds 6.x 1.0 xxxxxxxxxxxxxxxxxxxx
---------------------------------- ----------------------------------
- #760140 lyricnz: FeedsBatch->total not updated when addItem($item) is called.
- #755544 Monkey Master: Keep batch processing when mapping fails. - #755544 Monkey Master: Keep batch processing when mapping fails.
- alex_b: Reset import schedule after deleting items from feed. - alex_b: Reset import schedule after deleting items from feed.
- #653412 rbrandon: Do not create items older than expiry time. - #653412 rbrandon: Do not create items older than expiry time.
......
...@@ -133,7 +133,9 @@ class FeedsImportBatch extends FeedsBatch { ...@@ -133,7 +133,9 @@ class FeedsImportBatch extends FeedsBatch {
* removed from the internal array. * removed from the internal array.
*/ */
public function shiftItem() { public function shiftItem() {
return array_shift($this->items); $item = array_shift($this->items);
$this->total = count($this->items);
return $item;
} }
/** /**
...@@ -165,7 +167,7 @@ class FeedsImportBatch extends FeedsBatch { ...@@ -165,7 +167,7 @@ class FeedsImportBatch extends FeedsBatch {
*/ */
public function setItems($items) { public function setItems($items) {
$this->items = $items; $this->items = $items;
$this->total = count($items); $this->total = count($this->items);
} }
/** /**
...@@ -173,5 +175,6 @@ class FeedsImportBatch extends FeedsBatch { ...@@ -173,5 +175,6 @@ class FeedsImportBatch extends FeedsBatch {
*/ */
public function addItem($item) { public function addItem($item) {
$this->items[] = $item; $this->items[] = $item;
$this->total = count($this->items);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment