From 4f72c4761359485da48b19eb8d9cf525797e7df8 Mon Sep 17 00:00:00 2001 From: Lester Caine Date: Thu, 14 May 2026 09:54:15 +0100 Subject: php-cs-fixer tidies to php8.5 standards Co-Authored-By: Claude Sonnet 4.6 --- .htaccess | 0 admin/admin_fisheye_inc.php | 10 +-- admin/schema_inc.php | 12 +-- browse.php | 1 + css/div_layout.css | 0 css/fisheye.css | 0 edit.php | 19 ++--- edit_gallery_perms.php | 1 + edit_image.php | 3 +- find_user.php | 2 +- fisheye_rss.php | 1 + .../ajax_scroller/fisheye_ajax_scroller_inc.tpl | 0 .../fixed_grid/fisheye_fixed_grid_inc3.tpl | 51 ++++++++++++ gallery_views/galleriffic/css/basic.css | 0 gallery_views/galleriffic/css/black.css | 0 gallery_views/galleriffic/css/caption.png | Bin gallery_views/galleriffic/css/galleriffic-1.css | 0 gallery_views/galleriffic/css/galleriffic-2.css | 0 gallery_views/galleriffic/css/galleriffic-3.css | 0 gallery_views/galleriffic/css/galleriffic-4.css | 0 gallery_views/galleriffic/css/galleriffic-5.css | 0 .../galleriffic/css/galleriffic_style_1.css | 0 gallery_views/galleriffic/css/jush.css | 0 gallery_views/galleriffic/css/loader.gif | Bin gallery_views/galleriffic/css/loaderWhite.gif | Bin gallery_views/galleriffic/css/nextPageArrow.gif | Bin .../galleriffic/css/nextPageArrowWhite.gif | Bin gallery_views/galleriffic/css/prevPageArrow.gif | Bin .../galleriffic/css/prevPageArrowWhite.gif | Bin gallery_views/galleriffic/css/white.css | 0 gallery_views/galleriffic/example-1.html | 0 gallery_views/galleriffic/example-2.html | 0 gallery_views/galleriffic/example-3.html | 0 gallery_views/galleriffic/example-4.html | 0 gallery_views/galleriffic/example-5.html | 0 .../galleriffic/fisheye_galleriffic_inc.tpl | 0 gallery_views/galleriffic/gftop.js | 0 gallery_views/galleriffic/index.html | 0 gallery_views/galleriffic/js/jquery-1.3.2.js | 0 gallery_views/galleriffic/js/jquery.galleriffic.js | 0 gallery_views/galleriffic/js/jquery.history.js | 0 .../galleriffic/js/jquery.opacityrollover.js | 0 gallery_views/galleriffic/js/jush.js | 0 gallery_views/matteo/icons/white/loaded.gif | Bin gallery_views/matteo/icons/white/loader.gif | Bin gallery_views/matteo/icons/white/next.gif | Bin gallery_views/matteo/icons/white/play.gif | Bin gallery_views/matteo/icons/white/prev.gif | Bin gallery_views/matteo/icons/white/separator.gif | Bin gallery_views/matteo/icons/white/stop.gif | Bin gallery_views/matteo/icons/white/thumb copia.gif | Bin gallery_views/matteo/icons/white/thumb.gif | Bin gallery_views/matteo/mbGallery.js | 0 gallery_views/matteo/mbGalleryBox.js | 0 gallery_views/matteo/mb_layout.css | 0 icons/black/loaded.gif | Bin icons/black/loader.gif | Bin icons/black/next.gif | Bin icons/black/play.gif | Bin icons/black/prev.gif | Bin icons/black/separator.gif | Bin icons/black/stop.gif | Bin icons/black/thumb copia.gif | Bin icons/black/thumb.gif | Bin icons/label_bgnd.gif | Bin icons/order.gif | Bin icons/order.png | Bin icons/pkg_fisheye.gif | Bin icons/pkg_fisheye.png | Bin icons/rotate_auto.gif | Bin icons/rotate_auto.png | Bin icons/rotate_ccw.gif | Bin icons/rotate_ccw.png | Bin icons/rotate_cw.gif | Bin icons/rotate_cw.png | Bin image/generating_thumbnails.png | Bin image/no_image.png | Bin image_order.php | 3 +- includes/bit_setup_inc.php | 10 +-- includes/classes/FisheyeBase.php | 8 +- includes/classes/FisheyeGallery.php | 86 +++++++++----------- includes/classes/FisheyeImage.php | 65 +++++++-------- includes/classes/FisheyeRemote.php | 87 ++++++++++----------- includes/gallery_lookup_inc.php | 2 +- includes/upload_inc.php | 6 +- liberty_plugins/data.carousel.php | 16 ++-- liberty_plugins/data.gallery.php | 12 +-- liberty_plugins/data.image.php | 4 +- main.php | 5 +- modules/mod_banner_rand.php | 5 +- modules/mod_images.php | 2 +- modules/mod_specials.php | 7 +- templates/center_image_comments.php | 6 +- templates/center_list_galleries.php | 3 - templates/center_list_galleries.tpl | 0 templates/find_user.tpl | 0 templates/image_order.tpl | 2 +- templates/view_gallery.tpl | 0 thumbnailer.php | 7 +- upload.php | 1 + view.php | 4 +- 101 files changed, 238 insertions(+), 203 deletions(-) mode change 100644 => 100755 .htaccess mode change 100644 => 100755 css/div_layout.css mode change 100644 => 100755 css/fisheye.css mode change 100644 => 100755 gallery_views/ajax_scroller/fisheye_ajax_scroller_inc.tpl create mode 100755 gallery_views/fixed_grid/fisheye_fixed_grid_inc3.tpl mode change 100644 => 100755 gallery_views/galleriffic/css/basic.css mode change 100644 => 100755 gallery_views/galleriffic/css/black.css mode change 100644 => 100755 gallery_views/galleriffic/css/caption.png mode change 100644 => 100755 gallery_views/galleriffic/css/galleriffic-1.css mode change 100644 => 100755 gallery_views/galleriffic/css/galleriffic-2.css mode change 100644 => 100755 gallery_views/galleriffic/css/galleriffic-3.css mode change 100644 => 100755 gallery_views/galleriffic/css/galleriffic-4.css mode change 100644 => 100755 gallery_views/galleriffic/css/galleriffic-5.css mode change 100644 => 100755 gallery_views/galleriffic/css/galleriffic_style_1.css mode change 100644 => 100755 gallery_views/galleriffic/css/jush.css mode change 100644 => 100755 gallery_views/galleriffic/css/loader.gif mode change 100644 => 100755 gallery_views/galleriffic/css/loaderWhite.gif mode change 100644 => 100755 gallery_views/galleriffic/css/nextPageArrow.gif mode change 100644 => 100755 gallery_views/galleriffic/css/nextPageArrowWhite.gif mode change 100644 => 100755 gallery_views/galleriffic/css/prevPageArrow.gif mode change 100644 => 100755 gallery_views/galleriffic/css/prevPageArrowWhite.gif mode change 100644 => 100755 gallery_views/galleriffic/css/white.css mode change 100644 => 100755 gallery_views/galleriffic/example-1.html mode change 100644 => 100755 gallery_views/galleriffic/example-2.html mode change 100644 => 100755 gallery_views/galleriffic/example-3.html mode change 100644 => 100755 gallery_views/galleriffic/example-4.html mode change 100644 => 100755 gallery_views/galleriffic/example-5.html mode change 100644 => 100755 gallery_views/galleriffic/fisheye_galleriffic_inc.tpl mode change 100644 => 100755 gallery_views/galleriffic/gftop.js mode change 100644 => 100755 gallery_views/galleriffic/index.html mode change 100644 => 100755 gallery_views/galleriffic/js/jquery-1.3.2.js mode change 100644 => 100755 gallery_views/galleriffic/js/jquery.galleriffic.js mode change 100644 => 100755 gallery_views/galleriffic/js/jquery.history.js mode change 100644 => 100755 gallery_views/galleriffic/js/jquery.opacityrollover.js mode change 100644 => 100755 gallery_views/galleriffic/js/jush.js mode change 100644 => 100755 gallery_views/matteo/icons/white/loaded.gif mode change 100644 => 100755 gallery_views/matteo/icons/white/loader.gif mode change 100644 => 100755 gallery_views/matteo/icons/white/next.gif mode change 100644 => 100755 gallery_views/matteo/icons/white/play.gif mode change 100644 => 100755 gallery_views/matteo/icons/white/prev.gif mode change 100644 => 100755 gallery_views/matteo/icons/white/separator.gif mode change 100644 => 100755 gallery_views/matteo/icons/white/stop.gif mode change 100644 => 100755 gallery_views/matteo/icons/white/thumb copia.gif mode change 100644 => 100755 gallery_views/matteo/icons/white/thumb.gif mode change 100644 => 100755 gallery_views/matteo/mbGallery.js mode change 100644 => 100755 gallery_views/matteo/mbGalleryBox.js mode change 100644 => 100755 gallery_views/matteo/mb_layout.css mode change 100644 => 100755 icons/black/loaded.gif mode change 100644 => 100755 icons/black/loader.gif mode change 100644 => 100755 icons/black/next.gif mode change 100644 => 100755 icons/black/play.gif mode change 100644 => 100755 icons/black/prev.gif mode change 100644 => 100755 icons/black/separator.gif mode change 100644 => 100755 icons/black/stop.gif mode change 100644 => 100755 icons/black/thumb copia.gif mode change 100644 => 100755 icons/black/thumb.gif mode change 100644 => 100755 icons/label_bgnd.gif mode change 100644 => 100755 icons/order.gif mode change 100644 => 100755 icons/order.png mode change 100644 => 100755 icons/pkg_fisheye.gif mode change 100644 => 100755 icons/pkg_fisheye.png mode change 100644 => 100755 icons/rotate_auto.gif mode change 100644 => 100755 icons/rotate_auto.png mode change 100644 => 100755 icons/rotate_ccw.gif mode change 100644 => 100755 icons/rotate_ccw.png mode change 100644 => 100755 icons/rotate_cw.gif mode change 100644 => 100755 icons/rotate_cw.png mode change 100644 => 100755 image/generating_thumbnails.png mode change 100644 => 100755 image/no_image.png mode change 100644 => 100755 templates/center_list_galleries.tpl mode change 100644 => 100755 templates/find_user.tpl mode change 100644 => 100755 templates/view_gallery.tpl diff --git a/.htaccess b/.htaccess old mode 100644 new mode 100755 diff --git a/admin/admin_fisheye_inc.php b/admin/admin_fisheye_inc.php index 6eece9f..7a4ce66 100755 --- a/admin/admin_fisheye_inc.php +++ b/admin/admin_fisheye_inc.php @@ -7,7 +7,7 @@ $formGalleryGeneral = [ "fisheye_menu_text" => [ 'label' => 'Menu Text', 'note' => '', - 'type' => 'text' + 'type' => 'text', ], /* Disabled for now - spiderr "feature_megaupload" => [ @@ -19,24 +19,24 @@ $formGalleryGeneral = [ "liberty_offline_thumbnailer" => [ 'label' => 'Background Thumbnailer', 'note' => 'Thumbnails will be queued and regenerated by a background command-line script. For more information, see '.FISHEYE_PKG_PATH.'thumbaniler.php or you can run it manually', - 'type' => 'checkbox' + 'type' => 'checkbox', ], "fisheye_show_public_on_upload" => [ 'label' => 'Show Public Galleries on Upload', 'note' => 'Enable this if you want to have all public galleries visible when uploading files. This might cause problems on large sites with many public galleries.', - 'type' => 'checkbox' + 'type' => 'checkbox', ], "fisheye_show_all_to_admins" => [ 'label' => 'Show all Galleries to Administrators', 'note' => 'This will allow gallery admins to upload and move around images in all galleries. This might cause problems on large sites with many galleries.', - 'type' => 'checkbox' + 'type' => 'checkbox', ], ]; if( !$gBitSystem->isPackageActive( 'gigaupload' ) ) { $formGalleryGeneral["fisheye_extended_upload_slots"] = [ 'label' => 'Extended Upload Slots', 'note' => 'When you enable this, users can enter the title and description of the file when uploading them.', - 'type' => 'checkbox' + 'type' => 'checkbox', ]; }; $gBitSmarty->assign('formGalleryGeneral', $formGalleryGeneral); diff --git a/admin/schema_inc.php b/admin/schema_inc.php index f1852a3..caea58d 100755 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -43,13 +43,13 @@ $gBitInstaller->registerSchemaIndexes( FISHEYE_PKG_NAME, $indices ); $gBitInstaller->registerPackageInfo( FISHEYE_PKG_NAME, [ 'description' => "FishEye is a package for creating image galleries", - 'license' => 'LGPL' + 'license' => 'LGPL', ] ); // ### Sequences $sequences = [ 'fisheye_gallery_id_seq' => [ 'start' => 1 ], - 'fisheye_image_id_seq' => [ 'start' => 1 ] + 'fisheye_image_id_seq' => [ 'start' => 1 ], ]; $gBitInstaller->registerSchemaSequences( FISHEYE_PKG_NAME, $sequences ); @@ -73,7 +73,7 @@ $gBitInstaller->registerPreferences( FISHEYE_PKG_NAME, [ [ FISHEYE_PKG_NAME, 'fisheye_menu_text','Image Galleries'], // more intuitive if we can see all galleries we can upload images to [ FISHEYE_PKG_NAME, 'fisheye_show_public_on_upload','n'], - [ FISHEYE_PKG_NAME, 'fisheye_show_all_to_admins','n'], + [ FISHEYE_PKG_NAME, 'fisheye_show_all_to_admins','n'], ] ); // ### Default User Permissions @@ -87,7 +87,7 @@ $gBitInstaller->registerUserPermissions( FISHEYE_PKG_NAME, [ ['p_fisheye_upload_nonimages', 'Can upload non_image files', 'editors', FISHEYE_PKG_NAME], ['p_fisheye_change_thumb_size', 'Can set the thumbnail size for a gallery', 'editors', FISHEYE_PKG_NAME], ['p_fisheye_create_public_gal', 'Can create public galleries any user can load images into', 'editors', FISHEYE_PKG_NAME], - ['p_fisheye_download_gallery_arc',' Can download an archived copy of Fisheye gallery', 'registered', FISHEYE_PKG_NAME] + ['p_fisheye_download_gallery_arc',' Can download an archived copy of Fisheye gallery', 'registered', FISHEYE_PKG_NAME], ] ); if( defined( 'RSS_PKG_NAME' )) { @@ -97,13 +97,13 @@ if( defined( 'RSS_PKG_NAME' )) { } // ### Register content types -$gBitInstaller->registerContentObjects( FISHEYE_PKG_NAME, [ +$gBitInstaller->registerContentObjects( FISHEYE_PKG_NAME, [ 'FisheyeGallery'=>FISHEYE_PKG_CLASS_PATH.'FisheyeGallery.php', 'FisheyeImage'=>FISHEYE_PKG_CLASS_PATH.'FisheyeImage.php', ] ); // Requirements $gBitInstaller->registerRequirements( FISHEYE_PKG_NAME, [ - 'liberty' => [ 'min' => '5.0.0' ], + 'liberty' => [ 'min' => '5.0.0' ], ]); diff --git a/browse.php b/browse.php index 57c8306..8d75a1f 100755 --- a/browse.php +++ b/browse.php @@ -9,6 +9,7 @@ * required setup */ namespace Bitweaver\Fisheye; + require_once '../kernel/includes/setup_inc.php'; global $gBitSystem, $gBitSmarty; diff --git a/css/div_layout.css b/css/div_layout.css old mode 100644 new mode 100755 diff --git a/css/fisheye.css b/css/fisheye.css old mode 100644 new mode 100755 diff --git a/edit.php b/edit.php index 05c1a20..486f166 100755 --- a/edit.php +++ b/edit.php @@ -8,6 +8,7 @@ * required setup */ namespace Bitweaver\Fisheye; + require_once '../kernel/includes/setup_inc.php'; use Bitweaver\KernelTools; @@ -64,21 +65,21 @@ if( !empty( $_REQUEST['savegallery'] ) ) { } elseif( empty( $_REQUEST['confirm'] ) ) { $formHash['delete'] = true; $formHash['gallery_id'] = $gContent->mGalleryId; - $formHash['input'] = array( + $formHash['input'] = [ '', '', - ); + ]; $gBitSystem->confirmDialog( $formHash, - array( + [ 'warning' => KernelTools::tra('Are you sure you want to delete this gallery?') . ' ' . $gContent->getTitle(), 'error' => KernelTools::tra('This cannot be undone!'), - ) + ], ); } else { $userId = $gContent->getField( 'user_id' ); $gContent->pRecursiveDelete = !empty( $_REQUEST['recurse'] ) && ($_REQUEST['recurse'] == 'all'); - + if( $gContent->expunge() ) { header( "Location: ".FISHEYE_PKG_URL.'?user_id='.$userId ); } @@ -97,13 +98,13 @@ $gBitSystem->setOnloadScript( 'updateGalleryPagination();' ); $gallery = $gContent->getParentGalleries(); $gBitSmarty->assign( 'parentGalleries', $gallery ); -$getHash = array( +$getHash = [ 'user_id' => $gBitUser->mUserId, // 'max_records' => -1, // 'no_thumbnails' => true, // 'sort_mode' => 'title_asc', // 'show_empty' => true, -); +]; if( $gContent->mContentId ) { $getHash['contain_item'] = $gContent->mContentId; } @@ -113,9 +114,9 @@ if( $gBitSystem->isFeatureActive( 'fisheye_show_all_to_admins' ) && $gBitUser->h } elseif( $gBitSystem->isFeatureActive( 'fisheye_show_public_on_upload' ) ) { // $getHash['show_public'] = true; } -$galleryTree = $gContent->generateList( $getHash, array( 'name' => "gallery_id", 'id' => "gallerylist", 'item_attributes' => array( 'class'=>'listingtitle'), 'radio_checkbox' => true, ) ); +$galleryTree = $gContent->generateList( $getHash, [ 'name' => "gallery_id", 'id' => "gallerylist", 'item_attributes' => [ 'class'=>'listingtitle'], 'radio_checkbox' => true, ] ); $gBitSmarty->assign( 'galleryTree', $galleryTree ); $gContent->invokeServices( 'content_edit_function' ); -$gBitSystem->display( 'bitpackage:fisheye/edit_gallery.tpl', KernelTools::tra('Edit Gallery: ').$gContent->getTitle() , array( 'display_mode' => 'edit' )); +$gBitSystem->display( 'bitpackage:fisheye/edit_gallery.tpl', KernelTools::tra('Edit Gallery: ').$gContent->getTitle() , [ 'display_mode' => 'edit' ]); diff --git a/edit_gallery_perms.php b/edit_gallery_perms.php index 55d1cac..edae002 100755 --- a/edit_gallery_perms.php +++ b/edit_gallery_perms.php @@ -9,6 +9,7 @@ * required setup */ namespace Bitweaver\Fisheye; + require_once '../kernel/includes/setup_inc.php'; use Bitweaver\KernelTools; diff --git a/edit_image.php b/edit_image.php index b7d3ebf..22ae0cb 100755 --- a/edit_image.php +++ b/edit_image.php @@ -8,6 +8,7 @@ * required setup */ namespace Bitweaver\Fisheye; + use Bitweaver\KernelTools; require_once '../kernel/includes/setup_inc.php'; @@ -116,7 +117,7 @@ if( !empty($_REQUEST['saveImage']) || !empty($_REQUEST['regenerateThumbnails'] ) 'confirm_item'=> $gContent->mInfo['file_name'], 'warning' => KernelTools::tra('Are you sure you want to delete this image?') . ' (' . $gContent->getTitle() . ') ' . KernelTools::tra('It will be removed from all galleries to which it belongs.'), 'error' => KernelTools::tra('This cannot be undone!'), - ] + ], ); } else { if( $gContent->expunge() ) { diff --git a/find_user.php b/find_user.php index 19ab42c..c1b3c8c 100755 --- a/find_user.php +++ b/find_user.php @@ -19,7 +19,7 @@ if( !defined( 'THEMES_STYLE_URL' ) ) { if (!empty($_REQUEST['submitUserSearch'])) { $searchParams = [ 'find' => $_REQUEST['find'] ]; - $gBitUser->getList($searchParams); + $gBitUser->getList($searchParams); $foundUsers = $searchParams['data']; } else { $foundUsers = null; diff --git a/fisheye_rss.php b/fisheye_rss.php index e5f90e9..762f062 100755 --- a/fisheye_rss.php +++ b/fisheye_rss.php @@ -9,6 +9,7 @@ * Initialization */ namespace Bitweaver\Fisheye; + use Bitweaver\KernelTools; use Bitweaver\BitBase; use Bitweaver\Rss\FeedItem; diff --git a/gallery_views/ajax_scroller/fisheye_ajax_scroller_inc.tpl b/gallery_views/ajax_scroller/fisheye_ajax_scroller_inc.tpl old mode 100644 new mode 100755 diff --git a/gallery_views/fixed_grid/fisheye_fixed_grid_inc3.tpl b/gallery_views/fixed_grid/fisheye_fixed_grid_inc3.tpl new file mode 100755 index 0000000..b55a966 --- /dev/null +++ b/gallery_views/fixed_grid/fisheye_fixed_grid_inc3.tpl @@ -0,0 +1,51 @@ +{strip} +{* include file="bitpackage:fisheye/gallery_nav.tpl" *} +
+
+ {include file="bitpackage:fisheye/gallery_icons_inc.tpl"} +

{$gContent->getTitle()|escape}

+
+ +
+ {formfeedback success=$fisheyeSuccess error=$fisheyeErrors warning=$fisheyeWarnings} + + {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo} + {if $gContent->mInfo.data} +

{$gContent->mInfo.data|escape}

+ {/if} + +
+ {counter assign="imageCount" start="0" print=false} + {assign var="max" value=100} + {foreach from=$gContent->mItems item=galItem key=itemContentId} + + {counter} + {if $imageCount % 2 == 0}{/if} + {if $imageCount % 3 == 0}{/if} + {foreachelse} + {tr}This gallery is empty{/tr}. Upload pictures! + {/foreach} +
+
+
+ + {pagination gallery_id=$gContent->mGalleryId} + + {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='view' serviceHash=$gContent->mInfo} + + {if $gContent->getPreference('allow_comments') eq 'y'} + {include file="bitpackage:liberty/comments.tpl"} + {/if} +
+{/strip} diff --git a/gallery_views/galleriffic/css/basic.css b/gallery_views/galleriffic/css/basic.css old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/black.css b/gallery_views/galleriffic/css/black.css old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/caption.png b/gallery_views/galleriffic/css/caption.png old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/galleriffic-1.css b/gallery_views/galleriffic/css/galleriffic-1.css old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/galleriffic-2.css b/gallery_views/galleriffic/css/galleriffic-2.css old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/galleriffic-3.css b/gallery_views/galleriffic/css/galleriffic-3.css old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/galleriffic-4.css b/gallery_views/galleriffic/css/galleriffic-4.css old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/galleriffic-5.css b/gallery_views/galleriffic/css/galleriffic-5.css old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/galleriffic_style_1.css b/gallery_views/galleriffic/css/galleriffic_style_1.css old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/jush.css b/gallery_views/galleriffic/css/jush.css old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/loader.gif b/gallery_views/galleriffic/css/loader.gif old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/loaderWhite.gif b/gallery_views/galleriffic/css/loaderWhite.gif old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/nextPageArrow.gif b/gallery_views/galleriffic/css/nextPageArrow.gif old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/nextPageArrowWhite.gif b/gallery_views/galleriffic/css/nextPageArrowWhite.gif old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/prevPageArrow.gif b/gallery_views/galleriffic/css/prevPageArrow.gif old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/prevPageArrowWhite.gif b/gallery_views/galleriffic/css/prevPageArrowWhite.gif old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/css/white.css b/gallery_views/galleriffic/css/white.css old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/example-1.html b/gallery_views/galleriffic/example-1.html old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/example-2.html b/gallery_views/galleriffic/example-2.html old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/example-3.html b/gallery_views/galleriffic/example-3.html old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/example-4.html b/gallery_views/galleriffic/example-4.html old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/example-5.html b/gallery_views/galleriffic/example-5.html old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/fisheye_galleriffic_inc.tpl b/gallery_views/galleriffic/fisheye_galleriffic_inc.tpl old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/gftop.js b/gallery_views/galleriffic/gftop.js old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/index.html b/gallery_views/galleriffic/index.html old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/js/jquery-1.3.2.js b/gallery_views/galleriffic/js/jquery-1.3.2.js old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/js/jquery.galleriffic.js b/gallery_views/galleriffic/js/jquery.galleriffic.js old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/js/jquery.history.js b/gallery_views/galleriffic/js/jquery.history.js old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/js/jquery.opacityrollover.js b/gallery_views/galleriffic/js/jquery.opacityrollover.js old mode 100644 new mode 100755 diff --git a/gallery_views/galleriffic/js/jush.js b/gallery_views/galleriffic/js/jush.js old mode 100644 new mode 100755 diff --git a/gallery_views/matteo/icons/white/loaded.gif b/gallery_views/matteo/icons/white/loaded.gif old mode 100644 new mode 100755 diff --git a/gallery_views/matteo/icons/white/loader.gif b/gallery_views/matteo/icons/white/loader.gif old mode 100644 new mode 100755 diff --git a/gallery_views/matteo/icons/white/next.gif b/gallery_views/matteo/icons/white/next.gif old mode 100644 new mode 100755 diff --git a/gallery_views/matteo/icons/white/play.gif b/gallery_views/matteo/icons/white/play.gif old mode 100644 new mode 100755 diff --git a/gallery_views/matteo/icons/white/prev.gif b/gallery_views/matteo/icons/white/prev.gif old mode 100644 new mode 100755 diff --git a/gallery_views/matteo/icons/white/separator.gif b/gallery_views/matteo/icons/white/separator.gif old mode 100644 new mode 100755 diff --git a/gallery_views/matteo/icons/white/stop.gif b/gallery_views/matteo/icons/white/stop.gif old mode 100644 new mode 100755 diff --git a/gallery_views/matteo/icons/white/thumb copia.gif b/gallery_views/matteo/icons/white/thumb copia.gif old mode 100644 new mode 100755 diff --git a/gallery_views/matteo/icons/white/thumb.gif b/gallery_views/matteo/icons/white/thumb.gif old mode 100644 new mode 100755 diff --git a/gallery_views/matteo/mbGallery.js b/gallery_views/matteo/mbGallery.js old mode 100644 new mode 100755 diff --git a/gallery_views/matteo/mbGalleryBox.js b/gallery_views/matteo/mbGalleryBox.js old mode 100644 new mode 100755 diff --git a/gallery_views/matteo/mb_layout.css b/gallery_views/matteo/mb_layout.css old mode 100644 new mode 100755 diff --git a/icons/black/loaded.gif b/icons/black/loaded.gif old mode 100644 new mode 100755 diff --git a/icons/black/loader.gif b/icons/black/loader.gif old mode 100644 new mode 100755 diff --git a/icons/black/next.gif b/icons/black/next.gif old mode 100644 new mode 100755 diff --git a/icons/black/play.gif b/icons/black/play.gif old mode 100644 new mode 100755 diff --git a/icons/black/prev.gif b/icons/black/prev.gif old mode 100644 new mode 100755 diff --git a/icons/black/separator.gif b/icons/black/separator.gif old mode 100644 new mode 100755 diff --git a/icons/black/stop.gif b/icons/black/stop.gif old mode 100644 new mode 100755 diff --git a/icons/black/thumb copia.gif b/icons/black/thumb copia.gif old mode 100644 new mode 100755 diff --git a/icons/black/thumb.gif b/icons/black/thumb.gif old mode 100644 new mode 100755 diff --git a/icons/label_bgnd.gif b/icons/label_bgnd.gif old mode 100644 new mode 100755 diff --git a/icons/order.gif b/icons/order.gif old mode 100644 new mode 100755 diff --git a/icons/order.png b/icons/order.png old mode 100644 new mode 100755 diff --git a/icons/pkg_fisheye.gif b/icons/pkg_fisheye.gif old mode 100644 new mode 100755 diff --git a/icons/pkg_fisheye.png b/icons/pkg_fisheye.png old mode 100644 new mode 100755 diff --git a/icons/rotate_auto.gif b/icons/rotate_auto.gif old mode 100644 new mode 100755 diff --git a/icons/rotate_auto.png b/icons/rotate_auto.png old mode 100644 new mode 100755 diff --git a/icons/rotate_ccw.gif b/icons/rotate_ccw.gif old mode 100644 new mode 100755 diff --git a/icons/rotate_ccw.png b/icons/rotate_ccw.png old mode 100644 new mode 100755 diff --git a/icons/rotate_cw.gif b/icons/rotate_cw.gif old mode 100644 new mode 100755 diff --git a/icons/rotate_cw.png b/icons/rotate_cw.png old mode 100644 new mode 100755 diff --git a/image/generating_thumbnails.png b/image/generating_thumbnails.png old mode 100644 new mode 100755 diff --git a/image/no_image.png b/image/no_image.png old mode 100644 new mode 100755 diff --git a/image_order.php b/image_order.php index 4487f98..7ceaa04 100755 --- a/image_order.php +++ b/image_order.php @@ -9,6 +9,7 @@ * required setup */ namespace Bitweaver\Fisheye; + require_once '../kernel/includes/setup_inc.php'; use Bitweaver\KernelTools; use Bitweaver\Liberty\LibertyBase; @@ -206,7 +207,7 @@ $listHash = [ 'no_thumbnails' => true, 'sort_mode' => 'title_asc', 'show_empty' => true, - 'offset' => 0 + 'offset' => 0, ]; // modify listHash according to global preferences if( $gBitSystem->isFeatureActive( 'fisheye_show_all_to_admins' ) && $gBitUser->hasPermission( 'p_fisheye_admin' ) ) { diff --git a/includes/bit_setup_inc.php b/includes/bit_setup_inc.php index f048d3c..4e9d190 100755 --- a/includes/bit_setup_inc.php +++ b/includes/bit_setup_inc.php @@ -11,9 +11,9 @@ $pRegisterHash = [ define( 'FISHEYE_PKG_NAME', $pRegisterHash['package_name'] ); define( 'FISHEYE_PKG_URL', BIT_ROOT_URL . basename( $pRegisterHash['package_path'] ) . '/' ); define( 'FISHEYE_PKG_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/' ); -define( 'FISHEYE_PKG_INCLUDE_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/'); +define( 'FISHEYE_PKG_INCLUDE_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/'); define( 'FISHEYE_PKG_CLASS_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/classes/'); -define( 'FISHEYE_PKG_ADMIN_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/admin/'); +define( 'FISHEYE_PKG_ADMIN_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/admin/'); $gBitSystem->registerPackage( $pRegisterHash ); @@ -33,15 +33,15 @@ if( $gBitSystem->isPackageActive( 'fisheye' ) ) { // && $gBitUser->hasPermission define( 'LIBERTY_SERVICE_PHOTOSHARING', 'photosharing'); - $gLibertySystem->registerService( LIBERTY_SERVICE_PHOTOSHARING, FISHEYE_PKG_NAME, array( + $gLibertySystem->registerService( LIBERTY_SERVICE_PHOTOSHARING, FISHEYE_PKG_NAME, [ 'users_expunge_function' => 'fisheye_expunge_user', - ) ); + ] ); function fisheye_expunge_user( $pObject ) { global $gBitDb; if( !empty( $pObject->mUserId ) ) { $query = "SELECT fg.`content_id` FROM `".BIT_DB_PREFIX."fisheye_gallery` fg INNER JOIN `".BIT_DB_PREFIX."liberty_content` lc ON(fg.`content_id`=lc.`content_id`) WHERE lc.`user_id`=?"; - if( $galleries = $gBitDb->getCol( $query, array( $pObject->mUserId ) ) ) { + if( $galleries = $gBitDb->getCol( $query, [ $pObject->mUserId ] ) ) { foreach( $galleries as $contentId ) { $delGallery = new FisheyeGallery( null, $contentId ); if( $delGallery->load() ) { diff --git a/includes/classes/FisheyeBase.php b/includes/classes/FisheyeBase.php index 3cca1bd..f4b267c 100755 --- a/includes/classes/FisheyeBase.php +++ b/includes/classes/FisheyeBase.php @@ -7,6 +7,7 @@ * required setup */ namespace Bitweaver\Fisheye; + use Bitweaver\Liberty\LibertyMime; // FisheyeGallery base class use Bitweaver\Liberty\LibertyContent; @@ -37,9 +38,9 @@ abstract class FisheyeBase extends LibertyMime public function isMachineName( $pString ) { if ( !empty($pString) ) { return preg_match( '/(^[0-9][-0-9 ]*$)|(^[-0-9 ]*(img|dsc|dscn|pict|htg|dscf|p)[-0-9 ][-0-9 ]*.*$)/i', trim( $pString ) ); - } else { - return ''; } + return ''; + } // Gets a list of galleries which this item is attached to @@ -205,7 +206,6 @@ not ready for primetime return $ret; } - public function addToGalleries( $pGalleryArray ) { global $gBitSystem; if( $this->isValid() ) { @@ -219,7 +219,7 @@ not ready for primetime case 'newest': $galleryId = $this->mDb->getAssoc( "SELECT `gallery_id` FROM `".BIT_DB_PREFIX."fisheye_gallery` fg INNER JOIN `".BIT_DB_PREFIX."liberty_content` lc ON (fg.`content_id`=lg.`content_id`) WHERE `user_id` = ? ORDER BY gallery_id DESC", [ $this->getField( 'user_id' ) ] ); break; - + } } if( empty( $inGalleries[$galleryId] ) ) { diff --git a/includes/classes/FisheyeGallery.php b/includes/classes/FisheyeGallery.php index 19a23fd..16d5b88 100755 --- a/includes/classes/FisheyeGallery.php +++ b/includes/classes/FisheyeGallery.php @@ -7,8 +7,8 @@ * required setup */ namespace Bitweaver\Fisheye; + use Bitweaver\BitBase; -use Bitweaver\KernelTools; use Bitweaver\Liberty\LibertyContent; define( 'FISHEYE_PAGINATION_FIXED_GRID', 'fixed_grid' ); @@ -52,8 +52,8 @@ class FisheyeGallery extends FisheyeBase { 'handler_class' => 'FisheyeGallery', 'handler_package' => 'fisheye', 'handler_file' => 'FisheyeGallery.php', - 'maintainer_url' => 'https://www.bitweaver.org' - ] ); + 'maintainer_url' => 'https://www.bitweaver.org', + ], ); // Permission setup $this->mViewContentPerm = 'p_fisheye_view'; @@ -81,7 +81,7 @@ class FisheyeGallery extends FisheyeBase { $lookupContentId = null; if (!empty($pLookupHash['gallery_id']) && is_numeric($pLookupHash['gallery_id'])) { if( $lookup = $gBitDb->getRow( "SELECT lc.`content_id`, lc.`content_type_guid` FROM `".BIT_DB_PREFIX."fisheye_gallery` fg INNER JOIN `".BIT_DB_PREFIX."liberty_content` lc ON(lc.`content_id`=fg.`content_id`) WHERE `gallery_id`=?", [ $pLookupHash['gallery_id'] ] ) ) { - $lookupContentId = $lookup['content_id']; + $lookupContentId = $lookup['content_id']; $lookupContentGuid = $lookup['content_type_guid']; } } elseif (!empty($pLookupHash['content_id']) && is_numeric($pLookupHash['content_id'])) { @@ -100,7 +100,7 @@ class FisheyeGallery extends FisheyeBase { global $gBitSystem; $bindVars = []; $selectSql = $joinSql = $whereSql = ''; - + if( $this->verifyId( $this->mGalleryId ) ) { $whereSql = " WHERE fg.`gallery_id` = ?"; $bindVars = [ $this->mGalleryId ]; @@ -124,16 +124,16 @@ class FisheyeGallery extends FisheyeBase { $whereSql"; $rs = $this->mDb->getRow($query, $bindVars); if( !empty($rs) ) { - $this->mInfo = $rs; - $this->mContentId = $rs['content_id']; + $this->mInfo = $rs; + $this->mContentId = $rs['content_id']; LibertyContent::load(); if( @$this->verifyId($this->mInfo['gallery_id'] ) ) { $this->mGalleryId = $this->mInfo['gallery_id']; $this->mContentId = $this->mInfo['content_id']; - $this->mInfo['creator'] = isset( $rs['creator_real_name'] ) ? $rs['creator_real_name'] : $rs['creator_user']; - $this->mInfo['editor'] = isset( $rs['modifier_real_name'] ) ? $rs['modifier_real_name'] : $rs['modifier_user']; + $this->mInfo['creator'] = $rs['creator_real_name'] ?? $rs['creator_user']; + $this->mInfo['editor'] = $rs['modifier_real_name'] ?? $rs['modifier_user']; // Set some basic defaults for how to display a gallery if they're not already set if (empty($this->mInfo['thumbnail_size'])) { @@ -227,7 +227,7 @@ class FisheyeGallery extends FisheyeBase { $orderSql = $gBitSystem->isFeatureActive( 'fisheye_gallery_default_sort_mode' ) ? ", ".$this->mDb->convertSortmode( $gBitSystem->getConfig( 'fisheye_gallery_default_sort_mode' ) ) : ", fgim.`item_content_id`"; - + // load for just a single page if( $pListHash['page'] != -1 ) { if( $this->getLayout() == FISHEYE_PAGINATION_POSITION_NUMBER ) { @@ -236,7 +236,7 @@ class FisheyeGallery extends FisheyeBase { WHERE gallery_content_id=? ORDER BY floor(item_position)"; $mantissa = $this->mDb->getOne( $query, [ $this->mContentId ], 1, $pListHash['page'] - 1 ); - // gallery image order with no positions set will have null mantissa, and all images will be shown + // gallery image order with no positions set will have null mantissa, and all images will be shown if( !is_null( $mantissa ) ) { $whereSql .= " AND floor(item_position)=? "; array_push( $bindVars, $mantissa ); @@ -261,7 +261,7 @@ class FisheyeGallery extends FisheyeBase { WHERE fgim.`gallery_content_id` = ? $whereSql ORDER BY fgim.`item_position` $orderSql"; $rows = $this->mDb->query($query, $bindVars, $rowCount, $offset); - foreach ($rows as $row) { + foreach ($rows as $row) { $pass = true; if( $gBitSystem->isPackageActive( 'gatekeeper' ) ) { $pass = $gBitUser->hasPermission( 'p_fisheye_admin' ) || !@$this->verifyId( $row['security_id'] ) || ( $row['user_id'] == $gBitUser->mUserId ) || @$this->verifyId( $_SESSION['gatekeeper_security'][$row['security_id']] ); @@ -279,7 +279,7 @@ class FisheyeGallery extends FisheyeBase { LibertyContent::postGetList( $pListHash ); - return \count ( $this->mItems ) > 0; + return \count ( $this->mItems ) > 0; } public function getImageList() { @@ -393,7 +393,6 @@ class FisheyeGallery extends FisheyeBase { return count($this->mErrors) == 0; } - public function generateGalleryThumbnails(): void { if( $this->isValid() ) { if( $this->loadImages() ) { @@ -404,7 +403,6 @@ class FisheyeGallery extends FisheyeBase { } } - public function getThumbnailContentId() { if( !$this->getField( 'thumbnail_content_id' ) ) { $this->getThumbnailImage(); @@ -422,7 +420,6 @@ class FisheyeGallery extends FisheyeBase { } } - public function getThumbnailUrl( string $pSize = 'small', ?array $pInfoHash = null, ?int $pSecondaryId = null, ?int $pDefault = null ): string|null { if( empty( $this->mInfo['preview_content'] ) ) { $this->loadThumbnail(); @@ -434,7 +431,6 @@ class FisheyeGallery extends FisheyeBase { return ''; } - public function getThumbnailImage( $pContentId=null, $pThumbnailContentId=null, $pThumbnailContentType=null ) { global $gLibertySystem, $gBitUser; $ret = null; @@ -491,7 +487,6 @@ class FisheyeGallery extends FisheyeBase { return $ret; } - public function loadThumbnail( $pSize='small', $pContentId=null ) { if( $this->mPreviewImage = $this->getThumbnailImage( $pContentId ) ) { $this->mInfo['preview_content'] = &$this->mPreviewImage; @@ -499,7 +494,6 @@ class FisheyeGallery extends FisheyeBase { } } - public function storeGalleryThumbnail($pContentId = null) { $ret = false; if ($pContentId && !$this->isInGallery( $this->mContentId, $pContentId ) ) { @@ -557,11 +551,11 @@ class FisheyeGallery extends FisheyeBase { return $ret; } - /** - * Adds a new item (image or gallery) to this gallery. We check to make sure we are not a member + /** + * Adds a new item (image or gallery) to this gallery. We check to make sure we are not a member * of this gallery and this gallery is not a member of the new item to avoid infinite recursion scenarios - * @return bool wheter or not the item was added - */ + * @return bool wheter or not the item was added + */ public function addItem( $pContentId, $pPosition=null ) { global $gBitSystem; $ret = false; @@ -615,7 +609,6 @@ class FisheyeGallery extends FisheyeBase { return true; } - public function galleryExistsInDatabase() { $ret = false; @@ -631,10 +624,10 @@ class FisheyeGallery extends FisheyeBase { return $ret; } - /** - * Returns the layout of the gallery accounting for various defaults - * @return string the layout string preference - */ + /** + * Returns the layout of the gallery accounting for various defaults + * @return string the layout string preference + */ public function getLayout() { global $gBitSystem; return $this->getPreference( 'gallery_pagination', $gBitSystem->getConfig( 'default_gallery_pagination', FISHEYE_PAGINATION_GALLERIFFIC ) ); @@ -651,30 +644,30 @@ class FisheyeGallery extends FisheyeBase { ]; } - /** - * Returns include file that will setup the object for rendering - * @return string the fully specified path to file to be included - */ + /** + * Returns include file that will setup the object for rendering + * @return string the fully specified path to file to be included + */ public function getRenderFile() { return FISHEYE_PKG_INCLUDE_PATH.'display_fisheye_gallery_inc.php'; } - /** - * Returns template file used for display - * @return string the fully specified path to file to be included - */ + /** + * Returns template file used for display + * @return string the fully specified path to file to be included + */ public function getRenderTemplate() { return 'bitpackage:fisheye/view_gallery.tpl'; } - /** - * Function that returns link to display a piece of content - * @param array pGalleryId id of gallery to link - * @return string the url to display the gallery. - */ + /** + * Function that returns link to display a piece of content + * @param array pGalleryId id of gallery to link + * @return string the url to display the gallery. + */ public static function getDisplayUrlFromHash( &$pParamHash ) { $path = null; - $ret = ''; + $ret = ''; if( BitBase::verifyIdParameter( $pParamHash, 'gallery_id' ) ) { $ret = FISHEYE_PKG_URL; global $gBitSystem; @@ -790,8 +783,6 @@ class FisheyeGallery extends FisheyeBase { WHERE lc.`content_type_guid` = 'fisheyegallery' $whereSql ORDER BY T.BRANCH, fgimo.`item_position`"; - - if( !empty( $bindVars ) ) { FisheyeGallery::splitConnectByTree( $ret, $gBitDb->GetAssoc( $query, $bindVars ) ); } else { @@ -911,7 +902,6 @@ class FisheyeGallery extends FisheyeBase { return $ret; } - // Generate a select drop menu of listed galleries public function generateMenu( $pListHash, $pOptions, $pLocate=null ) { $ret = "