From 9b49585a9b0393e9a90f911c38565e88f98dfe0d Mon Sep 17 00:00:00 2001 From: spiderr Date: Thu, 28 Jan 2021 14:14:57 -0500 Subject: empty check on module_rows in mod_recent_posts --- modules/mod_recent_posts.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/mod_recent_posts.php b/modules/mod_recent_posts.php index b116202..d39a93d 100644 --- a/modules/mod_recent_posts.php +++ b/modules/mod_recent_posts.php @@ -21,7 +21,12 @@ if( !empty( $moduleParams ) ) { extract( $moduleParams ); } -$listHash = array( 'user_id' => $gQueryUserId, 'sort_mode' => 'created_desc', 'max_records' => $module_rows ); +$listHash = array( 'user_id' => $gQueryUserId, 'sort_mode' => 'created_desc' ); + +if( !empty( $moduleParams['module_rows'] ) ) { + $listHash['max_records'] = $moduleParams['module_rows']; +} + if( !empty( $module_params['b'] ) ) { $listHash['board_id'] = $module_params['b']; } elseif( !empty( $_REQUEST['b'] ) && empty( $module_params['all_boards'] ) ) { -- cgit v1.3