mirror of
https://github.com/processwire/processwire.git
synced 2025-08-06 23:06:59 +02:00
Fix issue processwire/processwire-issues#2025
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
* @method string renderList($value)
|
||||
* @method string renderUpload($value)
|
||||
* @method void fileAdded(Pagefile $pagefile)
|
||||
* @method array extractMetadata(Pagefile $pagefile, array $metadata = array())
|
||||
* @method array extractMetadata(Pagefile $pagefile, array $metadata = []) Given a Pagefile return array of meta data pulled from it
|
||||
* @method Pagefile|null processInputAddFile($filename)
|
||||
* @method void processInputDeleteFile(Pagefile $pagefile)
|
||||
* @method bool processInputFile(WireInputData $input, Pagefile $pagefile, $n)
|
||||
@@ -929,7 +929,7 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel
|
||||
* @return array Associative array of meta data (i.e. description and tags)
|
||||
*
|
||||
*/
|
||||
protected function ___extractMetadata(Pagefile $pagefile, array $metadata = array()) {
|
||||
protected function ___extractMetadata(Pagefile $pagefile, array $metadata = []) {
|
||||
|
||||
$languages = $this->wire()->languages;
|
||||
|
||||
@@ -1507,7 +1507,11 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel
|
||||
if($item) {
|
||||
$hasPage = $this->hasPage;
|
||||
if($hasPage && wireInstanceOf($hasPage, 'RepeaterPage')) {
|
||||
if(strpos($this->name, '_repeater') === false) {
|
||||
$process = $this->wire()->process;
|
||||
if($process instanceof WirePageEditor && $process->getPage()->id === $hasPage->id) {
|
||||
// repeater page being edited directly or in front-end modal
|
||||
// so no '_repeater' suffix is necessary here
|
||||
} else if(strpos($this->name, '_repeater') === false) {
|
||||
// ensures that custom fields are properly namespaced within repeater
|
||||
// though note that this prevents it from working when editing a repeater
|
||||
// page directly, independently of its forPage
|
||||
|
Reference in New Issue
Block a user