diff options
Diffstat (limited to 'includes/lookup_post_inc.php')
| -rw-r--r-- | includes/lookup_post_inc.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/includes/lookup_post_inc.php b/includes/lookup_post_inc.php new file mode 100644 index 0000000..12d52ce --- /dev/null +++ b/includes/lookup_post_inc.php @@ -0,0 +1,28 @@ +<?php +/** + * @package blogs + * @subpackage functions + */ + +/** + * Initial Setup + */ +global $gContent; +require_once( BLOGS_PKG_CLASS_PATH.'BitBlogPost.php'); +require_once( LIBERTY_PKG_PATH.'lookup_content_inc.php' ); + +if( empty( $gContent ) || !is_object( $gContent ) || !$gContent->isValid() ) { + // if blog_id supplied, use that + if( @BitBase::verifyId( $_REQUEST['post_id'] ) ) { + $gContent = new BitBlogPost( $_REQUEST['post_id'] ); + $gContent->load(); + } elseif( @BitBase::verifyId( $_REQUEST['content_id'] ) ) { + $gContent = new BitBlogPost( NULL, $_REQUEST['content_id'] ); + $gContent->load(); + } else { + $gContent = new BitBlogPost(); + } + + $gBitSmarty->assignByRef( 'gContent', $gContent ); +} +?> |
