summaryrefslogtreecommitdiff
path: root/modules/mod_last_changes.php
blob: 679103f664918a8e0a3d3b2c240b536acf3dba58 (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
<?php
// $Header: /cvsroot/bitweaver/_bit_liberty/modules/mod_last_changes.php,v 1.1 2005/06/19 04:55:51 bitweaver Exp $
/**
* Params:
* - content_type_guid : if set, show only those content_type_guid's
* - show_date : if set, show date of last modification
*/


global $gQueryUser, $gBitUser, $module_rows, $module_params, $gLibertySystem, $module_title;


$userId = NULL;
if( !empty( $gQueryUser->mUserId ) ) {
	$userId = $gQueryUser->mUserId;
}

if( empty( $module_title ) ) {
	if( !empty( $module_params['content_type_guid'] ) && !empty( $gLibertySystem->mContentTypes[$module_params['content_type_guid']] ) ) {
		$title = tra( "Last Changes" ).': '.tra( $gLibertySystem->mContentTypes[$module_params['content_type_guid']]['content_description'] );
	} else {
		$smarty->assign( 'showContentType', TRUE );
		$title = tra( "Last Changes" );
	}
	$smarty->assign( 'moduleTitle', $title );
}

if( !empty( $module_params['show_date'] ) ) {
	$smarty->assign( 'showDate' , TRUE );
}

$modLastContent = $gBitUser->getContentList( !empty( $module_params['content_type_guid'] ) ? $module_params['content_type_guid'] : NULL, 0, $module_rows, 'last_modified_desc', NULL, $userId );
$smarty->assign_by_ref( 'modLastContent', $modLastContent['data'] );
?>