blob: 61b8546ed19d6ec5bc4d023c8c41dfff48bd2fe8 (
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
40
41
42
43
44
45
46
47
48
49
50
|
<?php
/**
* @version $Header$
* @package fisheye
* @subpackage functions
*/
use Bitweaver\KernelTools;
/**
* required setup
*/
require_once '../kernel/includes/setup_inc.php';
$gBitSystem->verifyPackage( 'fisheye' );
global $gBitSystem, $fisheyeErrors, $fisheyeWarnings, $fisheyeSuccess;
include_once FISHEYE_PKG_INCLUDE_PATH.'gallery_lookup_inc.php';
if( $gContent && $gContent->isValid() ) {
$gBitSystem->setCanonicalLink( $gContent->getDisplayUrl() );
}
global $gHideModules;
$gHideModules = $gBitSystem->isFeatureActive( 'fisheye_gallery_hide_modules' );
if ( !$gContent->isValid() ) {
// No gallery was indicated so we will redirect to the browse galleries page
KernelTools::bit_redirect( FISHEYE_PKG_URL."list_galleries.php", '404' );
die;
}
if( $gContent->isCommentable() ) {
$commentsParentId = $gContent->mContentId;
$comments_vars = [ 'fisheyegallery' ];
$comments_prefix_var='fisheyegallery:';
$comments_object_var='fisheyegallery';
$comments_return_url = $_SERVER['SCRIPT_NAME']."?gallery_id=".$gContent->mGalleryId;
include_once LIBERTY_PKG_INCLUDE_PATH.'comments_inc.php';
}
if (!empty($_REQUEST['download'])){
// Checked against global users group assignment so that feature can be restricted on a group level.
// If content was checked, user would always have permission to do this.
$gContent->verifyUserPermission('p_fisheye_download_gallery_arc');
$gContent->download();
} else {
require_once FISHEYE_PKG_INCLUDE_PATH.'display_fisheye_gallery_inc.php';
}
|