mirror of
https://github.com/friendica/friendica
synced 2025-04-23 21:10:12 +00:00
Fix missing notifications:
- Add namecache in enotify - Add "unset()" in notify repository for additional field "abort" - Add possibility for additional, non-saved fields in model
This commit is contained in:
parent
977248f510
commit
443e106105
4 changed files with 44 additions and 2 deletions
|
@ -48,9 +48,23 @@ abstract class BaseModel
|
|||
$this->originalData = $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps a data array (original/current) to a known field list of the chosen model
|
||||
*
|
||||
* This is useful to filter out additional attributes, which aren't part of the db-table (like readonly cached fields)
|
||||
*
|
||||
* @param array $data The data array to map to db-fields
|
||||
*
|
||||
* @return array the mapped data array
|
||||
*/
|
||||
protected function mapFields(array $data)
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getOriginalData()
|
||||
{
|
||||
return $this->originalData;
|
||||
return $this->mapFields($this->originalData);
|
||||
}
|
||||
|
||||
public function resetOriginalData()
|
||||
|
@ -117,7 +131,7 @@ abstract class BaseModel
|
|||
|
||||
public function toArray()
|
||||
{
|
||||
return $this->data;
|
||||
return $this->mapFields($this->data);
|
||||
}
|
||||
|
||||
protected function checkValid()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue