summaryrefslogtreecommitdiff
path: root/view_image.php
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2025-08-28 16:19:05 +0100
committerlsces <lester@lsces.co.uk>2025-08-28 16:19:05 +0100
commit2140176e21e83d3779460277a31bcc7adaf9d3fe (patch)
treef7e1d27e3428e63c2b635a4474e57cf14158241a /view_image.php
parentd4cf8eb6b69ff23eedcba9359ce9a1ed4e2a7d9c (diff)
downloadfisheye-2140176e21e83d3779460277a31bcc7adaf9d3fe.tar.gz
fisheye-2140176e21e83d3779460277a31bcc7adaf9d3fe.tar.bz2
fisheye-2140176e21e83d3779460277a31bcc7adaf9d3fe.zip
General code updated to PHP8.4 and namespace ... work in progress on updating some third party code
Diffstat (limited to 'view_image.php')
-rwxr-xr-x[-rw-r--r--]view_image.php24
1 files changed, 11 insertions, 13 deletions
diff --git a/view_image.php b/view_image.php
index 76d9537..6e7a5ca 100644..100755
--- a/view_image.php
+++ b/view_image.php
@@ -7,17 +7,15 @@
/**
* required setup
*/
-require_once( '../kernel/includes/setup_inc.php' );
-
-$gBitSystem->verifyPackage( 'fisheye' );
-require_once( FISHEYE_PKG_CLASS_PATH.'FisheyeGallery.php');
-require_once( FISHEYE_PKG_CLASS_PATH.'FisheyeImage.php');
+require_once '../kernel/includes/setup_inc.php';
global $gBitSystem, $gDebug;
+$gBitSystem->verifyPackage( 'fisheye' );
+
if( !empty( $_REQUEST['size'] ) ) {
// nuke old values if set
- $_COOKIE['fisheyeviewsize'] = NULL;
+ $_COOKIE['fisheyeviewsize'] = null;
setcookie( 'fisheyeviewsize', $_REQUEST['size'], 0, $gBitSystem->getConfig( 'cookie_path', BIT_ROOT_URL ), $gBitSystem->getConfig( 'cookie_domain', '.'.$_SERVER['SERVER_NAME'] ) );
}
@@ -25,7 +23,7 @@ if( !empty( $_REQUEST['refresh'] ) ) {
$gBitSmarty->assign( 'refresh', '?refresh='.time() );
}
-include_once( FISHEYE_PKG_INCLUDE_PATH.'image_lookup_inc.php' );
+include_once FISHEYE_PKG_INCLUDE_PATH.'image_lookup_inc.php';
if( $gContent && $gContent->isValid() ) {
$gBitSystem->setCanonicalLink( $gContent->getDisplayUrl() );
@@ -36,24 +34,24 @@ $gHideModules = $gBitSystem->isFeatureActive( 'fisheye_image_hide_modules' );
if( is_object( $gGallery ) && $gGallery->isCommentable() ) {
$commentsParentId = $gContent->mContentId;
- $comments_vars = Array('fisheyeimage');
+ $comments_vars = [ 'fisheyeimage' ];
$comments_prefix_var='fisheyeimage:';
$comments_object_var='fisheyeimage';
- $comments_return_url = $_SERVER['SCRIPT_NAME']."?image_id=".$gContent->mImageId;
- include_once( LIBERTY_PKG_INCLUDE_PATH.'comments_inc.php' );
+ $comments_return_url = $_SERVER['SCRIPT_NAME']."?image_id=" . $gContent->mImageId ?? $gContent->mContentId;
+ include_once LIBERTY_PKG_INCLUDE_PATH.'comments_inc.php';
}
$gContent->addHit();
// this will let LibertyMime know that we want to display the original image
if( $gContent->hasUpdatePermission() || $gGallery && $gGallery->getPreference( 'link_original_images' )) {
- $gContent->mInfo['image_file']['original'] = TRUE;
+ $gContent->mInfo['image_file']['original'] = true;
}
if( $gContent->hasUpdatePermission() ) {
if( !empty( $_REQUEST['rethumb'] ) ) {
- $gContent->generateThumbnails( FALSE, TRUE );
+ $gContent->generateThumbnails( false, true );
}
}
-require_once( FISHEYE_PKG_INCLUDE_PATH.'display_fisheye_image_inc.php' );
+require_once FISHEYE_PKG_INCLUDE_PATH.'display_fisheye_image_inc.php';