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

Source for file image_lookup_inc.php

Documentation is available at image_lookup_inc.php

  1. <?php
  2. /**
  3.  * @version $Header$
  4.  * @package fisheye
  5.  * @subpackage functions
  6.  */
  7.  
  8. global $gContent$gGallery;
  9.  
  10.  
  11. if$gContent FisheyeImage::lookup$_REQUEST ) ) {
  12.     // nothing to do. ::lookup will do a full load
  13. else {
  14.     $gContent new FisheyeImage();
  15.     $imageId NULL;
  16. }
  17.  
  18. if!empty$_REQUEST['gallery_path') ) {
  19.     $_REQUEST['gallery_path'rtrim$_REQUEST['gallery_path']'/' );
  20.     $gContent->setGalleryPath$_REQUEST['gallery_path');
  21.     $matches array();
  22.     $tail strrpos$_REQUEST['gallery_path']'/' );
  23.     $_REQUEST['gallery_id'substr$_REQUEST['gallery_path']$tail );
  24. }
  25. ifempty$_REQUEST['gallery_id') ) {
  26.     if$parents $gContent->getParentGalleries() ) {
  27.         $gal current$parents );
  28.         $gContent->setGalleryPath'/'.$gal['gallery_id');
  29.         $_REQUEST['gallery_id'$gal['gallery_id'];
  30.     }
  31. }
  32. // the image is considered the primary content, however the gallery is useful
  33. if!empty($_REQUEST['gallery_id']&& is_numeric($_REQUEST['gallery_id']) ) {
  34.     $gGallery new FisheyeGallery$_REQUEST['gallery_id']NULLFALSE );
  35.     $gGallery->load();
  36.     $gGallery->loadCurrentImage$gContent->mImageId );
  37.     $gBitSmarty->assign_by_ref('gGallery'$gGallery);
  38.     $gBitSmarty->assign_by_ref('galleryId'$_REQUEST['gallery_id']);
  39. }
  40.  
  41. // This user does not own this gallery and they have not been granted the permission to edit this gallery
  42. $gContent->verifyViewPermission();
  43.  
  44. $gBitSmarty->assign_by_ref('gContent'$gContent);
  45. $gBitSmarty->assign_by_ref('imageId'$gContent->mImageId );
  46.  
  47.  
  48. ?>

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