-
Notifications
You must be signed in to change notification settings - Fork 1
/
list_galleries.php
46 lines (37 loc) · 1.46 KB
/
list_galleries.php
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
40
41
42
43
44
45
46
<?php
/**
* @version $Header$
* @package fisheye
* @subpackage functions
*/
/**
* required setup
*/
require_once( '../kernel/includes/setup_inc.php' );
require_once( FISHEYE_PKG_CLASS_PATH.'FisheyeGallery.php');
global $gBitSystem, $gBitSmarty, $gFisheyeGallery;
$gBitSystem->verifyPermission( 'p_fisheye_list_galleries' );
$gFisheyeGallery = new FisheyeGallery();
/* Get a list of galleries which matches the input parameters (default is to list every gallery in the system) */
$_REQUEST['root_only'] = TRUE;
/* Process the input parameters this page accepts */
if (!empty($_REQUEST['user_id']) && is_numeric($_REQUEST['user_id'])) {
if( $_REQUEST['user_id'] == $gBitUser->mUserId ) {
$_REQUEST['show_empty'] = TRUE;
}
$gBitSmarty->assignByRef('gQueryUserId', $_REQUEST['user_id']);
$template = 'user_galleries.tpl';
} else {
$template = 'list_galleries.tpl';
}
$_REQUEST['thumbnail_size'] = $gBitSystem->getConfig( 'fisheye_list_thumbnail_size', 'small' );
$galleryList = $gFisheyeGallery->getList( $_REQUEST );
$gFisheyeGallery->invokeServices( 'content_list_function', $_REQUEST );
// Pagination Data
$gBitSmarty->assignByRef( 'listInfo', $_REQUEST['listInfo'] );
$gBitSmarty->assign( 'galleryList', $galleryList );
// Display the template
$gDefaultCenter = "bitpackage:fisheye/$template";
$gBitSmarty->assignByRef( 'gDefaultCenter', $gDefaultCenter );
$gBitSystem->display( 'bitpackage:kernel/dynamic.tpl', 'List Galleries' , array( 'display_mode' => 'list' ));
?>