mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 08:17:12 +02:00
Fix issue processwire/processwire-issues#1115
This commit is contained in:
@@ -946,7 +946,7 @@ class Pagefiles extends WireArray implements PageFieldValueInterface {
|
|||||||
$this->fieldsTemplate = false;
|
$this->fieldsTemplate = false;
|
||||||
/** @var FieldtypeFile $fieldtype */
|
/** @var FieldtypeFile $fieldtype */
|
||||||
$fieldtype = $field->type;
|
$fieldtype = $field->type;
|
||||||
$template = $fieldtype ? $fieldtype->getFieldsTemplate($field) : null;
|
$template = $fieldtype && $fieldtype instanceof FieldtypeFile ? $fieldtype->getFieldsTemplate($field) : null;
|
||||||
if($template) $this->fieldsTemplate = $template;
|
if($template) $this->fieldsTemplate = $template;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -619,8 +619,7 @@ class PagefilesManager extends Wire {
|
|||||||
if(!$key) continue; // first item, likely a filename, skip it
|
if(!$key) continue; // first item, likely a filename, skip it
|
||||||
break; // not first item means end of ID sequence
|
break; // not first item means end of ID sequence
|
||||||
}
|
}
|
||||||
$id = ltrim($part, '0'); // remove leading 0 and dash
|
$pageID = $part . $pageID;
|
||||||
$pageID = $id . $pageID;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (int) $pageID;
|
return (int) $pageID;
|
||||||
|
Reference in New Issue
Block a user