Version 4.7.13
This commit is contained in:
1 parent
fd22d99e69
commit
7124a02564
954 files changed
+29277
-59308
No files matched your search
@@ -452,8 +452,8 @@ class _Content extends Table
|
||||
{
|
||||
$itemIds[] = $item->$idField;
|
||||
}
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_reputation_index', array( 'rep_class=? AND ' . \IPS\Db::i()->in( 'item_id', $itemIds ), $class::$commentClass ) ) as $react )
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_reputation_index', array( 'rep_class=? AND ' . \IPS\Db::i()->in( 'item_id', $itemIds ), $class::$commentClass ), NULL, 1000 ) as $react )
|
||||
{
|
||||
$reactions[ $react['item_id'] ][] = $react;
|
||||
}
|
||||
@@ -1078,7 +1078,7 @@ class _Content extends Table
|
||||
$class = $this->class;
|
||||
|
||||
/* ID and Title columns should be ascending */
|
||||
if( $column != $this->defaultSortBy AND ( $column == $class::$databaseColumnId OR $column == $class::$databaseColumnMap[ 'title' ] ) )
|
||||
if( isset( $class::$databaseColumnMap[ 'title' ] ) AND $column != $this->defaultSortBy AND ( $column == $class::$databaseColumnId OR $column == $class::$databaseColumnMap[ 'title' ] ) )
|
||||
{
|
||||
return 'asc';
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ class _Db extends Table
|
||||
}
|
||||
|
||||
/* Count results (for pagination) */
|
||||
$count = $this->db->select( 'count(*)', $this->table, $where );
|
||||
$count = $this->db->select( 'count(*)', $this->table, $where, NULL, NULL, $this->groupBy );
|
||||
if ( \count( $this->joins ) )
|
||||
{
|
||||
foreach( $this->joins as $join )
|
||||
@@ -324,7 +324,9 @@ class _Db extends Table
|
||||
$count->join( $join['from'], ( isset( $join['where'] ) ? $join['where'] : null ), ( isset( $join['type'] ) ) ? $join['type'] : 'LEFT' );
|
||||
}
|
||||
}
|
||||
$count = $count->first();
|
||||
|
||||
$count = $this->groupBy ? $count->count() : $count->first();
|
||||
|
||||
$selectPrefix = ( $this->groupBy ) ? '' : $this->table . '.*, ';
|
||||
|
||||
/* Now get column headers */
|
||||
|
||||
Reference in new issue
Block a user