mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Update timestamp of the associated element.
For example the lastModified timestamp of a part is now updated, when the user changes a price information. This should represent more what a user expects under a last Modified field and should improve also sorting...
This commit is contained in:
parent
2b21d4039a
commit
dbf770f784
7 changed files with 68 additions and 4 deletions
|
@ -120,6 +120,14 @@ abstract class AbstractParameter extends AbstractNamedDBElement
|
|||
}
|
||||
}
|
||||
|
||||
public function updateTimestamps(): void
|
||||
{
|
||||
parent::updateTimestamps();
|
||||
if ($this->element instanceof AbstractNamedDBElement) {
|
||||
$this->element->updateTimestamps();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the element this parameter belongs to.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue