1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-11 09:14:58 +02:00

Correct an issue in Repeater that interfered with some file-upload situations in draft page versions

This commit is contained in:
Ryan Cramer
2017-10-17 05:33:32 -04:00
parent 2771c353ee
commit fff501cac3
2 changed files with 12 additions and 6 deletions

View File

@@ -416,6 +416,11 @@ class FieldtypePageTable extends FieldtypeMulti implements Module {
if(count($sorts)) $items->sort($sorts); if(count($sorts)) $items->sort($sorts);
} }
foreach($items as $item) {
$item->setQuietly('_pageTableField', $field->id);
$item->setQuietly('_pageTableParent', $page->id);
}
return $items; return $items;
} }

View File

@@ -111,12 +111,13 @@ class FieldtypeRepeater extends Fieldtype implements ConfigurableModule {
if(!$fieldtype || !$fieldtype instanceof FieldtypeRepeater) continue; if(!$fieldtype || !$fieldtype instanceof FieldtypeRepeater) continue;
/** @var FieldtypeRepeater $fieldtype */ /** @var FieldtypeRepeater $fieldtype */
$template = $fieldtype->getRepeaterTemplate($field); $template = $fieldtype->getRepeaterTemplate($field);
if(!$template) continue; if(!$template) continue;
if(__NAMESPACE__) { $class = $fieldtype->getPageClass();
$template->setQuietly('pageClass', wireClassName($fieldtype->getPageClass())); if(__NAMESPACE__ && $class) $class = wireClassName($class);
} else { $_class = $template->get('pageClass');
$template->setQuietly('pageClass', $fieldtype->getPageClass()); if($class === $_class) continue;
} $template->set('pageClass', $class);
$template->save();
} }
if($this->wire('page')->process == 'ProcessPageEdit') { if($this->wire('page')->process == 'ProcessPageEdit') {