diff options
Diffstat (limited to 'includes/lookup_article_topic_inc.php')
| -rwxr-xr-x[-rw-r--r--] | includes/lookup_article_topic_inc.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/includes/lookup_article_topic_inc.php b/includes/lookup_article_topic_inc.php index 373164c..08b55fc 100644..100755 --- a/includes/lookup_article_topic_inc.php +++ b/includes/lookup_article_topic_inc.php @@ -9,20 +9,17 @@ * Initialization */ global $gContent; - require_once( ARTICLES_PKG_CLASS_PATH.'BitArticle.php'); +use Bitweaver\Articles\BitArticle; +use Bitweaver\Articles\BitArticleTopic; // if we already have a gContent, we assume someone else created it for us, and has properly loaded everything up. if( empty( $gContent ) || !is_object( $gContent ) ) { - if (!empty($_REQUEST['topic_id']) && is_numeric($_REQUEST['topic_id'])) { - $gContent = new BitArticleTopic( $_REQUEST['topic_id'] ); - } else { - $gContent = new BitArticleTopic(); - } + $gContent = ( !empty( $_REQUEST['topic_id'] ) && is_numeric( $_REQUEST['topic_id'] ) ) ? new BitArticleTopic( $_REQUEST['topic_id'] ) : new BitArticleTopic(); if( empty( $gContent->mTopicId ) ) { //handle legacy forms that use plain 'article' form variable name } else { $gContent->loadTopic(); } - $gBitSmarty->assignByRef( 'gContent', $gContent ); + $gBitSmarty->assign( 'gContent', $gContent ); } |
