summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspiderr <spiderr@bitweaver.org>2021-01-25 14:29:05 -0500
committerspiderr <spiderr@bitweaver.org>2021-01-25 14:29:05 -0500
commited40b34f79279d812251fcd2c60a60416783bd7c (patch)
treed388438fdefb58a768dcb1abafe06b43205b9d79
parent114b90f6e3f94739f788db8c62ddc2a2b7d0af87 (diff)
downloadfisheye-ed40b34f79279d812251fcd2c60a60416783bd7c.tar.gz
fisheye-ed40b34f79279d812251fcd2c60a60416783bd7c.tar.bz2
fisheye-ed40b34f79279d812251fcd2c60a60416783bd7c.zip
add refresh thumbnail icon to image view
-rw-r--r--templates/view_image.tpl5
-rw-r--r--view_image.php7
2 files changed, 10 insertions, 2 deletions
diff --git a/templates/view_image.tpl b/templates/view_image.tpl
index c054a90..c7deb4e 100644
--- a/templates/view_image.tpl
+++ b/templates/view_image.tpl
@@ -8,8 +8,9 @@
<div class="floaticon">
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='icon' serviceHash=$gContent->mInfo}
{if $gContent->hasUpdatePermission()}
- <a title="{tr}Edit{/tr}" href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?image_id={$gContent->mImageId}">{booticon iname="icon-edit" ipackage="icons" iexplain="Edit Image"}</a>
- <a title="{tr}Delete{/tr}" href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?image_id={$gContent->mImageId}&amp;delete=1">{booticon iname="icon-trash" ipackage="icons" iexplain="Delete Image"}</a>
+ <a title="{tr}Refresh{/tr}" href="{$smarty.const.FISHEYE_PKG_URL}image/{$gContent->mImageId}?rethumb=1">{booticon iname="icon-refresh" ipackage="icons" iexplain="Refresh"}</a>
+ <a title="{tr}Edit{/tr}" href="{$smarty.const.FISHEYE_PKG_URL}edit_image?image_id={$gContent->mImageId}">{booticon iname="icon-edit" ipackage="icons" iexplain="Edit Image"}</a>
+ <a title="{tr}Delete{/tr}" href="{$smarty.const.FISHEYE_PKG_URL}edit_image?image_id={$gContent->mImageId}&amp;delete=1">{booticon iname="icon-trash" ipackage="icons" iexplain="Delete Image"}</a>
{/if}
</div>
{/if}
diff --git a/view_image.php b/view_image.php
index 64019e4..4c362cd 100644
--- a/view_image.php
+++ b/view_image.php
@@ -49,4 +49,11 @@ $gContent->addHit();
if( $gContent->hasUpdatePermission() || $gGallery && $gGallery->getPreference( 'link_original_images' )) {
$gContent->mInfo['image_file']['original'] = TRUE;
}
+
+if( $gContent->hasUpdatePermission() ) {
+ if( !empty( $_REQUEST['rethumb'] ) ) {
+ $gContent->generateThumbnails( FALSE, TRUE );
+ }
+}
+
require_once( FISHEYE_PKG_PATH.'display_fisheye_image_inc.php' );