articles
[ class tree: articles ] [ index: articles ] [ all elements ]

Source for file lookup_article_inc.php

Documentation is available at lookup_article_inc.php

  1. <?php
  2. /**
  3.  * @version $Header$
  4.  * @package articles
  5.  * @subpackage functions
  6.  */
  7.  
  8. /**
  9.  * Initialization
  10.  */
  11. require_once( ARTICLES_PKG_PATH.'BitArticle.php');
  12. require_once( LIBERTY_PKG_PATH.'lookup_content_inc.php' );
  13.  
  14. // if we already have a gContent, we assume someone else created it for us, and has properly loaded everything up.
  15. if( empty( $gContent ) || !is_object( $gContent ) ) {
  16.     if (@BitBase::verifyId( $_REQUEST['article_id'] ) ) {
  17.         $gContent = new BitArticle( $_REQUEST['article_id'] );
  18.     } elseif( @BitBase::verifyId( $_REQUEST['content_id'] ) ) {
  19.         $gContent = new BitArticle( NULL, $_REQUEST['content_id'] );
  20.     } else {
  21.         $gContent = new BitArticle();
  22.         $gContent->mInfo['expire_date'] = strtotime( "+1 year" );
  23.     }
  24.  
  25.     if( empty( $gContent->mArticleId ) && empty( $gContent->mContentId )  ) {
  26.         //handle legacy forms that use plain 'article' form variable name
  27.     } else {
  28.         $gContent->load();
  29.     }
  30.     $gBitSmarty->clear_assign( 'gContent' );
  31.     $gBitSmarty->assign( 'gContent', $gContent );
  32. }

Documentation generated on Wed, 29 Jul 2015 13:57:03 +0000 by phpDocumentor 1.5.0-lsces