summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--].htaccess0
-rwxr-xr-xadmin/admin_fisheye_inc.php10
-rwxr-xr-xadmin/schema_inc.php12
-rwxr-xr-xbrowse.php1
-rwxr-xr-x[-rw-r--r--]css/div_layout.css0
-rwxr-xr-x[-rw-r--r--]css/fisheye.css0
-rwxr-xr-xedit.php19
-rwxr-xr-xedit_gallery_perms.php1
-rwxr-xr-xedit_image.php3
-rwxr-xr-xfind_user.php2
-rwxr-xr-xfisheye_rss.php1
-rwxr-xr-x[-rw-r--r--]gallery_views/ajax_scroller/fisheye_ajax_scroller_inc.tpl0
-rwxr-xr-xgallery_views/fixed_grid/fisheye_fixed_grid_inc3.tpl51
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/basic.css0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/black.css0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/caption.pngbin3542 -> 3542 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/galleriffic-1.css0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/galleriffic-2.css0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/galleriffic-3.css0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/galleriffic-4.css0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/galleriffic-5.css0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/galleriffic_style_1.css0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/jush.css0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/loader.gifbin10453 -> 10453 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/loaderWhite.gifbin10294 -> 10294 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/nextPageArrow.gifbin79 -> 79 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/nextPageArrowWhite.gifbin79 -> 79 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/prevPageArrow.gifbin78 -> 78 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/prevPageArrowWhite.gifbin78 -> 78 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/css/white.css0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/example-1.html0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/example-2.html0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/example-3.html0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/example-4.html0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/example-5.html0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/fisheye_galleriffic_inc.tpl0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/gftop.js0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/index.html0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/js/jquery-1.3.2.js0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/js/jquery.galleriffic.js0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/js/jquery.history.js0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/js/jquery.opacityrollover.js0
-rwxr-xr-x[-rw-r--r--]gallery_views/galleriffic/js/jush.js0
-rwxr-xr-x[-rw-r--r--]gallery_views/matteo/icons/white/loaded.gifbin46 -> 46 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/matteo/icons/white/loader.gifbin177 -> 177 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/matteo/icons/white/next.gifbin851 -> 851 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/matteo/icons/white/play.gifbin276 -> 276 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/matteo/icons/white/prev.gifbin165 -> 165 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/matteo/icons/white/separator.gifbin60 -> 60 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/matteo/icons/white/stop.gifbin275 -> 275 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/matteo/icons/white/thumb copia.gifbin477 -> 477 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/matteo/icons/white/thumb.gifbin99 -> 99 bytes
-rwxr-xr-x[-rw-r--r--]gallery_views/matteo/mbGallery.js0
-rwxr-xr-x[-rw-r--r--]gallery_views/matteo/mbGalleryBox.js0
-rwxr-xr-x[-rw-r--r--]gallery_views/matteo/mb_layout.css0
-rwxr-xr-x[-rw-r--r--]icons/black/loaded.gifbin46 -> 46 bytes
-rwxr-xr-x[-rw-r--r--]icons/black/loader.gifbin177 -> 177 bytes
-rwxr-xr-x[-rw-r--r--]icons/black/next.gifbin851 -> 851 bytes
-rwxr-xr-x[-rw-r--r--]icons/black/play.gifbin276 -> 276 bytes
-rwxr-xr-x[-rw-r--r--]icons/black/prev.gifbin165 -> 165 bytes
-rwxr-xr-x[-rw-r--r--]icons/black/separator.gifbin60 -> 60 bytes
-rwxr-xr-x[-rw-r--r--]icons/black/stop.gifbin275 -> 275 bytes
-rwxr-xr-x[-rw-r--r--]icons/black/thumb copia.gifbin477 -> 477 bytes
-rwxr-xr-x[-rw-r--r--]icons/black/thumb.gifbin99 -> 99 bytes
-rwxr-xr-x[-rw-r--r--]icons/label_bgnd.gifbin100 -> 100 bytes
-rwxr-xr-x[-rw-r--r--]icons/order.gifbin374 -> 374 bytes
-rwxr-xr-x[-rw-r--r--]icons/order.pngbin662 -> 662 bytes
-rwxr-xr-x[-rw-r--r--]icons/pkg_fisheye.gifbin1795 -> 1795 bytes
-rwxr-xr-x[-rw-r--r--]icons/pkg_fisheye.pngbin5111 -> 5111 bytes
-rwxr-xr-x[-rw-r--r--]icons/rotate_auto.gifbin358 -> 358 bytes
-rwxr-xr-x[-rw-r--r--]icons/rotate_auto.pngbin649 -> 649 bytes
-rwxr-xr-x[-rw-r--r--]icons/rotate_ccw.gifbin362 -> 362 bytes
-rwxr-xr-x[-rw-r--r--]icons/rotate_ccw.pngbin646 -> 646 bytes
-rwxr-xr-x[-rw-r--r--]icons/rotate_cw.gifbin358 -> 358 bytes
-rwxr-xr-x[-rw-r--r--]icons/rotate_cw.pngbin661 -> 661 bytes
-rwxr-xr-x[-rw-r--r--]image/generating_thumbnails.pngbin4042 -> 4042 bytes
-rwxr-xr-x[-rw-r--r--]image/no_image.pngbin2292 -> 2292 bytes
-rwxr-xr-ximage_order.php3
-rwxr-xr-xincludes/bit_setup_inc.php10
-rwxr-xr-xincludes/classes/FisheyeBase.php8
-rwxr-xr-xincludes/classes/FisheyeGallery.php86
-rwxr-xr-xincludes/classes/FisheyeImage.php65
-rwxr-xr-xincludes/classes/FisheyeRemote.php87
-rwxr-xr-xincludes/gallery_lookup_inc.php2
-rwxr-xr-xincludes/upload_inc.php6
-rwxr-xr-xliberty_plugins/data.carousel.php16
-rwxr-xr-xliberty_plugins/data.gallery.php12
-rwxr-xr-xliberty_plugins/data.image.php4
-rwxr-xr-xmain.php5
-rwxr-xr-xmodules/mod_banner_rand.php5
-rwxr-xr-xmodules/mod_images.php2
-rwxr-xr-xmodules/mod_specials.php7
-rwxr-xr-xtemplates/center_image_comments.php6
-rwxr-xr-xtemplates/center_list_galleries.php3
-rwxr-xr-x[-rw-r--r--]templates/center_list_galleries.tpl0
-rwxr-xr-x[-rw-r--r--]templates/find_user.tpl0
-rwxr-xr-xtemplates/image_order.tpl2
-rwxr-xr-x[-rw-r--r--]templates/view_gallery.tpl0
-rwxr-xr-xthumbnailer.php7
-rwxr-xr-xupload.php1
-rwxr-xr-xview.php4
101 files changed, 238 insertions, 203 deletions
diff --git a/.htaccess b/.htaccess
index 0954a8f..0954a8f 100644..100755
--- a/.htaccess
+++ b/.htaccess
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 <a href="'.FISHEYE_PKG_URL.'thumbnailer.php">run it manually</a>',
- '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' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>'
+ 'license' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>',
] );
// ### 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
index 96f9b3f..96f9b3f 100644..100755
--- a/css/div_layout.css
+++ b/css/div_layout.css
diff --git a/css/fisheye.css b/css/fisheye.css
index 68eb675..68eb675 100644..100755
--- a/css/fisheye.css
+++ b/css/fisheye.css
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'] = [
'<label><input name="recurse" value="" type="radio" checked="checked" /> '.KernelTools::tra( 'Delete only images in this gallery. Sub-galleries will not be removed.' ).'</label>',
'<label><input name="recurse" value="all" type="radio" /> '.KernelTools::tra( 'Permanently delete all contents, even if they appear in other galleries.' ).'</label>',
- );
+ ];
$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
index f390627..f390627 100644..100755
--- a/gallery_views/ajax_scroller/fisheye_ajax_scroller_inc.tpl
+++ b/gallery_views/ajax_scroller/fisheye_ajax_scroller_inc.tpl
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" *}
+<div class="display fisheye container">
+ <div class="header col-xs-12">
+ {include file="bitpackage:fisheye/gallery_icons_inc.tpl"}
+ <h1>{$gContent->getTitle()|escape}</h1>
+ </div>
+
+ <div class="body col-xs-12">
+ {formfeedback success=$fisheyeSuccess error=$fisheyeErrors warning=$fisheyeWarnings}
+
+ {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo}
+ {if $gContent->mInfo.data}
+ <p>{$gContent->mInfo.data|escape}</p>
+ {/if}
+
+ <div class="col-xs-12">
+ {counter assign="imageCount" start="0" print=false}
+ {assign var="max" value=100}
+ {foreach from=$gContent->mItems item=galItem key=itemContentId}
+ <div class="col-md-4 col-sm-6 col-xs-12"> <!-- Begin Image Cell -->
+ <div class="col-xs-12 gallery-box">
+ <a href="{$galItem->getDisplayUrl()|escape}">
+ <div class="col-xs-12 gallery-img table-cell">
+ <img class="col-xs-12 thumb" src="{$galItem->getThumbnailUri($gContent->getField('thumbnail_size'))}" alt="{$galItem->mInfo.title|escape|default:'image'}" />
+ </div>
+ <div class="col-xs-12 gallery-img-title table-cell center">
+ <h3>{$galItem->mInfo.title|escape}</h3>
+ </div>
+ </a>
+ </div>
+ </div> <!-- End Image Cell -->
+ {counter}
+ {if $imageCount % 2 == 0}<div class="hidden-xs hidden-md hidden-lg clear"></div>{/if}
+ {if $imageCount % 3 == 0}<div class="hidden-xs hidden-sm clear"></div>{/if}
+ {foreachelse}
+ <tr><td class="norecords">{tr}This gallery is empty{/tr}. <a href="{$smarty.const.FISHEYE_PKG_URL}upload.php?gallery_id={$gContent->mGalleryId}">Upload pictures!</a></td></tr>
+ {/foreach}
+ </div>
+ <div class="clear"></div>
+ </div> <!-- end .body -->
+
+ {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}
+</div> <!-- end .fisheye -->
+{/strip}
diff --git a/gallery_views/galleriffic/css/basic.css b/gallery_views/galleriffic/css/basic.css
index 1cc8630..1cc8630 100644..100755
--- a/gallery_views/galleriffic/css/basic.css
+++ b/gallery_views/galleriffic/css/basic.css
diff --git a/gallery_views/galleriffic/css/black.css b/gallery_views/galleriffic/css/black.css
index 59d0134..59d0134 100644..100755
--- a/gallery_views/galleriffic/css/black.css
+++ b/gallery_views/galleriffic/css/black.css
diff --git a/gallery_views/galleriffic/css/caption.png b/gallery_views/galleriffic/css/caption.png
index b49e5fc..b49e5fc 100644..100755
--- a/gallery_views/galleriffic/css/caption.png
+++ b/gallery_views/galleriffic/css/caption.png
Binary files differ
diff --git a/gallery_views/galleriffic/css/galleriffic-1.css b/gallery_views/galleriffic/css/galleriffic-1.css
index 754efc0..754efc0 100644..100755
--- a/gallery_views/galleriffic/css/galleriffic-1.css
+++ b/gallery_views/galleriffic/css/galleriffic-1.css
diff --git a/gallery_views/galleriffic/css/galleriffic-2.css b/gallery_views/galleriffic/css/galleriffic-2.css
index 4b1208b..4b1208b 100644..100755
--- a/gallery_views/galleriffic/css/galleriffic-2.css
+++ b/gallery_views/galleriffic/css/galleriffic-2.css
diff --git a/gallery_views/galleriffic/css/galleriffic-3.css b/gallery_views/galleriffic/css/galleriffic-3.css
index 4b1208b..4b1208b 100644..100755
--- a/gallery_views/galleriffic/css/galleriffic-3.css
+++ b/gallery_views/galleriffic/css/galleriffic-3.css
diff --git a/gallery_views/galleriffic/css/galleriffic-4.css b/gallery_views/galleriffic/css/galleriffic-4.css
index 4a69037..4a69037 100644..100755
--- a/gallery_views/galleriffic/css/galleriffic-4.css
+++ b/gallery_views/galleriffic/css/galleriffic-4.css
diff --git a/gallery_views/galleriffic/css/galleriffic-5.css b/gallery_views/galleriffic/css/galleriffic-5.css
index 1c7ff70..1c7ff70 100644..100755
--- a/gallery_views/galleriffic/css/galleriffic-5.css
+++ b/gallery_views/galleriffic/css/galleriffic-5.css
diff --git a/gallery_views/galleriffic/css/galleriffic_style_1.css b/gallery_views/galleriffic/css/galleriffic_style_1.css
index 6283898..6283898 100644..100755
--- a/gallery_views/galleriffic/css/galleriffic_style_1.css
+++ b/gallery_views/galleriffic/css/galleriffic_style_1.css
diff --git a/gallery_views/galleriffic/css/jush.css b/gallery_views/galleriffic/css/jush.css
index 07a0421..07a0421 100644..100755
--- a/gallery_views/galleriffic/css/jush.css
+++ b/gallery_views/galleriffic/css/jush.css
diff --git a/gallery_views/galleriffic/css/loader.gif b/gallery_views/galleriffic/css/loader.gif
index 36b04f2..36b04f2 100644..100755
--- a/gallery_views/galleriffic/css/loader.gif
+++ b/gallery_views/galleriffic/css/loader.gif
Binary files differ
diff --git a/gallery_views/galleriffic/css/loaderWhite.gif b/gallery_views/galleriffic/css/loaderWhite.gif
index c095f68..c095f68 100644..100755
--- a/gallery_views/galleriffic/css/loaderWhite.gif
+++ b/gallery_views/galleriffic/css/loaderWhite.gif
Binary files differ
diff --git a/gallery_views/galleriffic/css/nextPageArrow.gif b/gallery_views/galleriffic/css/nextPageArrow.gif
index 6300aae..6300aae 100644..100755
--- a/gallery_views/galleriffic/css/nextPageArrow.gif
+++ b/gallery_views/galleriffic/css/nextPageArrow.gif
Binary files differ
diff --git a/gallery_views/galleriffic/css/nextPageArrowWhite.gif b/gallery_views/galleriffic/css/nextPageArrowWhite.gif
index 96d6069..96d6069 100644..100755
--- a/gallery_views/galleriffic/css/nextPageArrowWhite.gif
+++ b/gallery_views/galleriffic/css/nextPageArrowWhite.gif
Binary files differ
diff --git a/gallery_views/galleriffic/css/prevPageArrow.gif b/gallery_views/galleriffic/css/prevPageArrow.gif
index 337c37a..337c37a 100644..100755
--- a/gallery_views/galleriffic/css/prevPageArrow.gif
+++ b/gallery_views/galleriffic/css/prevPageArrow.gif
Binary files differ
diff --git a/gallery_views/galleriffic/css/prevPageArrowWhite.gif b/gallery_views/galleriffic/css/prevPageArrowWhite.gif
index efe76e7..efe76e7 100644..100755
--- a/gallery_views/galleriffic/css/prevPageArrowWhite.gif
+++ b/gallery_views/galleriffic/css/prevPageArrowWhite.gif
Binary files differ
diff --git a/gallery_views/galleriffic/css/white.css b/gallery_views/galleriffic/css/white.css
index c3a40f5..c3a40f5 100644..100755
--- a/gallery_views/galleriffic/css/white.css
+++ b/gallery_views/galleriffic/css/white.css
diff --git a/gallery_views/galleriffic/example-1.html b/gallery_views/galleriffic/example-1.html
index ef92d14..ef92d14 100644..100755
--- a/gallery_views/galleriffic/example-1.html
+++ b/gallery_views/galleriffic/example-1.html
diff --git a/gallery_views/galleriffic/example-2.html b/gallery_views/galleriffic/example-2.html
index a703052..a703052 100644..100755
--- a/gallery_views/galleriffic/example-2.html
+++ b/gallery_views/galleriffic/example-2.html
diff --git a/gallery_views/galleriffic/example-3.html b/gallery_views/galleriffic/example-3.html
index df39b13..df39b13 100644..100755
--- a/gallery_views/galleriffic/example-3.html
+++ b/gallery_views/galleriffic/example-3.html
diff --git a/gallery_views/galleriffic/example-4.html b/gallery_views/galleriffic/example-4.html
index f527085..f527085 100644..100755
--- a/gallery_views/galleriffic/example-4.html
+++ b/gallery_views/galleriffic/example-4.html
diff --git a/gallery_views/galleriffic/example-5.html b/gallery_views/galleriffic/example-5.html
index 42f76a9..42f76a9 100644..100755
--- a/gallery_views/galleriffic/example-5.html
+++ b/gallery_views/galleriffic/example-5.html
diff --git a/gallery_views/galleriffic/fisheye_galleriffic_inc.tpl b/gallery_views/galleriffic/fisheye_galleriffic_inc.tpl
index 8a83fe2..8a83fe2 100644..100755
--- a/gallery_views/galleriffic/fisheye_galleriffic_inc.tpl
+++ b/gallery_views/galleriffic/fisheye_galleriffic_inc.tpl
diff --git a/gallery_views/galleriffic/gftop.js b/gallery_views/galleriffic/gftop.js
index adbd29b..adbd29b 100644..100755
--- a/gallery_views/galleriffic/gftop.js
+++ b/gallery_views/galleriffic/gftop.js
diff --git a/gallery_views/galleriffic/index.html b/gallery_views/galleriffic/index.html
index 2e36b29..2e36b29 100644..100755
--- a/gallery_views/galleriffic/index.html
+++ b/gallery_views/galleriffic/index.html
diff --git a/gallery_views/galleriffic/js/jquery-1.3.2.js b/gallery_views/galleriffic/js/jquery-1.3.2.js
index 462cde5..462cde5 100644..100755
--- a/gallery_views/galleriffic/js/jquery-1.3.2.js
+++ b/gallery_views/galleriffic/js/jquery-1.3.2.js
diff --git a/gallery_views/galleriffic/js/jquery.galleriffic.js b/gallery_views/galleriffic/js/jquery.galleriffic.js
index a3d78db..a3d78db 100644..100755
--- a/gallery_views/galleriffic/js/jquery.galleriffic.js
+++ b/gallery_views/galleriffic/js/jquery.galleriffic.js
diff --git a/gallery_views/galleriffic/js/jquery.history.js b/gallery_views/galleriffic/js/jquery.history.js
index 763e6e4..763e6e4 100644..100755
--- a/gallery_views/galleriffic/js/jquery.history.js
+++ b/gallery_views/galleriffic/js/jquery.history.js
diff --git a/gallery_views/galleriffic/js/jquery.opacityrollover.js b/gallery_views/galleriffic/js/jquery.opacityrollover.js
index c75bd95..c75bd95 100644..100755
--- a/gallery_views/galleriffic/js/jquery.opacityrollover.js
+++ b/gallery_views/galleriffic/js/jquery.opacityrollover.js
diff --git a/gallery_views/galleriffic/js/jush.js b/gallery_views/galleriffic/js/jush.js
index 20d3a85..20d3a85 100644..100755
--- a/gallery_views/galleriffic/js/jush.js
+++ b/gallery_views/galleriffic/js/jush.js
diff --git a/gallery_views/matteo/icons/white/loaded.gif b/gallery_views/matteo/icons/white/loaded.gif
index bf2f99b..bf2f99b 100644..100755
--- a/gallery_views/matteo/icons/white/loaded.gif
+++ b/gallery_views/matteo/icons/white/loaded.gif
Binary files differ
diff --git a/gallery_views/matteo/icons/white/loader.gif b/gallery_views/matteo/icons/white/loader.gif
index 2755ede..2755ede 100644..100755
--- a/gallery_views/matteo/icons/white/loader.gif
+++ b/gallery_views/matteo/icons/white/loader.gif
Binary files differ
diff --git a/gallery_views/matteo/icons/white/next.gif b/gallery_views/matteo/icons/white/next.gif
index b65c468..b65c468 100644..100755
--- a/gallery_views/matteo/icons/white/next.gif
+++ b/gallery_views/matteo/icons/white/next.gif
Binary files differ
diff --git a/gallery_views/matteo/icons/white/play.gif b/gallery_views/matteo/icons/white/play.gif
index f240dd1..f240dd1 100644..100755
--- a/gallery_views/matteo/icons/white/play.gif
+++ b/gallery_views/matteo/icons/white/play.gif
Binary files differ
diff --git a/gallery_views/matteo/icons/white/prev.gif b/gallery_views/matteo/icons/white/prev.gif
index c58201a..c58201a 100644..100755
--- a/gallery_views/matteo/icons/white/prev.gif
+++ b/gallery_views/matteo/icons/white/prev.gif
Binary files differ
diff --git a/gallery_views/matteo/icons/white/separator.gif b/gallery_views/matteo/icons/white/separator.gif
index 6a77c12..6a77c12 100644..100755
--- a/gallery_views/matteo/icons/white/separator.gif
+++ b/gallery_views/matteo/icons/white/separator.gif
Binary files differ
diff --git a/gallery_views/matteo/icons/white/stop.gif b/gallery_views/matteo/icons/white/stop.gif
index db1e26b..db1e26b 100644..100755
--- a/gallery_views/matteo/icons/white/stop.gif
+++ b/gallery_views/matteo/icons/white/stop.gif
Binary files differ
diff --git a/gallery_views/matteo/icons/white/thumb copia.gif b/gallery_views/matteo/icons/white/thumb copia.gif
index 949b935..949b935 100644..100755
--- a/gallery_views/matteo/icons/white/thumb copia.gif
+++ b/gallery_views/matteo/icons/white/thumb copia.gif
Binary files differ
diff --git a/gallery_views/matteo/icons/white/thumb.gif b/gallery_views/matteo/icons/white/thumb.gif
index 7063a62..7063a62 100644..100755
--- a/gallery_views/matteo/icons/white/thumb.gif
+++ b/gallery_views/matteo/icons/white/thumb.gif
Binary files differ
diff --git a/gallery_views/matteo/mbGallery.js b/gallery_views/matteo/mbGallery.js
index 30ea353..30ea353 100644..100755
--- a/gallery_views/matteo/mbGallery.js
+++ b/gallery_views/matteo/mbGallery.js
diff --git a/gallery_views/matteo/mbGalleryBox.js b/gallery_views/matteo/mbGalleryBox.js
index 0e2d545..0e2d545 100644..100755
--- a/gallery_views/matteo/mbGalleryBox.js
+++ b/gallery_views/matteo/mbGalleryBox.js
diff --git a/gallery_views/matteo/mb_layout.css b/gallery_views/matteo/mb_layout.css
index 374af37..374af37 100644..100755
--- a/gallery_views/matteo/mb_layout.css
+++ b/gallery_views/matteo/mb_layout.css
diff --git a/icons/black/loaded.gif b/icons/black/loaded.gif
index bf2f99b..bf2f99b 100644..100755
--- a/icons/black/loaded.gif
+++ b/icons/black/loaded.gif
Binary files differ
diff --git a/icons/black/loader.gif b/icons/black/loader.gif
index 2755ede..2755ede 100644..100755
--- a/icons/black/loader.gif
+++ b/icons/black/loader.gif
Binary files differ
diff --git a/icons/black/next.gif b/icons/black/next.gif
index bbafe86..bbafe86 100644..100755
--- a/icons/black/next.gif
+++ b/icons/black/next.gif
Binary files differ
diff --git a/icons/black/play.gif b/icons/black/play.gif
index 4a4196b..4a4196b 100644..100755
--- a/icons/black/play.gif
+++ b/icons/black/play.gif
Binary files differ
diff --git a/icons/black/prev.gif b/icons/black/prev.gif
index 01652f7..01652f7 100644..100755
--- a/icons/black/prev.gif
+++ b/icons/black/prev.gif
Binary files differ
diff --git a/icons/black/separator.gif b/icons/black/separator.gif
index ef70529..ef70529 100644..100755
--- a/icons/black/separator.gif
+++ b/icons/black/separator.gif
Binary files differ
diff --git a/icons/black/stop.gif b/icons/black/stop.gif
index d6aa8f9..d6aa8f9 100644..100755
--- a/icons/black/stop.gif
+++ b/icons/black/stop.gif
Binary files differ
diff --git a/icons/black/thumb copia.gif b/icons/black/thumb copia.gif
index c35f6fe..c35f6fe 100644..100755
--- a/icons/black/thumb copia.gif
+++ b/icons/black/thumb copia.gif
Binary files differ
diff --git a/icons/black/thumb.gif b/icons/black/thumb.gif
index 40a9aec..40a9aec 100644..100755
--- a/icons/black/thumb.gif
+++ b/icons/black/thumb.gif
Binary files differ
diff --git a/icons/label_bgnd.gif b/icons/label_bgnd.gif
index d2eefe5..d2eefe5 100644..100755
--- a/icons/label_bgnd.gif
+++ b/icons/label_bgnd.gif
Binary files differ
diff --git a/icons/order.gif b/icons/order.gif
index 095e1a5..095e1a5 100644..100755
--- a/icons/order.gif
+++ b/icons/order.gif
Binary files differ
diff --git a/icons/order.png b/icons/order.png
index 0e563c3..0e563c3 100644..100755
--- a/icons/order.png
+++ b/icons/order.png
Binary files differ
diff --git a/icons/pkg_fisheye.gif b/icons/pkg_fisheye.gif
index 3f50508..3f50508 100644..100755
--- a/icons/pkg_fisheye.gif
+++ b/icons/pkg_fisheye.gif
Binary files differ
diff --git a/icons/pkg_fisheye.png b/icons/pkg_fisheye.png
index 85a419e..85a419e 100644..100755
--- a/icons/pkg_fisheye.png
+++ b/icons/pkg_fisheye.png
Binary files differ
diff --git a/icons/rotate_auto.gif b/icons/rotate_auto.gif
index 2b3d742..2b3d742 100644..100755
--- a/icons/rotate_auto.gif
+++ b/icons/rotate_auto.gif
Binary files differ
diff --git a/icons/rotate_auto.png b/icons/rotate_auto.png
index 60a6716..60a6716 100644..100755
--- a/icons/rotate_auto.png
+++ b/icons/rotate_auto.png
Binary files differ
diff --git a/icons/rotate_ccw.gif b/icons/rotate_ccw.gif
index 402a801..402a801 100644..100755
--- a/icons/rotate_ccw.gif
+++ b/icons/rotate_ccw.gif
Binary files differ
diff --git a/icons/rotate_ccw.png b/icons/rotate_ccw.png
index 87f2fc2..87f2fc2 100644..100755
--- a/icons/rotate_ccw.png
+++ b/icons/rotate_ccw.png
Binary files differ
diff --git a/icons/rotate_cw.gif b/icons/rotate_cw.gif
index c986e27..c986e27 100644..100755
--- a/icons/rotate_cw.gif
+++ b/icons/rotate_cw.gif
Binary files differ
diff --git a/icons/rotate_cw.png b/icons/rotate_cw.png
index caf2fc7..caf2fc7 100644..100755
--- a/icons/rotate_cw.png
+++ b/icons/rotate_cw.png
Binary files differ
diff --git a/image/generating_thumbnails.png b/image/generating_thumbnails.png
index 6de661e..6de661e 100644..100755
--- a/image/generating_thumbnails.png
+++ b/image/generating_thumbnails.png
Binary files differ
diff --git a/image/no_image.png b/image/no_image.png
index aa6af3a..aa6af3a 100644..100755
--- a/image/no_image.png
+++ b/image/no_image.png
Binary files differ
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 = "<select class='form-control' ";
@@ -1036,7 +1026,7 @@ class FisheyeGallery extends FisheyeBase {
if( empty( $pListHash['no_thumbnails'] ) ) {
$thumbsize = !empty( $pListHash['thumbnail_size'] ) ? $pListHash['thumbnail_size'] : 'small';
foreach( array_keys( $data ) as $galleryId ) {
- $data[$galleryId]['display_url'] = static::getDisplayUrlFromHash( $data[$galleryId] );
+ $data[$galleryId]['display_url'] = static::getDisplayUrlFromHash( $data[$galleryId] );
$data[$galleryId]['display_uri'] = static::getDisplayUriFromHash( $data[$galleryId] );
if( $thumbImage = $this->getThumbnailImage( $data[$galleryId]['content_id'], $data[$galleryId]['preview_content_id'], $data[$galleryId]['preview_content_type_guid'] ) ) {
$data[$galleryId]['thumbnail_url'] = $thumbImage->getThumbnailUrl( $thumbsize );
@@ -1077,7 +1067,7 @@ class FisheyeGallery extends FisheyeBase {
if( $zip->open ($filename, \ZIPARCHIVE::OVERWRITE) !== true ){
$this->mErrors['download'] = "Unable to create zip file";
}else{
- addGalleryRecursive( $this->mGalleryId, $zip, $path);
+ addGalleryRecursive( $this->mGalleryId, $zip, $path);
}
$zip->close();
@@ -1122,7 +1112,7 @@ function addGalleryRecursive( $pGalleryId, &$pZip, $pPath = '/' ){
$title = $item->getTitle();
$pZip->addFile($sourcePath, $pPath.$title.substr($sourcePath,strrpos($sourcePath,'.')) );
} elseif ( is_a( $item , '\Bitweaver\Fisheye\FisheyeGallery' ) ) {
- addGalleryRecursive( $item->mGalleryId, $pZip ,$pPath );
+ addGalleryRecursive( $item->mGalleryId, $pZip ,$pPath );
}
}
}
diff --git a/includes/classes/FisheyeImage.php b/includes/classes/FisheyeImage.php
index d367d15..c2a1a25 100755
--- a/includes/classes/FisheyeImage.php
+++ b/includes/classes/FisheyeImage.php
@@ -7,6 +7,7 @@
* required setup
*/
namespace Bitweaver\Fisheye;
+
use Bitweaver\Liberty\LibertyContent;
use Bitweaver\Liberty\LibertyMime;
use Bitweaver\BitBase;
@@ -35,8 +36,8 @@ class FisheyeImage extends FisheyeBase {
'handler_class' => 'FisheyeImage',
'handler_package' => 'fisheye',
'handler_file' => 'FisheyeImage.php',
- 'maintainer_url' => 'https://www.bitweaver.org'
- ] );
+ 'maintainer_url' => 'https://www.bitweaver.org',
+ ], );
// Permission setup
$this->mViewContentPerm = 'p_fisheye_view';
@@ -103,8 +104,8 @@ class FisheyeImage extends FisheyeBase {
$this->mImageId = $this->mInfo['image_id'];
$this->mContentId = $this->mInfo['content_id'];
- $this->mInfo['creator'] = isset( $this->mInfo['creator_real_name'] ) ? $this->mInfo['creator_real_name'] : $this->mInfo['creator_user'];
- $this->mInfo['editor'] = isset( $this->mInfo['modifier_real_name'] ) ? $this->mInfo['modifier_real_name'] : $this->mInfo['modifier_user'];
+ $this->mInfo['creator'] = $this->mInfo['creator_real_name'] ?? $this->mInfo['creator_user'];
+ $this->mInfo['editor'] = $this->mInfo['modifier_real_name'] ?? $this->mInfo['modifier_user'];
if( $gBitSystem->isPackageActive( 'gatekeeper' ) && !@$this->verifyId( $this->mInfo['security_id'] ) ) {
// check to see if this image is in a protected gallery
@@ -363,7 +364,7 @@ class FisheyeImage extends FisheyeBase {
$fileHash['size'] = filesize( $fileHash['source_file'] );
$fileHash['dest_branch'] = dirname( $this->getSourceFile() ).'/';
$fileHash['name'] = $this->getField( 'file_name' );
- if( $pDegrees == 'auto' ) {
+ if( $pDegrees == 'auto' ) {
if( $exifOrientation = $this->getExifField( 'orientation' ) ) {
switch( $exifOrientation ) {
case 1: //) transform="";;
@@ -397,7 +398,7 @@ class FisheyeImage extends FisheyeBase {
}
if( is_numeric( $pDegrees ) ) {
$fileHash['degrees'] = $pDegrees;
-
+
if( ($rotateFunc = \Bitweaver\Liberty\liberty_get_function( 'rotate' )) && $rotateFunc( $fileHash ) ) {
\Bitweaver\Liberty\liberty_clear_thumbnails( $fileHash );
$this->mDb->getOne( "UPDATE `".BIT_DB_PREFIX."fisheye_image` SET `width`=`height`, `height`=`width` WHERE `content_id`=?", [ $this->mContentId ] );
@@ -413,7 +414,6 @@ class FisheyeImage extends FisheyeBase {
return count($this->mErrors) == 0;
}
-
/**
* convertColorspace
*
@@ -443,7 +443,6 @@ class FisheyeImage extends FisheyeBase {
return $ret;
}
-
public function resizeOriginal( $pResizeOriginal ) {
global $gBitSystem;
if( $this->getField( 'file_name' ) || $this->load() ) {
@@ -492,7 +491,6 @@ class FisheyeImage extends FisheyeBase {
return count($this->mErrors) == 0;
}
-
public function generateThumbnails( $pResizeOriginal=null, $pImmediateRender=false ) {
global $gBitSystem;
$ret = false;
@@ -510,7 +508,6 @@ class FisheyeImage extends FisheyeBase {
return $ret;
}
-
public function renderThumbnails( $pThumbSizes=null ) {
global $gBitSystem;
if( $this->getField( 'file_name' ) || $this->load() ) {
@@ -594,27 +591,27 @@ class FisheyeImage extends FisheyeBase {
return $this->getField('height');
}
- /**
- * Returns include file that will setup vars for display
- * @return string the fully specified path to file to be included
- */
+ /**
+ * Returns include file that will setup vars for display
+ * @return string the fully specified path to file to be included
+ */
public function getRenderFile() {
return FISHEYE_PKG_INCLUDE_PATH.'display_fisheye_image_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_image.tpl';
}
- /**
- * Function that returns link to display a piece of content
- * @param array pParamHash if a string, it is assumed to be the size, if an array, it is assumed to be a mInfo hash
- * @return string the url to display the gallery.
- */
+ /**
+ * Function that returns link to display a piece of content
+ * @param array pParamHash if a string, it is assumed to be the size, if an array, it is assumed to be a mInfo hash
+ * @return string the url to display the gallery.
+ */
public static function getDisplayUrlFromHash( &$pParamHash ) {
$ret = '';
$size = (!empty( $pParamHash['size'] ) && is_string( $pParamHash['size'] ) && isset( $pParamHash['thumbnail_url'][$pParamHash['size']] ) ) ? $pParamHash['size'] : null ;
@@ -644,10 +641,10 @@ class FisheyeImage extends FisheyeBase {
return $ret;
}
- /**
- * Function that returns link to display an image
- * @return string the url to display the gallery.
- */
+ /**
+ * Function that returns link to display an image
+ * @return string the url to display the gallery.
+ */
public function getDisplayUrl() {
$info = &$this->mInfo;
$info['image_id'] = $this->mImageId;
@@ -655,12 +652,12 @@ class FisheyeImage extends FisheyeBase {
return FisheyeImage::getDisplayUrlFromHash( $info );
}
- /**
- * Function that returns link to display an image
- * Used to display thumbnails for navigation bar
- * @param integer pImageId id of image to link
- * @return string the url to display the image.
- */
+ /**
+ * Function that returns link to display an image
+ * Used to display thumbnails for navigation bar
+ * @param integer pImageId id of image to link
+ * @return string the url to display the image.
+ */
public function getImageUrl( $pImageId ) {
$info = [ 'image_id' => $pImageId ];
return FisheyeImage::getDisplayUrlFromHash( $info );
@@ -718,7 +715,6 @@ class FisheyeImage extends FisheyeBase {
return $ret;
}
-
public function getThumbnailContentId() {
return $this->mContentId;
}
@@ -800,7 +796,6 @@ class FisheyeImage extends FisheyeBase {
return $ret;
}
-
public function getList( &$pListHash ) {
global $gBitUser,$gBitSystem;
diff --git a/includes/classes/FisheyeRemote.php b/includes/classes/FisheyeRemote.php
index d4da14e..9eee150 100755
--- a/includes/classes/FisheyeRemote.php
+++ b/includes/classes/FisheyeRemote.php
@@ -24,6 +24,7 @@
* required setup
*/
namespace Bitweaver\Fisheye;
+
use Bitweaver\KernelTools;
define( 'FEG2REMOTE_SUCCESS', 0 );
@@ -63,10 +64,9 @@ class FisheyeRemote {
return '2.14';
}
-
// separate out pPostData and pParamhash data since some plugins can populate _POST['g2_form'] and _GET['g2_form'] differently.
// weird but true. ubermind is an example
- public function processRequest( $pGetData, $pPostData ) {
+ public function processRequest( $pGetData, $pPostData ) {
$pData = array_merge($pGetData, $pPostData); //Some programs (galleryexport) pass both post and get...and the cmd can be in either get or post
if(!empty($pData)){
@@ -127,17 +127,16 @@ class FisheyeRemote {
if( !empty( $response ) ) {
print $this->sendResponse( $response );
}
- }
-
+ }
- public function cmdNoOp( $pParamHash ) {
+ public function cmdNoOp( $pParamHash ) {
global $gBitUser;
-
+
$response = $this->createResponse( FEG2REMOTE_SUCCESS, 'No-op successful' );
return $response;
- }
+ }
- public function cmdLogin( $pParamHash ) {
+ public function cmdLogin( $pParamHash ) {
global $gBitUser, $gBitSystem;
$url = $gBitUser->login( $pParamHash['uname'], $pParamHash['password'] );
$response = $gBitUser->isRegistered()
@@ -151,13 +150,13 @@ class FisheyeRemote {
: $this->createResponse( FEG2REMOTE_PASSWORD_WRONG, 'Invalid username or password' );
return $response;
- }
+ }
// Recursively traverses a multi-dimensional array of galleries
public function traverseGalleries( &$pGalHash, &$pResponse ) {
global $gBitUser;
- // Albums don't like being 0 indexed
+ // Albums don't like being 0 indexed
$this->mSubGalIdx = 0;
// the lightroom client is dumb, and can only handle one 0 level parent
@@ -171,20 +170,20 @@ class FisheyeRemote {
$pResponse['album.perms.del_alb.' . $this->mSubGalIdx] = 'false';
$pResponse['album.perms.create_sub.' . $this->mSubGalIdx] = 'true';
}
-
+
return $this->traverseSubGalleries( $pGalHash, $pResponse, 1 );
}
- /**
- * Function that returns link to display a piece of content
- * @param $pGalHash branch of gallery information from FisheyeGallery::getTree
- * @param $pResponse aggregate string containing response array
- * @param $pParentRandom depth of pGalHash - this is used to non-definitively uniquify album.parent and album.name entries
- * @return string the url to display the gallery.
- */
+ /**
+ * Function that returns link to display a piece of content
+ * @param $pGalHash branch of gallery information from FisheyeGallery::getTree
+ * @param $pResponse aggregate string containing response array
+ * @param $pParentRandom depth of pGalHash - this is used to non-definitively uniquify album.parent and album.name entries
+ * @return string the url to display the gallery.
+ */
public function traverseSubGalleries( &$pGalHash, &$pResponse, $pParentRandom ) {
global $gBitUser;
- foreach( $pGalHash as $key=>$gallery) {
+ foreach( $pGalHash as $key=>$gallery) {
$this->mSubGalIdx++;
// Any number greater than 2 digits crashes iPhoto2Gallery
@@ -199,8 +198,8 @@ class FisheyeRemote {
// append pParentRandom to make .name probably unique since Fisheye can handle one gallery linked to multiple parents
$pResponse['album.name.' . $this->mSubGalIdx] = $gallery['content']['content_id'].$randomizer;
$pResponse['album.title.' . $this->mSubGalIdx] = $this->cleanResponseValue( $gallery['content']['title'] );
-
- if( !empty( $gallery['content']['data'] ) ) {
+
+ if( !empty( $gallery['content']['data'] ) ) {
$pResponse['album.summary.' . $this->mSubGalIdx] = $gallery['content']['data'];
$pResponse['album.info.extrafields.' . $this->mSubGalIdx] = "Summary";
}
@@ -209,16 +208,16 @@ class FisheyeRemote {
$pResponse['album.perms.write.' . $this->mSubGalIdx] = 'true';
$pResponse['album.perms.del_alb.' . $this->mSubGalIdx] = 'true';
$pResponse['album.perms.create_sub.' . $this->mSubGalIdx] = 'true';
-
- if( !empty( $gallery['children'] ) ) {
+
+ if( !empty( $gallery['children'] ) ) {
$this->traverseSubGalleries($gallery['children'],$pResponse, $randomizer );
}
}
$ret = $this->mSubGalIdx;
return $ret;
- }
+ }
- public function cmdFetchAlbums( $pParamHash ) {
+ public function cmdFetchAlbums( $pParamHash ) {
require_once FISHEYE_PKG_CLASS_PATH.'FisheyeGallery.php';
global $gBitUser;
if( $gBitUser->isRegistered() ) {
@@ -238,10 +237,9 @@ class FisheyeRemote {
$response = $this->createResponse( FEG2REMOTE_PASSWORD_WRONG, 'Application not logged in' );
}
return $response;
- }
-
+ }
- public function cmdAddItem( $pParamHash ) {
+ public function cmdAddItem( $pParamHash ) {
$response = [];
$uploadFile = !empty( $_FILES['g2_userfile'] ) ? $_FILES['g2_userfile'] : null;
@@ -255,22 +253,22 @@ class FisheyeRemote {
$storeHash['summary'] = !empty( $pParamHash['extrafield.Summary'] ) ? $pParamHash['extrafield.Summary'] : null;
$storeHash['edit'] = !empty( $pParamHash['extrafield.Description'] ) ? $pParamHash['extrafield.Description'] : null;
- require_once FISHEYE_PKG_INCLUDE_PATH.'upload_inc.php';
-
+ require_once FISHEYE_PKG_INCLUDE_PATH.'upload_inc.php';
+
$parentGallery = new FisheyeGallery();
if( $parentGallery = $parentGallery->lookup([ 'content_id' => $pParamHash['set_albumName'] ] ) ) {
$parentGallery->load();
$storeHash['gallery_additions'] = [ $parentGallery->mGalleryId ];
}
$response = $errors = fisheye_store_upload( $uploadFile , $storeHash )
- ? $response = $this->createResponse( FEG2REMOTE_UPLOAD_PHOTO_FAIL, 'Export Failed' )
+ ? $response = $this->createResponse( FEG2REMOTE_UPLOAD_PHOTO_FAIL, 'Export Failed' )
: $this->createResponse( FEG2REMOTE_SUCCESS, 'Image added', [ 'item_name'=>$uploadFile['name'] ] );
}
-
+
return $response;
- }
+ }
- public function cmdNewAlbum( $pParamHash ) {
+ public function cmdNewAlbum( $pParamHash ) {
global $gBitUser;
$response = [];
@@ -280,7 +278,7 @@ class FisheyeRemote {
$storeHash['title'] = !empty($pParamHash['newAlbumTitle']) ? $pParamHash['newAlbumTitle'] : '';
$storeHash['edit'] = !empty($pParamHash['newAlbumDesc']) ? $pParamHash['newAlbumDesc'] : '';
- $gallery = new FisheyeGallery();
+ $gallery = new FisheyeGallery();
$gallery->store( $storeHash );
if($pParamHash['set_albumName']){
@@ -294,9 +292,9 @@ class FisheyeRemote {
$response = $this->createResponse( FEG2REMOTE_SUCCESS, 'Gallery created', [ 'album_name' => $storeHash['title'] ] );
return $response;
- }
+ }
- public function sendResponse( $pResponse ) {
+ public function sendResponse( $pResponse ) {
global $gBitUser;
print "#__GR2PROTO__\n";
//error_log( "#__GR2PROTO__".' : '.$gBitUser->mUserId );
@@ -308,13 +306,12 @@ class FisheyeRemote {
print "auth_token=".$gBitUser->mTicket;
//error_log( "auth_token=".$gBitUser->mTicket );
//error_log( "#__end__" );
- }
+ }
-
public function createResponse( $pStatus, $pStatusText, $pExtra = null ) {
$ret = [];
-
- // Each response must contain at least the keys: status and status_text.
+
+ // Each response must contain at least the keys: status and status_text.
$ret['status'] = $this->cleanResponseValue( $pStatus );
// translate the text response for i18n
$ret['status_text'] = $this->cleanResponseValue( KernelTools::tra( $pStatusText ) );
@@ -328,22 +325,20 @@ class FisheyeRemote {
}
/**
- * This will clean up the response value to make sure it is in an acceptable format for the remote client.
+ * This will clean up the response value to make sure it is in an acceptable format for the remote client.
* Gallery apparently is very particular about the manner in which this data is cleaned up, and must be done
* in this specific order.
*/
- public function cleanResponseValue( $pValue ) {
+ public function cleanResponseValue( $pValue ) {
$pValue = str_replace('\\', '\\\\', $pValue);
$pValue = str_replace("\r\n", '\n', $pValue);
$pValue = str_replace([ "\r", "\n", "\t" ], [ '\n', '\n', '\t' ], $pValue);
$pValue = str_replace([ '#', '!', '=' ], [ '\\#', '\\!', '\\=' ], $pValue);
return $pValue;
- }
-
+ }
public function cleanResponseKey( $pKey ) {
return str_replace([ '#', '!', '=', ':' ], [ '\\#', '\\!', '\\=', '\\:' ], $pKey);
}
-
}
diff --git a/includes/gallery_lookup_inc.php b/includes/gallery_lookup_inc.php
index eca8188..28d652a 100755
--- a/includes/gallery_lookup_inc.php
+++ b/includes/gallery_lookup_inc.php
@@ -12,7 +12,7 @@ $lookup = [];
if( !$gContent = FisheyeGallery::lookup( $_REQUEST ) ) {
$gContent = new FisheyeGallery();
$galleryId = null;
-}
+}
if( !empty( $_REQUEST['gallery_path'] ) ) {
$gContent->setGalleryPath( $_REQUEST['gallery_path'] );
diff --git a/includes/upload_inc.php b/includes/upload_inc.php
index dbc47f3..cab8b30 100755
--- a/includes/upload_inc.php
+++ b/includes/upload_inc.php
@@ -78,7 +78,6 @@ function fisheye_handle_upload( &$pFiles ) {
return $upErrors;
}
-
/**
* fisheye_sort_upload
*/
@@ -96,7 +95,7 @@ function fisheye_get_default_gallery_id( $pUserId, $pNewName ) {
$upList = $gal->getList( $getHash );
if( !empty( $upList ) ) {
$ret = key( $upList );
- } else {
+ } else {
$galleryHash = [ 'title' => $pNewName ];
if( $gal->store( $galleryHash ) ) {
$ret = $gal->mGalleryId;
@@ -119,7 +118,7 @@ function fisheye_store_upload( &$pFileHash, $pImageData = [], $pAutoRotate=true
$ret = [];
// verifyMimeType to make sure we are working with the proper file type assumptions
- $pFileHash['type'] = $gBitSystem->verifyMimeType($pFileHash['tmp_name']);
+ $pFileHash['type'] = $gBitSystem->verifyMimeType($pFileHash['tmp_name']);
if( !empty( $pFileHash ) && ( $pFileHash['size'] > 0 ) && is_file( $pFileHash['tmp_name'] ) && fisheye_verify_upload_item( $pFileHash ) ) {
// make a copy for each image we need to store
$image = new FisheyeImage();
@@ -276,7 +275,6 @@ function fisheye_process_directory( $pDestinationDir, &$pParentGallery, $pRoot=f
return $errors;
}
-
// this function will process a directory and all it's sub directories without
// making any assumptions. hierarchy of sub directories is maintained and
// archives can be processed or simply added to the galleries.
diff --git a/liberty_plugins/data.carousel.php b/liberty_plugins/data.carousel.php
index 0d0d833..d15dd4f 100755
--- a/liberty_plugins/data.carousel.php
+++ b/liberty_plugins/data.carousel.php
@@ -10,6 +10,7 @@
* required setup
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\Fisheye\FisheyeImage;
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
@@ -43,7 +44,6 @@ $pluginParams = [
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATACAROUSEL, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATACAROUSEL );
-
function data_carousel( $pData, $pParams ) {
global $gBitSystem, $gBitSmarty;
$ret = ' ';
@@ -89,15 +89,15 @@ function data_carousel( $pData, $pParams ) {
$out = '<div class="carousel slide" data-ride="carousel" id="myCarousel">';
$out .= '<ol class="carousel-indicators">';
$out .= '<li class="active" data-slide-to="0" data-target="#myCarousel">&nbsp;</li>';
- for ( $i=1; $i<$num; $i++ ) {
+ for ( $i=1; $i<$num; $i++ ) {
$out .= '<li data-slide-to="'.$i.'" data-target="#myCarousel">&nbsp;</li>';
- }
+ }
$out .= '</ol>';
$out .= '<div class="carousel-inner" role="listbox">';
$i=0;
foreach( $images as $image ) {
- // insert source url if we need the original file
+ // insert source url if we need the original file
if( !empty( $pParams['size'] ) && $pParams['size'] == 'original' ) {
$thumbUrl = $image['source_url'];
} elseif( $image['thumbnail_url'] ) {
@@ -119,7 +119,7 @@ function data_carousel( $pData, $pParams ) {
' src="' .$thumbUrl.'"'.
' height="103" width="800"'.
' /></div>';
-
+
if( !empty( $pParams['nolink'] ) ) {
} elseif( !empty( $wrapper['link'] ) ) {
// if this image is linking to something, wrap the image with the <a>
@@ -127,9 +127,9 @@ function data_carousel( $pData, $pParams ) {
} elseif ( empty( $pParams['size'] ) || $pParams['size'] != 'original' ) {
if ( $image['source_url'] ) {
$ret = '<a href="'.trim( $image['source_url'] ).'">'.$ret.'</a>';
- }
+ }
}
-
+
if( !empty( $wrapper['style'] ) || !empty( $class ) || !empty( $wrapper['description'] ) ) {
$ret = '<'.$wrapper['wrapper'].' class="'.( !empty( $wrapper['class'] ) ? $wrapper['class'] : "img-responsive" ).'" style="'.$wrapper['style'].'">'.$ret.( !empty( $wrapper['description'] ) ? '<br />'.$wrapper['description'] : '' ).'</'.$wrapper['wrapper'].'>';
}
@@ -170,7 +170,7 @@ function data_carousel_help() {
.'<tr class="odd">'
.'<td>num</td>'
.'<td>' . KernelTools::tra( "key-words") . '<br />' . KernelTools::tra("(optional)") . '</td>'
- .'<td>' . KernelTools::tra( "Number of images to display from the gallery")
+ .'<td>' . KernelTools::tra( "Number of images to display from the gallery")
. KernelTools::tra( "(Default = " ) . '<strong>10</strong>)</td>'
.'</tr>'
.'</table>'
diff --git a/liberty_plugins/data.gallery.php b/liberty_plugins/data.gallery.php
index 5560a5e..a0cfccf 100755
--- a/liberty_plugins/data.gallery.php
+++ b/liberty_plugins/data.gallery.php
@@ -10,6 +10,7 @@
* required setup
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\Fisheye\FisheyeImage;
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
@@ -43,7 +44,6 @@ $pluginParams = [
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAGALLERY, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAGALLERY );
-
function data_gallery( $pData, $pParams ) {
global $gBitSystem, $gBitSmarty;
$ret = ' ';
@@ -87,7 +87,7 @@ function data_gallery( $pData, $pParams ) {
$images = $gallery->getList( $listHash );
$out = '<div>';
foreach( $images as $image ) {
- // insert source url if we need the original file
+ // insert source url if we need the original file
if( !empty( $pParams['size'] ) && $pParams['size'] == 'original' ) {
$thumbUrl = $image['source_url'];
} elseif( $image['thumbnail_url'] ) {
@@ -107,7 +107,7 @@ $out = '<div>';
' src="' .$thumbUrl.'"'.
' style="float:left; '.$imgStyle.'"'.
' />';
-
+
if( !empty( $pParams['nolink'] ) ) {
} elseif( !empty( $wrapper['link'] ) ) {
// if this image is linking to something, wrap the image with the <a>
@@ -115,9 +115,9 @@ $out = '<div>';
} elseif ( empty( $pParams['size'] ) || $pParams['size'] != 'original' ) {
if ( $image['source_url'] ) {
$ret = '<a href="'.trim( $image['source_url'] ).'">'.$ret.'</a>';
- }
+ }
}
-
+
if( !empty( $wrapper['style'] ) || !empty( $class ) || !empty( $wrapper['description'] ) ) {
$ret = '<'.$wrapper['wrapper'].' class="'.( !empty( $wrapper['class'] ) ? $wrapper['class'] : "img-responsive" ).'" style="'.$wrapper['style'].'">'.$ret.( !empty( $wrapper['description'] ) ? '<br />'.$wrapper['description'] : '' ).'</'.$wrapper['wrapper'].'>';
}
@@ -158,7 +158,7 @@ function data_gallery_help() {
.'<tr class="even">'
.'<td>num</td>'
.'<td>' . KernelTools::tra( "key-words") . '<br />' . KernelTools::tra("(optional)") . '</td>'
- .'<td>' . KernelTools::tra( "Number of images to display from the gallery")
+ .'<td>' . KernelTools::tra( "Number of images to display from the gallery")
. KernelTools::tra( "(Default = " ) . '<strong>3</strong>)</td>'
.'</tr>'
.'</table>'
diff --git a/liberty_plugins/data.image.php b/liberty_plugins/data.image.php
index 80f917e..e801cff 100755
--- a/liberty_plugins/data.image.php
+++ b/liberty_plugins/data.image.php
@@ -10,6 +10,7 @@
* required setup
*/
namespace Bitweaver\Liberty;
+
use Bitweaver\Fisheye\FisheyeImage;
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
@@ -43,7 +44,6 @@ $pluginParams = [
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAIMAGE, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAIMAGE );
-
function data_image( $pData, $pParams ) {
global $gBitSystem, $gBitSmarty;
$ret = ' ';
@@ -114,7 +114,7 @@ function data_image( $pData, $pParams ) {
$ret = '<a href="'.trim( $item->getDownloadUrl() ).'">'.$ret.'</a>';
} else if ( !empty( $item->mInfo['media_url'] ) ) {
$ret = '<a href="'.trim( $item->mInfo['media_url'] ).'">'.$ret.'</a>';
- }
+ }
}
if( !empty( $wrapper['style'] ) || !empty( $class ) || !empty( $wrapper['description'] ) ) {
diff --git a/main.php b/main.php
index cdc7d9a..9b57f6b 100755
--- a/main.php
+++ b/main.php
@@ -24,6 +24,7 @@
* Setup
*/
namespace Bitweaver\Fisheye;
+
chdir( dirname( __FILE__ ) );
require_once '../kernel/includes/setup_inc.php';
use Bitweaver\KernelTools;
@@ -33,7 +34,7 @@ $gFisheyeRemote = new FisheyeRemote();
// Fisheye allows directories to below to multiple parents - not in gallery. This confuses some clients
// We pad with a random number for uniqueness
-foreach( array( 'g2_itemId', 'set_albumName' ) as $key ) {
+foreach( [ 'g2_itemId', 'set_albumName' ] as $key ) {
if( !empty( $_POST['g2_form'][$key] ) && $_POST['g2_form'][$key] > 1 ) {
$_POST['g2_form'][$key] = substr( $_POST['g2_form'][$key], 0, strlen( $_POST['g2_form'][$key] ) - 2 );
}
@@ -50,6 +51,6 @@ if( !empty( $_REQUEST['g2_form'] ) ){
} elseif( !empty( $_REQUEST['g2_itemId'] ) ) {
//If we don't have g2_form, they must be asking the gallery to be opened upon export completion
$gallery = new FisheyeGallery();
- $gallery = $gallery->lookup(array('content_id' => $_REQUEST['g2_itemId'] ));
+ $gallery = $gallery->lookup(['content_id' => $_REQUEST['g2_itemId'] ]);
KernelTools::bit_redirect( $gallery->getDisplayUrl() );
}
diff --git a/modules/mod_banner_rand.php b/modules/mod_banner_rand.php
index 6110f2c..0fdaf18 100755
--- a/modules/mod_banner_rand.php
+++ b/modules/mod_banner_rand.php
@@ -9,7 +9,6 @@
* required setup
*/
namespace Bitweaver\Fisheye;
-use Bitweaver\KernelTools;
global $gBitSmarty, $gContent;
// makes things in older modules easier
@@ -17,8 +16,8 @@ global $gBitSmarty, $gContent;
if ( !empty($gBitSmarty->tpl_vars) ) {
$tpls = $gBitSmarty->tpl_vars;
$module_params = $tpls['moduleParams'];
- $listHash = $module_params->value;
- $listHash['gallery_id'] = $module_params->value['module_rows'];
+ $listHash = $module_params->value;
+ $listHash['gallery_id'] = $module_params->value['module_rows'];
}
$image = new FisheyeImage();
diff --git a/modules/mod_images.php b/modules/mod_images.php
index 19be005..de5cf84 100755
--- a/modules/mod_images.php
+++ b/modules/mod_images.php
@@ -9,6 +9,7 @@
* required setup
*/
namespace Bitweaver\Fisheye;
+
use Bitweaver\KernelTools;
use Bitweaver\Users\RoleUser;
global $gQueryUserId, $gContent, $moduleParams;
@@ -28,7 +29,6 @@ if( !empty( $gContent ) && $gContent->getField( 'content_type_guid' ) == FISHEYE
$display = $displayCount >= $thumbCount;
}
-
if( $display ) {
$listHash['max_records'] = $module_rows ?? 3;
if( $gQueryUserId ) {
diff --git a/modules/mod_specials.php b/modules/mod_specials.php
index 1d7a786..635094c 100755
--- a/modules/mod_specials.php
+++ b/modules/mod_specials.php
@@ -9,6 +9,7 @@
* required setup
*/
namespace Bitweaver\Fisheye;
+
use Bitweaver\KernelTools;
global $gQueryUserId, $gContent, $moduleParams;
@@ -30,10 +31,10 @@ if( $display ) {
$moduleTitle = 'Specials';
$moduleTitle = KernelTools::tra( $moduleTitle );
-
+
$gBitSmarty->assign( 'moduleTitle', $moduleTitle );
$gBitSmarty->assign( 'modImages', $images );
$gBitSmarty->assign( 'module_params', $module_params );
- $gBitSmarty->assign( 'maxlen', isset( $module_params["maxlen"] ) ? $module_params["maxlen"] : 0 );
- $gBitSmarty->assign( 'maxlendesc', isset( $module_params["maxlendesc"] ) ? $module_params["maxlendesc"] : 0 );
+ $gBitSmarty->assign( 'maxlen', $module_params["maxlen"] ?? 0 );
+ $gBitSmarty->assign( 'maxlendesc', $module_params["maxlendesc"] ?? 0 );
}
diff --git a/templates/center_image_comments.php b/templates/center_image_comments.php
index bad376d..4de7b87 100755
--- a/templates/center_image_comments.php
+++ b/templates/center_image_comments.php
@@ -19,10 +19,10 @@ if( !empty( $gQueryUser->mUserId ) ) {
$userId = $gQueryUser->mUserId;
}
-$listHash = array(
+$listHash = [
'user_id' => $userId,
'max_records' => $moduleParams['module_rows'],
-);
+];
if (!empty($params['full'])) {
$listHash['parse'] = true;
@@ -39,7 +39,7 @@ if( !empty( $params['root_content_type_guid'] ) ) {
$listHash['root_content_type_guid'] = $params['root_content_type_guid'];
} else {
// default to base image types
- $listHash['root_content_type_guid'] = array('fisheyeimage','fisheyegallery');
+ $listHash['root_content_type_guid'] = ['fisheyeimage','fisheyegallery'];
}
$gBitSmarty->assign( 'moduleTitle', $moduleTitle );
diff --git a/templates/center_list_galleries.php b/templates/center_list_galleries.php
index 322ed0f..e67ce34 100755
--- a/templates/center_list_galleries.php
+++ b/templates/center_list_galleries.php
@@ -35,13 +35,10 @@ if( !empty( $module_params['max_records'] ) ){
$listHash['max_records'] = $module_params['max_records'];
}
-
$galleryList = $gFisheyeGallery->getList( $listHash );
// support for div/ul/li listing of galleries
$gBitSmarty->assign( 'galleryList', $galleryList );
-
-
/* Process the input parameters this page accepts */
if (!empty($gQueryUser) && $gQueryUser->isRegistered()) {
$gBitSmarty->assign('gQueryUserId', $gQueryUser->mUserId);
diff --git a/templates/center_list_galleries.tpl b/templates/center_list_galleries.tpl
index 735a0d8..735a0d8 100644..100755
--- a/templates/center_list_galleries.tpl
+++ b/templates/center_list_galleries.tpl
diff --git a/templates/find_user.tpl b/templates/find_user.tpl
index 0eb54b7..0eb54b7 100644..100755
--- a/templates/find_user.tpl
+++ b/templates/find_user.tpl
diff --git a/templates/image_order.tpl b/templates/image_order.tpl
index 731c166..2cdd884 100755
--- a/templates/image_order.tpl
+++ b/templates/image_order.tpl
@@ -51,7 +51,7 @@
<strong>{tr}Edit Image{/tr}</strong>: <a href="javascript:void(0);" onclick="BitBase.updater( 'imgedit', '{$smarty.const.FISHEYE_PKG_URL}edit_image.php', 'ajax=true&amp;content_id={$galItem->mInfo.content_id}&amp;gallery_id={$gContent->mGalleryId}' );">{booticon iname="fa-pen-to-square" iexplain="Edit Details"}</a>
<noscript><div><a href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?content_id={$galItem->mInfo.content_id}">{booticon iname="fa-pen-to-square" iexplain="Edit Image"}</a></div></noscript>
{* jspopup href="`$smarty.const.FISHEYE_PKG_URL`edit_image.php?content_id=$galItem->mInfo.content_id" title="edit image" *}
-{* <a target="_new" href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?content_id={$galItem->mInfo.content_id}">{booticon iname="fa-pen-to-square" iexplain="Edit Image"}</a> *}
+ <a target="_new" href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?content_id={$galItem->mInfo.content_id}">{booticon iname="fa-pen-to-square" iexplain="Edit Image"}</a>
<br />
{/if}
{/if}
diff --git a/templates/view_gallery.tpl b/templates/view_gallery.tpl
index b16e085..b16e085 100644..100755
--- a/templates/view_gallery.tpl
+++ b/templates/view_gallery.tpl
diff --git a/thumbnailer.php b/thumbnailer.php
index 0533ddd..cf39fcb 100755
--- a/thumbnailer.php
+++ b/thumbnailer.php
@@ -15,6 +15,7 @@
*/
namespace Bitweaver\Fisheye;
+
use Bitweaver\KernelTools;
global $gBitSystem, $gBitDb, $_SERVER;
@@ -36,7 +37,7 @@ use Bitweaver\KernelTools;
// running from cron can cause us not to be in the right dir.
chdir( dirname( __FILE__ ) );
require_once '../kernel/includes/setup_inc.php';
-
+
// add some protection for arbitrary thumbail execution.
// if argc is present, we will trust it was exec'ed command line.
if( empty( $argc ) && !$gBitUser->isAdmin() ) {
@@ -58,7 +59,7 @@ use Bitweaver\KernelTools;
$processContent[$row['content_id']] = $row;
$processContent[$row['content_id']]['parameters'] = unserialize( $row['processor_parameters'] );
$sql2 = "UPDATE `".BIT_DB_PREFIX."liberty_process_queue` SET `begin_date`=? WHERE `content_id`=?";
- $rs2 = $gBitSystem->mDb->getOne( $sql2, array( date( 'U' ), $row['content_id'] ) );
+ $rs2 = $gBitSystem->mDb->getOne( $sql2, [ date( 'U' ), $row['content_id'] ] );
}
$gBitDb->CompleteTrans();
@@ -73,7 +74,7 @@ use Bitweaver\KernelTools;
if( $image->renderThumbnails() ) {
$log[$contentId]['message'] = 'SUCCESS: Thumbnails created';
$sql3 = "UPDATE `".BIT_DB_PREFIX."liberty_process_queue` SET `begin_date`=?, `end_date`=? WHERE `content_id`=?";
- $rs3 = $gBitSystem->mDb->getOne( $sql3, array( $begin, $gBitSystem->getUTCTime(), $contentId ) );
+ $rs3 = $gBitSystem->mDb->getOne( $sql3, [ $begin, $gBitSystem->getUTCTime(), $contentId ] );
} else {
$log[$contentId]['message'] = ' ERROR: '.$image->mErrors['thumbnail'];
}
diff --git a/upload.php b/upload.php
index f5c7714..099fe42 100755
--- a/upload.php
+++ b/upload.php
@@ -8,6 +8,7 @@
* required setup
*/
namespace Bitweaver\Fisheye;
+
require_once '../kernel/includes/setup_inc.php';
use Bitweaver\KernelTools;
diff --git a/view.php b/view.php
index 61b8546..48597b7 100755
--- a/view.php
+++ b/view.php
@@ -40,8 +40,8 @@ if( $gContent->isCommentable() ) {
include_once LIBERTY_PKG_INCLUDE_PATH.'comments_inc.php';
}
-if (!empty($_REQUEST['download'])){
- // Checked against global users group assignment so that feature can be restricted on a group level.
+if (!empty($_REQUEST['download'])){
+ // Checked against global users group assignment so that feature can be restricted on a group level.
// If content was checked, user would always have permission to do this.
$gContent->verifyUserPermission('p_fisheye_download_gallery_arc');
$gContent->download();