From 891eada45d0ebb438778034c280f86ec934271d7 Mon Sep 17 00:00:00 2001 From: wjames5 Date: Fri, 27 Jul 2007 12:21:28 +0000 Subject: on user pages only show pending articles by that user --- templates/center_list_blog_posts.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'templates/center_list_blog_posts.php') diff --git a/templates/center_list_blog_posts.php b/templates/center_list_blog_posts.php index 3829f80..6e2d873 100644 --- a/templates/center_list_blog_posts.php +++ b/templates/center_list_blog_posts.php @@ -10,10 +10,17 @@ if( empty( $gContent )) { $gBitSmarty->assign_by_ref( 'gContent', $blogPost ); } -$futuresHash = array(); if( $gBitUser->hasPermission( 'p_blog_posts_read_future' ) || $gBitUser->isAdmin() ) { + $futuresHash = $_REQUEST; $futuresHash['max_records'] = !empty( $_REQUEST['max_records'] ) ? $_REQUEST['max_records'] : $gBitSystem->getConfig( 'blog_posts_max_list' ); $futuresHash['get_future'] = TRUE; + if( empty( $futuresHash['user_id'] )) { + if( !empty( $gQueryUserId )) { + $futuresHash['user_id'] = $gQueryUserId; + } elseif( $_REQUEST['user_id'] ) { + $futuresHash['user_id'] = $_REQUEST['user_id']; + } + } $futures = $gContent->getFutureList( $futuresHash ); $gBitSmarty->assign( 'futures', $futures['data']); } else { -- cgit v1.3