blob: c48dfd2cc08ce3537e3d49ab680936c4dc52a771 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?php
/**
* @version $Header$
* @package articles
* @subpackage functions
*/
/**
* Initialization
*/
global $gContent;
require_once( ARTICLES_PKG_PATH.'BitArticle.php');
// 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();
}
if( empty( $gContent->mTopicId ) ) {
//handle legacy forms that use plain 'article' form variable name
} else {
$gContent->loadTopic();
}
$gBitSmarty->assign_by_ref( 'gContent', $gContent );
}
?>
|