Version 5.0.6
This commit is contained in:
1 parent
a3a4a9ccbd
commit
b89858b2ff
1214 files changed
+92828
-14859
No files matched your search
@@ -225,7 +225,8 @@ abstract class Widget extends PermissionCache implements Customizable
|
||||
}
|
||||
|
||||
/* Number to show */
|
||||
$return['show'] = new Number( 'widget_feed_show', $this->configuration['widget_feed_show'] ?? 5, TRUE );
|
||||
$return['show'] = new Number( 'widget_feed_show', $this->configuration['widget_feed_show'] ?? 5, TRUE );
|
||||
$return['offset'] = new Number( 'widget_feed_offset', $this->configuration['widget_feed_offset'] ?? 0, false );
|
||||
|
||||
/* Date restrict */
|
||||
$options = array( 'unlimited' => -1 );
|
||||
@@ -503,13 +504,16 @@ abstract class Widget extends PermissionCache implements Customizable
|
||||
}
|
||||
}
|
||||
|
||||
$offset = $this->configuration['widget_feed_offset'] ?? 0;
|
||||
$limit = ( isset( $this->configuration['widget_feed_show'] ) AND $this->configuration['widget_feed_show'] ) ? $this->configuration['widget_feed_show'] : 5;
|
||||
|
||||
/* As the block config can try and search all rows in topics/records, etc, we can end up with a tmp table and block nested buffer on members table, so we just query members after separately */
|
||||
$skipPerms = ( !isset( $this->configuration['widget_feed_use_perms'] ) or $this->configuration['widget_feed_use_perms'] ) ? static::$skipPermissions : TRUE;
|
||||
$items = iterator_to_array( $class::getItemsWithPermission(
|
||||
$where, /* Where clause */
|
||||
( isset( $this->configuration['widget_feed_sort_on'] ) and isset( $this->configuration['widget_feed_sort_dir'] ) ) ? ( ( $this->configuration['widget_feed_sort_on'] == '_rand' ) ? $this->configuration['widget_feed_sort_on'] : ( $class::$databaseTable . '.' . $class::$databasePrefix . $this->configuration['widget_feed_sort_on'] . ' ' . $this->configuration['widget_feed_sort_dir'] ) ) : ( $class::$databaseTable . '.' . $class::$databasePrefix . $class::$databaseColumnMap['updated'] . ' DESC' ), /* Order */
|
||||
|
||||
( isset( $this->configuration['widget_feed_show'] ) AND $this->configuration['widget_feed_show'] ) ? $this->configuration['widget_feed_show'] : 5, /* Limit */
|
||||
[ $offset, $limit ], /* Limit */
|
||||
'read', /* Permission key to check against */
|
||||
$hidden, /* Whether or not to include hidden items */
|
||||
$class::SELECT_IDS_FIRST,
|
||||
|
||||
Reference in new issue
Block a user