mirror of
https://github.com/slawkens/myaac.git
synced 2026-01-12 01:21:30 +01:00
Fix created column on player save
This commit is contained in:
@@ -267,9 +267,6 @@ class OTS_Player extends OTS_Row_DAO
|
|||||||
$values = [];
|
$values = [];
|
||||||
foreach ($columns as $column) {
|
foreach ($columns as $column) {
|
||||||
$value = $this->data[$column];
|
$value = $this->data[$column];
|
||||||
if ($column == 'created') {
|
|
||||||
$value = time();
|
|
||||||
}
|
|
||||||
|
|
||||||
$values[$column] = $value;
|
$values[$column] = $value;
|
||||||
}
|
}
|
||||||
@@ -280,7 +277,10 @@ class OTS_Player extends OTS_Row_DAO
|
|||||||
}
|
}
|
||||||
// creates new player
|
// creates new player
|
||||||
else {
|
else {
|
||||||
|
$values['created'] = time();
|
||||||
|
|
||||||
$player = PlayerModel::create($values);
|
$player = PlayerModel::create($values);
|
||||||
|
|
||||||
// ID of new group
|
// ID of new group
|
||||||
$this->data['id'] = $player->id;
|
$this->data['id'] = $player->id;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user