fix: Fixed permission issues with Gallery comments
Gallery now checks to see if it's committed before allowing Albums to be added Slideshow and thumbnails work better Much, much more
This commit is contained in:
parent
ae6c1ac6df
commit
3ea9420479
14 changed files with 332 additions and 76 deletions
|
|
@ -179,7 +179,7 @@ ok(
|
|||
my $assetId = $photo->getId;
|
||||
$photo->purge;
|
||||
ok(
|
||||
!$session->db->quickScalar("SELECT commentId FROM Photo_comment WHERE assetId=?",[$assetId]),
|
||||
!$session->db->quickScalar("SELECT commentId FROM GalleryFile_comment WHERE assetId=?",[$assetId]),
|
||||
"Comments are purged along with asset",
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use lib "$FindBin::Bin/../../../../lib";
|
|||
|
||||
use Scalar::Util qw( blessed );
|
||||
use WebGUI::Test;
|
||||
use WebGUI::HTML;
|
||||
use WebGUI::Session;
|
||||
use Test::More;
|
||||
use Test::Deep;
|
||||
|
|
@ -68,6 +69,7 @@ my $testTemplateVars = {
|
|||
canComment => bool( 1 ),
|
||||
canEdit => bool( 0 ),
|
||||
ownerUsername => WebGUI::User->new( $session, 3 )->username,
|
||||
synopsis_textonly => WebGUI::HTML::filter( $photo->get('synopsis'), "all" ),
|
||||
url => $photo->getUrl,
|
||||
url_addArchive => $album->getUrl('func=addArchive'),
|
||||
url_delete => $photo->getUrl('func=delete'),
|
||||
|
|
@ -78,6 +80,9 @@ my $testTemplateVars = {
|
|||
url_listFilesForOwner
|
||||
=> $gallery->getUrl('func=listFilesForUser;userId=3'),
|
||||
url_promote => $photo->getUrl('func=promote'),
|
||||
url_album => $album->getUrl,
|
||||
url_thumbnails => $album->getUrl('func=thumbnails'),
|
||||
url_slideshow => $album->getUrl('func=slideshow'),
|
||||
fileUrl => $photo->getFileUrl,
|
||||
thumbnailUrl => $photo->getThumbnailUrl,
|
||||
numberOfComments => scalar @{ $photo->getCommentIds },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue