bootstrap 4 update and bugfixes

This commit is contained in:
Joey Kimsey
2024-12-08 04:43:06 -05:00
parent 485d85cb0a
commit 4ab9d33b01
79 changed files with 861 additions and 504 deletions

View File

@ -257,7 +257,7 @@ class Group extends DatabaseModel {
if ( $group === false ) {
return false;
}
$members = self::$db->getPaginated( 'users', [ 'userGroup', '=', $id ] );
$members = self::$db->get( 'users', [ 'userGroup', '=', $id ] );
if ( !$members->count() ) {
Debug::info( "list members: Could not find anyone in group: $id" );
return false;

View File

@ -87,7 +87,7 @@ class Log extends DatabaseModel {
}
public function list( $filter = null ) {
$logData = self::$db->getPaginated( $this->tableName, [ 'source', '=', $filter ] );
$logData = self::$db->get( $this->tableName, [ 'source', '=', $filter ] );
if ( !$logData->count() ) {
return false;
}

View File

@ -128,7 +128,7 @@ class Routes extends DatabaseModel {
}
$routeData = self::$db->get( $this->tableName, [ 'nickname', '=', $name ] );
if ( !$routeData->count() ) {
Debug::warn( "Could not find a group named: $name" );
Debug::info( "Routes:findByName: Could not find a route named: $name" );
return false;
}
return $this->filter( $routeData->first() );
@ -137,7 +137,7 @@ class Routes extends DatabaseModel {
public function findByOriginalUrl( $url ) {
$routeData = self::$db->get( $this->tableName, [ 'original_url', '=', $url ] );
if ( !$routeData->count() ) {
Debug::warn( "Could not find route by original url: $url" );
Debug::info( "Routes:findByOriginalUrl: Could not find route by original url: $url" );
return false;
}
return $this->filter( $routeData->first() );
@ -145,12 +145,12 @@ class Routes extends DatabaseModel {
public function findByforwardedUrl( $url ) {
if ( !Check::url( $url ) ) {
Debug::warn( "Invalid forwarded_url: $url" );
Debug::warn( "Routes:findByforwardedUrl: Invalid forwarded_url: $url" );
return false;
}
$routeData = self::$db->get( $this->tableName, [ 'forwarded_url', '=', $url ] );
if ( !$routeData->count() ) {
Debug::warn( "Could not find route by forwarded url: $url" );
Debug::info( "Routes:findByforwardedUrl: Could not find route by forwarded url: $url" );
return false;
}
return $this->filter( $routeData->first() );

View File

@ -446,7 +446,7 @@ class User extends DatabaseModel {
*/
public function recent( $limit = null ) {
if ( empty( $limit ) ) {
$data = self::$db->getpaginated( $this->tableName, '*' );
$data = self::$db->get( $this->tableName, '*' );
} else {
$data = self::$db->get( $this->tableName, [ 'ID', '>', '0' ], 'ID', 'DESC', [ 0, $limit ] );
}