blob: c51c42b73ecbc00eaf490e0d438fc29de95c8ea3 (
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
/**
* @version $Header: /cvsroot/bitweaver/_bit_liberty/templates/center_view_generic.php,v 1.3 2010/04/17 13:47:48 wjames5 Exp $
* @package bitweaver
*/
global $moduleParams, $gContent, $gBitSmarty;
$gContent = NULL;
if( !empty( $moduleParams ) ) {
extract( $moduleParams );
}
$lookupHash['content_id'] = ( !empty( $module_params['content_id'] ) ? $module_params['content_id'] : NULL );
if( $gContent = LibertyBase::getLibertyObject( $lookupHash['content_id'] ) ) {
if( !$gContent->hasViewPermission() ){
// no perm then get rid of the content object
$gContent = NULL;
}else{
// deal with the parsing
$parseHash['format_guid'] = $gContent->mInfo['format_guid'];
$parseHash['content_id'] = $gContent->mInfo['content_id'];
$parseHash['user_id'] = $gContent->mInfo['user_id'];
$parseHash['data'] = $gContent->mInfo['data'];
$gContent->mInfo['parsed_data'] = $gContent->parseData( $parseHash );
if( !empty( $moduleParams['title'] )) {
$gContent->mInfo['title'] = $moduleParams['title'];
}
if ( isset($moduleParams['content_type_guid'] )){
$gBitSmarty->assign( "contentType", $gContent->getContentTypeName() );
}
}
}
$gBitSmarty->assign( "gContent", $gContent );
?>
|