mirror of
https://github.com/processwire/processwire.git
synced 2025-08-14 18:55:56 +02:00
Fix issue processwire/processwire-issues#1148
This commit is contained in:
@@ -374,7 +374,7 @@ class FieldtypeFile extends FieldtypeMulti implements ConfigurableModule {
|
|||||||
|
|
||||||
if($isNew) {
|
if($isNew) {
|
||||||
$pagefile->createdUser = $this->wire('user');
|
$pagefile->createdUser = $this->wire('user');
|
||||||
$pagefile->created = time();
|
if(!$pagefile->isTemp()) $pagefile->created = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($isChanged || $isNew) {
|
if($isChanged || $isNew) {
|
||||||
@@ -382,7 +382,7 @@ class FieldtypeFile extends FieldtypeMulti implements ConfigurableModule {
|
|||||||
unset($changes['hash'], $changes['sort'], $changes['modified'], $changes['modified_users_id']);
|
unset($changes['hash'], $changes['sort'], $changes['modified'], $changes['modified_users_id']);
|
||||||
if($isNew || count($changes)) {
|
if($isNew || count($changes)) {
|
||||||
$pagefile->modifiedUser = $this->wire('user');
|
$pagefile->modifiedUser = $this->wire('user');
|
||||||
$pagefile->modified = time();
|
if(!$pagefile->isTemp()) $pagefile->modified = time();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user