Skip to content

Commit 6cb6fd9

Browse files
committed
fix: corrected ordering of log entries
1 parent 812c5d8 commit 6cb6fd9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

phpmyfaq/src/phpMyFAQ/Administration/AdminLogRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function getAll(): array
4747
$data = [];
4848

4949
$query = sprintf(
50-
'SELECT id, time, usr AS user, text, ip, hash, previous_hash FROM %sfaqadminlog ORDER BY id DESC',
50+
'SELECT id, time, usr AS user, text, ip, hash, previous_hash FROM %sfaqadminlog ORDER BY id ASC',
5151
Database::getTablePrefix(),
5252
);
5353

tests/phpMyFAQ/Administration/AdminLogTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public function testGetAll(): void
8484
$this->assertInstanceOf(AdminLogEntity::class, $entries[0]);
8585
$this->assertInstanceOf(AdminLogEntity::class, $entries[1]);
8686

87-
$this->assertEquals('bar', $entries[0]->getText());
88-
$this->assertEquals('foo', $entries[1]->getText());
87+
$this->assertEquals('bar', $entries[1]->getText());
88+
$this->assertEquals('foo', $entries[0]->getText());
8989
$this->assertEquals(-1, $entries[0]->getUserId());
9090
$this->assertEquals('127.0.0.1', $entries[0]->getIp());
9191
}

0 commit comments

Comments
 (0)