mirror of
https://github.com/processwire/processwire.git
synced 2025-08-07 07:16:51 +02:00
Fix issue processwire/processwire-issues#2030
This commit is contained in:
@@ -175,16 +175,17 @@ class RepeaterPageArray extends PageArray {
|
|||||||
|
|
||||||
if(is_null($page)) {
|
if(is_null($page)) {
|
||||||
// no ready item available, get a new one
|
// no ready item available, get a new one
|
||||||
$page = $fieldtype->getBlankRepeaterPage($this->forPage, $this->field);
|
$page = $fieldtype->getBlankRepeaterPage($this->forPage, $this->field);
|
||||||
|
$page->sort = $this->count();
|
||||||
$this->add($page);
|
$this->add($page);
|
||||||
} else {
|
} else {
|
||||||
|
$page->sort = $this->count();
|
||||||
$this->trackChange('add');
|
$this->trackChange('add');
|
||||||
}
|
}
|
||||||
|
|
||||||
$page->of(false);
|
$page->of(false);
|
||||||
$page->removeStatus(Page::statusUnpublished);
|
$page->removeStatus(Page::statusUnpublished);
|
||||||
$page->removeStatus(Page::statusHidden);
|
$page->removeStatus(Page::statusHidden);
|
||||||
$page->sort = $this->count();
|
|
||||||
|
|
||||||
if($of) $this->forPage->of(true);
|
if($of) $this->forPage->of(true);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user