Fixing tests
This commit is contained in:
parent
324cce7a19
commit
d77b043d9c
|
@ -38,14 +38,14 @@ class History
|
||||||
public static function add(int $uri_id, array $item)
|
public static function add(int $uri_id, array $item)
|
||||||
{
|
{
|
||||||
$allfields = DBStructure::definition('', false);
|
$allfields = DBStructure::definition('', false);
|
||||||
$fields = array_keys($allfields['post-history']['fields']);
|
$fields = array_keys($allfields['post-history']['fields']);
|
||||||
|
|
||||||
$post = Post::selectFirstPost($fields, ['uri-id' => $uri_id]);
|
$post = Post::selectFirstPost($fields, ['uri-id' => $uri_id]);
|
||||||
if (empty($post)) {
|
if (empty($post)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$update = false;
|
$update = false;
|
||||||
$changed = DBStructure::getFieldsForTable('post-history', $item);
|
$changed = DBStructure::getFieldsForTable('post-history', $item);
|
||||||
unset($changed['uri-id']);
|
unset($changed['uri-id']);
|
||||||
unset($changed['edited']);
|
unset($changed['edited']);
|
||||||
|
|
Loading…
Reference in a new issue