blob: 6171572f663cc5add57fac7a326b03f44830939d (
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
require_once( "../kernel/includes/setup_inc.php" );
require_once( TAGS_PKG_CLASS_PATH.'LibertyTag.php' );
$gBitSystem->verifyPackage( 'tags' );
$gBitSystem->verifyPermission('p_tags_view');
$tag = new LibertyTag();
$_REQUEST['max_records'] = !empty( $_REQUEST['max_records'] ) ? $_REQUEST['max_records'] : NULL;
$listHash = $_REQUEST;
$tagHash = $_REQUEST;
$gBitSmarty->assign( 'cloud', TRUE );
if( isset($_REQUEST['tags']) ){
$pageTitle = tra( 'Tagged Content' );
if( $listData = $tag->assignContentList( $listHash ) ) {
$pageTitle .= ' '.tra( 'with' ).' '.$_REQUEST['tags'];
$gBitSystem->setCanonicalLink( $tag->getDisplayUrlWithTag( $_REQUEST['tags'] ) );
} else {
$gBitSystem->setHttpStatus( HttpStatusCodes::HTTP_GONE );
}
$tagData = $tag->getList( $tagHash );
$gBitSmarty->assign( 'tagData', $tagData["data"] );
$gBitSmarty->assign( 'tagsReq', $_REQUEST['tags'] );
$gBitSystem->display( 'bitpackage:tags/list_content.tpl', $pageTitle, array( 'display_mode' => 'display' ));
}else{
$listData = $tag->getList( $listHash );
$gBitSmarty->assign( 'tagData', $listData["data"] );
$gBitSystem->display( 'bitpackage:tags/list_tags.tpl', tra( 'Tags' ) , array( 'display_mode' => 'display' ));
}
|