From 6a6107f47020b443cb06817085a8f545d65622d2 Mon Sep 17 00:00:00 2001 From: lsces Date: Thu, 7 Jun 2012 20:48:22 +0100 Subject: Allow index page to handle a single article correctly. Was dropping back to list even if a valid article_id was supplied --- index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index af276d2..5e98842 100644 --- a/index.php +++ b/index.php @@ -9,12 +9,15 @@ require_once( '../kernel/setup_inc.php' ); // Is package installed and enabled $gBitSystem->verifyPackage( 'articles' ); +require_once( ARTICLES_PKG_PATH.'BitArticle.php' ); // Now check permissions to access this page $gBitSystem->verifyPermission( 'p_articles_read' ); if( !empty( $_REQUEST['article_id'] ) ) { - header( "location: ".BitArticle::getDisplayUrlFromHash( array ( 'article_id' => ( int )$_REQUEST['article_id'] ) ) ); + $param = array ( 'article_id' => ( int )$_REQUEST['article_id'] ); + header( "Location: ".BitArticle::getDisplayUrlFromHash( $param ) ); + exit; } // Display the template -- cgit v1.3