fisheye
[ class tree: fisheye ] [ index: fisheye ] [ all elements ]

Source for file view.php

Documentation is available at view.php

  1. <?php
  2. /**
  3.  * @version $Header$
  4.  * @package fisheye
  5.  * @subpackage functions
  6.  */
  7.  
  8. /**
  9.  * required setup
  10.  */
  11. require_once( '../kernel/setup_inc.php' );
  12.  
  13. $gBitSystem->verifyPackage( 'fisheye' );
  14. require_once( FISHEYE_PKG_PATH.'FisheyeGallery.php');
  15. require_once( FISHEYE_PKG_PATH.'FisheyeImage.php');
  16.  
  17. global $gBitSystem, $fisheyeErrors, $fisheyeWarnings, $fisheyeSuccess;
  18.  
  19. //$gDebug = TRUE;
  20.  
  21. include_once( FISHEYE_PKG_PATH.'gallery_lookup_inc.php' );
  22.  
  23. if( $gContent && $gContent->isValid() ) {
  24.     $gBitSystem->setCanonicalLink( $gContent->getDisplayUrl() );
  25. }
  26.  
  27. global $gHideModules;
  28. $gHideModules = $gBitSystem->isFeatureActive( 'fisheye_gallery_hide_modules' );
  29.  
  30. if ( !$gContent->isValid() ) {
  31.     // No gallery was indicated so we will redirect to the browse galleries page
  32.     bit_redirect( FISHEYE_PKG_URL."list_galleries.php", '404' );
  33.     die;
  34. }
  35.  
  36. if( $gContent->isCommentable() ) {
  37.     $commentsParentId = $gContent->mContentId;
  38.     $comments_vars = Array('fisheyegallery');
  39.     $comments_prefix_var='fisheyegallery:';
  40.     $comments_object_var='fisheyegallery';
  41.     $comments_return_url = $_SERVER['SCRIPT_NAME']."?gallery_id=".$gContent->mGalleryId;
  42.     include_once( LIBERTY_PKG_PATH.'comments_inc.php' );
  43. }
  44.  
  45. if (!empty($_REQUEST['download'])){            
  46.     // Checked against global users group assignment so that feature can be restricted on a group level. 
  47.     // If content was checked, user would always have permission to do this.
  48.     $gContent->verifyUserPermission('p_fisheye_download_gallery_arc');
  49.     $gContent->download();
  50. } else {
  51.     require_once( FISHEYE_PKG_PATH.'display_fisheye_gallery_inc.php' );
  52. }
  53.  
  54. ?>

Documentation generated on Wed, 29 Jul 2015 13:57:32 +0000 by phpDocumentor 1.5.0-lsces