Skip to content

Commit

Permalink
Merge pull request #86 from ggoffy/master
Browse files Browse the repository at this point in the history
fixed several bugs
  • Loading branch information
ggoffy authored Mar 5, 2022
2 parents 3c11f5d + ec54d5c commit e649730
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
- code cleaning (PS inspect code) (goffy)
- added new update procedure (goffy)
- updated viewerjs to last version (goffy)
- added chmod in install/update (cesagonchu/goffy)
- hide download button when album is empty (cesagonchu/goffy)
- fixed bug with download zip (cesagonchu/goffy)

<h5>1.15 RC2</h5> [2021/04/19]
<hr>
Expand Down
8 changes: 4 additions & 4 deletions download.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: public');
header('Content-Description: File Transfer');
header('Content-type: application/octet-stream');
header('Content-type: application/zip');
header('Content-Disposition: attachment; filename="' . $archive_file_name . '"');
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . filesize($archive_file_path));
ob_end_flush();
@readfile($archive_file_path);
header('Content-Length: ' . \filesize($archive_file_path));
\flush();
\readfile($archive_file_path);
\unlink($archive_file_path);

// mark all images of album as downloaded
Expand Down
1 change: 1 addition & 0 deletions include/oninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function xoops_module_install_wggallery(\XoopsModule $module)
// foreach (\array_keys($GLOBALS['uploadFolders']) as $i) {
foreach (\array_keys($configurator->uploadFolders) as $i) {
$utility::createFolder($configurator->uploadFolders[$i]);
chmod($configurator->uploadFolders[$i], 0777);
}
}

Expand Down
2 changes: 1 addition & 1 deletion templates/wggallery_albumitem_1.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<a class='btn btn-default wgg-btn' href='index.php?op=list&amp;subm_id=<{$album.alb_submitter}>' title='<{$smarty.const._CO_WGGALLERY_SUBMITTER}>'>
<span class = "wgg-btn-icon"><img class='' src='<{$wggallery_icon_url_16}>submitter.png' alt='<{$smarty.const._CO_WGGALLERY_SUBMITTER}>'></span><{if $displayButtonText|default:false}><{$album.submitter}><{/if}></a>
<{/if}>
<{if $album.download|default:''}>
<{if $album.download|default:'' && $album.nb_images|default:0 > 0}>
<a class='btn btn-default wgg-btn' href='<{$wggallery_url}>/download.php?op=album&amp;alb_id=<{$album.id}>' title='<{$smarty.const._CO_WGGALLERY_DOWNLOAD_ALB}>'>
<img class='wgg-btn-icon' src='<{$wggallery_icon_url_16}>download.png' alt='<{$smarty.const._CO_WGGALLERY_DOWNLOAD_ALB}>'><{if $displayButtonText|default:false}><{$smarty.const._CO_WGGALLERY_DOWNLOAD_ALB}><{/if}></a>
<{/if}>
Expand Down
3 changes: 2 additions & 1 deletion templates/wggallery_albumitem_2.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

<{if $album.image|default:''}>
<div class='center'>
<{if $album.nb_images|default:''}>
Expand Down Expand Up @@ -36,7 +37,7 @@
<a class='btn btn-default wgg-btn' href='index.php?op=list&amp;subm_id=<{$album.alb_submitter}>' title='<{$smarty.const._CO_WGGALLERY_SUBMITTER}>'>
<span class = "wgg-btn-icon"><img class='' src='<{$wggallery_icon_url_16}>submitter.png' alt='<{$smarty.const._CO_WGGALLERY_SUBMITTER}>'></span><{if $displayButtonText|default:false}><{$album.submitter}><{/if}></a>
<{/if}>
<{if $album.download|default:''}>
<{if $album.download|default:'' && $album.nb_images|default:0 > 0}>
<a class='btn btn-default wgg-btn' href='<{$wggallery_url}>/download.php?op=album&amp;alb_id=<{$album.id}>' title='<{$smarty.const._CO_WGGALLERY_DOWNLOAD_ALB}>'>
<img class='wgg-btn-icon' src='<{$wggallery_icon_url_16}>download.png' alt='<{$smarty.const._CO_WGGALLERY_DOWNLOAD_ALB}>'><{if $displayButtonText|default:false}><{$smarty.const._CO_WGGALLERY_DOWNLOAD_ALB}><{/if}></a>
<{/if}>
Expand Down
3 changes: 2 additions & 1 deletion templates/wggallery_albums_default.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<{include file='db:wggallery_header.tpl'}>

<{if $albums_list|default:''}>
<div class='col-sm-12 col-sm-8'>
<div class='panel panel-<{$panel_type|default:''}>'>
Expand Down Expand Up @@ -57,7 +58,7 @@
<a class='btn btn-default wgg-btn' href='albums.php?op=delete&amp;alb_id=<{$album.id}>&amp;alb_pid=<{$album.pid}>' title='<{$smarty.const._DELETE}>'>
<img class='wgg-btn-icon' src='<{$wggallery_icon_url_16}>delete.png' alt='<{$smarty.const._DELETE}>'><{if $displayButtonText|default:false}><{$smarty.const._DELETE}><{/if}></a>
<{/if}>
<{if 0 == $album.iscoll|default:0 && $album.download|default:''}>
<{if 0 == $album.iscoll|default:0 && $album.download|default:'' && $album.nb_images|default:0 > 0}>
<a class='btn btn-default wgg-btn' href='<{$wggallery_url}>/download.php?op=album&amp;alb_id=<{$album.id}>' title='<{$smarty.const._CO_WGGALLERY_DOWNLOAD_ALB}>'>
<img class='wgg-btn-icon' src='<{$wggallery_icon_url_16}>download.png' alt='<{$smarty.const._CO_WGGALLERY_DOWNLOAD_ALB}>'><{if $displayButtonText|default:false}><{$smarty.const._CO_WGGALLERY_DOWNLOAD_ALB}><{/if}></a>
<{/if}>
Expand Down

0 comments on commit e649730

Please sign in to comment.