summaryrefslogtreecommitdiff
path: root/image_order.php
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-24 21:07:32 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-24 21:07:32 +0100
commit77360a574d13514289185c6810c53cc3acdc206e (patch)
tree6666c97b95f6497f49504cf2f30df78e5e7970ec /image_order.php
parent67587e23f293dc5fa3242a6e221eeaeff624297c (diff)
downloadfisheye-77360a574d13514289185c6810c53cc3acdc206e.tar.gz
fisheye-77360a574d13514289185c6810c53cc3acdc206e.tar.bz2
fisheye-77360a574d13514289185c6810c53cc3acdc206e.zip
Guard updatePosition() call against non-Fisheye gallery items
Wiki pages embedded in galleries don't extend FisheyeBase so lack updatePosition() — method_exists() check prevents fatal error on reorder. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'image_order.php')
-rwxr-xr-ximage_order.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/image_order.php b/image_order.php
index 8e4a12e..3295a15 100755
--- a/image_order.php
+++ b/image_order.php
@@ -178,7 +178,9 @@ if (!empty($_REQUEST['cancel'])) {
if( !empty( $storageHash ) ) {
$galleryItem->store($storageHash);
}
- $galleryItem->updatePosition($gContent->mContentId, $newPos);
+ if( method_exists( $galleryItem, 'updatePosition' ) ) {
+ $galleryItem->updatePosition($gContent->mContentId, $newPos);
+ }
}
}
unset( $storageHash );