summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorwjames5 <will@tekimaki.com>2007-06-15 20:14:10 +0000
committerwjames5 <will@tekimaki.com>2007-06-15 20:14:10 +0000
commitb0b7d72ebd576dd85a788e86590ae2fac01f9aef (patch)
treea1fe7480d69824718a5ece4d73cef2e4cabb87b2 /index.php
parentb5e377cabdd8900b848d4e4504eaf9a46fd2ec54 (diff)
downloadarticles-b0b7d72ebd576dd85a788e86590ae2fac01f9aef.tar.gz
articles-b0b7d72ebd576dd85a788e86590ae2fac01f9aef.tar.bz2
articles-b0b7d72ebd576dd85a788e86590ae2fac01f9aef.zip
fix center_list_articles so it actually displays articles when included as layout module - also fix query in getList and move list request params in index into the center_list_articles so that its all consolidated in one place
Diffstat (limited to 'index.php')
-rw-r--r--index.php31
1 files changed, 1 insertions, 30 deletions
diff --git a/index.php b/index.php
index 75d37ef..24879d2 100644
--- a/index.php
+++ b/index.php
@@ -1,5 +1,5 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_articles/index.php,v 1.22 2007/06/15 19:09:39 squareing Exp $
+// $Header: /cvsroot/bitweaver/_bit_articles/index.php,v 1.23 2007/06/15 20:14:10 wjames5 Exp $
// Copyright( c )2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
@@ -17,35 +17,6 @@ if( !empty( $_REQUEST['article_id'] ) ) {
header( "location: ".ARTICLES_PKG_URL."read.php?article_id=".( ( int )$_REQUEST['article_id'] ) );
}
-require_once( ARTICLES_PKG_PATH.'lookup_article_inc.php' );
-include_once( ARTICLES_PKG_PATH.'article_filter_inc.php' );
-
-if( $gBitUser->hasPermission( 'p_articles_admin' ) ) {
- $_REQUEST['status_id'] = !empty( $_REQUEST['status_id'] ) ? $_REQUEST['status_id'] : ARTICLE_STATUS_APPROVED;
- $_REQUEST['max_records'] = !empty( $_REQUEST['max_records'] ) ? $_REQUEST['max_records'] : $gBitSystem->getConfig( 'articles_max_list' );
- $_REQUEST['topic_id'] = !empty( $_REQUEST['topic_id'] ) ? $_REQUEST['topic_id'] : NULL;
- $_REQUEST['type_id'] = !empty( $_REQUEST['type_id'] ) ? $_REQUEST['type_id'] : NULL;
-
- $listHash = array();
- $gBitSmarty->assign( 'futures', $gContent->getFutureList( $listHash ));
-} else {
- $_REQUEST['status_id'] = ARTICLE_STATUS_APPROVED;
- $_REQUEST['max_records'] = $gBitSystem->getConfig( 'articles_max_list' );
-}
-if ( !empty( $_REQUEST['topic'] ) ) {
- $gBitSmarty->assign( 'topic', $_REQUEST['topic'] );
-}
-$articles = $gContent->getList( $_REQUEST );
-$gBitSmarty->assign( 'articles', $articles );
-$gBitSmarty->assign( 'listInfo', $_REQUEST['listInfo'] );
-
-// display submissions if we have the perm to approve them
-if( $gBitUser->hasPermission( 'p_articles_approve_submission' ) || ( $gBitSystem->isFeatureActive( 'articles_auto_approve' ) && $gBitUser->isRegistered() )) {
- $listHash = array( 'status_id' => ARTICLE_STATUS_PENDING );
- $submissions = $gContent->getList( $listHash );
- $gBitSmarty->assign( 'submissions', $submissions );
-}
-
// Display the template
$gDefaultCenter = 'bitpackage:articles/center_list_articles.tpl';
$gBitSmarty->assign_by_ref( 'gDefaultCenter', $gDefaultCenter );