summaryrefslogtreecommitdiff
path: root/view_component.php
blob: 6f8ec939b4140306b322606a75141e737666b619 (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
30
31
32
33
34
35
36
37
38
39
<?php
/**
 * @package stock
 * @subpackage functions
 */

/**
 * required setup
 */

require_once '../kernel/includes/setup_inc.php';
global $gBitSystem, $gDebug;

$gBitSystem->verifyPackage( 'stock' );

if( !empty( $_REQUEST['highlight'] ) ) {
	$gBitSmarty->assign( 'highlight', $_REQUEST['highlight'] );
}

include_once STOCK_PKG_INCLUDE_PATH.'component_lookup_inc.php';

if( $gContent && $gContent->isValid() ) {
	$gBitSystem->setCanonicalLink( $gContent->getDisplayUrl() );
}

if( is_object( $gGallery ) && $gGallery->isCommentable() ) {
	$commentsParentId = $gContent->mContentId;
	$comments_vars = [ 'stockcomponent' ];
	$comments_prefix_var='stockcomponent:';
	$comments_object_var='stockcomponent';
	$comments_return_url = $_SERVER['SCRIPT_NAME']."?content_id=".$gContent->mContentId;
	include_once LIBERTY_PKG_INCLUDE_PATH.'comments_inc.php';
}

$gContent->addHit();

$gContent->mInfo['stockcomponent_types'] = $gContent->getXrefGroupList();

require_once STOCK_PKG_INCLUDE_PATH.'display_stock_component_inc.php';