bugfixes for pagination and installation

This commit is contained in:
Joey Kimsey
2024-08-21 06:14:54 -04:00
parent 551f6654f6
commit 5c7a320c2a
23 changed files with 50 additions and 43 deletions

View File

@ -74,9 +74,9 @@ class Notification extends DatabaseModel {
'expiresAt', '<', time(),
];
if ( empty( $limit ) ) {
$notifications = self::$db->get( $this->tableName, $whereClause );
$notifications = self::$db->getPaginated( $this->tableName, $whereClause );
} else {
$notifications = self::$db->get( $this->tableName, $whereClause, 'ID', 'DESC', [0, $limit] );
$notifications = self::$db->getPaginated( $this->tableName, $whereClause, 'ID', 'DESC', [0, $limit] );
}
if ( !$notifications->count() ) {
Debug::info( 'No Notifications found.' );