summaryrefslogtreecommitdiff
path: root/includes/lookup_post_inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/lookup_post_inc.php')
-rwxr-xr-x[-rw-r--r--]includes/lookup_post_inc.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/includes/lookup_post_inc.php b/includes/lookup_post_inc.php
index 0803a4e..efa3f90 100644..100755
--- a/includes/lookup_post_inc.php
+++ b/includes/lookup_post_inc.php
@@ -8,21 +8,21 @@
* Initial Setup
*/
global $gContent;
-require_once( BLOGS_PKG_CLASS_PATH.'BitBlogPost.php');
-require_once( LIBERTY_PKG_INCLUDE_PATH.'lookup_content_inc.php' );
+use Bitweaver\Blogs\BitBlogPost;
+use Bitweaver\BitBase;
+require_once LIBERTY_PKG_INCLUDE_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'] ) ) {
+ if( BitBase::verifyId( $_REQUEST['post_id'] ?? 0 ) ) {
$gContent = new BitBlogPost( $_REQUEST['post_id'] );
$gContent->load();
- } elseif( @BitBase::verifyId( $_REQUEST['content_id'] ) ) {
- $gContent = new BitBlogPost( NULL, $_REQUEST['content_id'] );
+ } elseif( BitBase::verifyId( $_REQUEST['content_id'] ?? 0 ) ) {
+ $gContent = new BitBlogPost( null, $_REQUEST['content_id'] );
$gContent->load();
} else {
$gContent = new BitBlogPost();
}
- $gBitSmarty->assignByRef( 'gContent', $gContent );
-}
-?>
+ $gBitSmarty->assign( 'gContent', $gContent );
+} \ No newline at end of file