mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 16:26:59 +02:00
Correct an issue in Repeater that interfered with some file-upload situations in draft page versions
This commit is contained in:
@@ -416,6 +416,11 @@ class FieldtypePageTable extends FieldtypeMulti implements Module {
|
||||
if(count($sorts)) $items->sort($sorts);
|
||||
}
|
||||
|
||||
foreach($items as $item) {
|
||||
$item->setQuietly('_pageTableField', $field->id);
|
||||
$item->setQuietly('_pageTableParent', $page->id);
|
||||
}
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
|
@@ -111,12 +111,13 @@ class FieldtypeRepeater extends Fieldtype implements ConfigurableModule {
|
||||
if(!$fieldtype || !$fieldtype instanceof FieldtypeRepeater) continue;
|
||||
/** @var FieldtypeRepeater $fieldtype */
|
||||
$template = $fieldtype->getRepeaterTemplate($field);
|
||||
if(!$template) continue;
|
||||
if(__NAMESPACE__) {
|
||||
$template->setQuietly('pageClass', wireClassName($fieldtype->getPageClass()));
|
||||
} else {
|
||||
$template->setQuietly('pageClass', $fieldtype->getPageClass());
|
||||
}
|
||||
if(!$template) continue;
|
||||
$class = $fieldtype->getPageClass();
|
||||
if(__NAMESPACE__ && $class) $class = wireClassName($class);
|
||||
$_class = $template->get('pageClass');
|
||||
if($class === $_class) continue;
|
||||
$template->set('pageClass', $class);
|
||||
$template->save();
|
||||
}
|
||||
|
||||
if($this->wire('page')->process == 'ProcessPageEdit') {
|
||||
|
Reference in New Issue
Block a user