From 6130c1dd61a75a4501e3d938f15587a640c2cd63 Mon Sep 17 00:00:00 2001 From: Max Kremmel Date: Tue, 31 Jan 2006 10:21:11 +0000 Subject: fix various article submission related issues --- index.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 57e1d56..bc2e70c 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,5 @@ isAdmin() || $gBitUser->hasPermission( 'bit_p_admin_cms' ) ) { $_REQUEST['topic_id'] = !empty( $_REQUEST['topic_id'] ) ? $_REQUEST['topic_id'] : NULL; $_REQUEST['type_id'] = !empty( $_REQUEST['type_id'] ) ? $_REQUEST['type_id'] : NULL; } else { - $_REQUEST['status_id'] = ARTICLE_STATUS_APPROVED; + $_REQUEST['status_id'] = ARTICLE_STATUS_APPROVED; $_REQUEST['max_records'] = $gBitSystem->mPrefs['max_articles']; } $articles = $gContent->getList( $_REQUEST ); -$gBitSmarty->assign_by_ref( 'articles', $articles['data'] ); +$gBitSmarty->assign( 'articles', $articles['data'] ); +$gBitSmarty->assign( 'listInfo', $_REQUEST['control'] ); + +// display submissions if we have the perm to approve them +if( $gBitUser->hasPermission( 'bit_p_approve_submission' ) ) { + $listHash = array( 'status_id' => ARTICLE_STATUS_PENDING ); + $submissions = $gContent->getList( $listHash ); + $gBitSmarty->assign( 'submissions', $submissions['data'] ); +} // Display the template $gDefaultCenter = 'bitpackage:articles/center_list_articles.tpl'; -- cgit v1.3