Display assets, regardless of their status, in the Clipboard and Trash. Fixes bug #11550.
This commit is contained in:
parent
08ee8153b3
commit
05a19ff7b8
3 changed files with 13 additions and 30 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
- fixed #11646: Post and Thread Last Post
|
- fixed #11646: Post and Thread Last Post
|
||||||
- fixed #11626: Duplicate messages from Collab Systems
|
- fixed #11626: Duplicate messages from Collab Systems
|
||||||
- fixed #11667: Shop: unable to remove item from Cart
|
- fixed #11667: Shop: unable to remove item from Cart
|
||||||
|
- fixed #11550: Pending assets in the clipboard or trash are not visible from the approval screen
|
||||||
|
|
||||||
7.9.7
|
7.9.7
|
||||||
- added #11571: Allow return from photo edit view to gallery edit view
|
- added #11571: Allow return from photo edit view to gallery edit view
|
||||||
|
|
|
||||||
|
|
@ -181,6 +181,7 @@ sub getAssetsInClipboard {
|
||||||
{
|
{
|
||||||
statesToInclude => ["clipboard"],
|
statesToInclude => ["clipboard"],
|
||||||
returnObjects => 1,
|
returnObjects => 1,
|
||||||
|
statusToInclude => [qw/approved pending archived/],
|
||||||
whereClause => $limit,
|
whereClause => $limit,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -57,39 +57,20 @@ sub getAssetsInTrash {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $limitToUser = shift;
|
my $limitToUser = shift;
|
||||||
my $userId = shift || $self->session->user->userId;
|
my $userId = shift || $self->session->user->userId;
|
||||||
my @assets;
|
|
||||||
my $limit;
|
my $limit;
|
||||||
if ($limitToUser) {
|
if ($limitToUser) {
|
||||||
$limit = "and asset.stateChangedBy=".$self->session->db->quote($userId);
|
$limit = "asset.stateChangedBy=".$self->session->db->quote($userId);
|
||||||
}
|
}
|
||||||
my $sth = $self->session->db->read("
|
my $root = WebGUI::Asset->getRoot($self->session);
|
||||||
select
|
return $root->getLineage(
|
||||||
asset.assetId,
|
["descendants", ],
|
||||||
assetData.revisionDate,
|
{
|
||||||
asset.className
|
statesToInclude => ["trash"],
|
||||||
from
|
statusToInclude => [qw/approved pending archived/],
|
||||||
asset
|
returnObjects => 1,
|
||||||
left join
|
whereClause => $limit,
|
||||||
assetData on asset.assetId=assetData.assetId
|
}
|
||||||
where
|
);
|
||||||
asset.state='trash'
|
|
||||||
and assetData.revisionDate=(SELECT max(revisionDate) from assetData where assetData.assetId=asset.assetId)
|
|
||||||
$limit
|
|
||||||
group by
|
|
||||||
assetData.assetId
|
|
||||||
order by
|
|
||||||
assetData.title desc
|
|
||||||
");
|
|
||||||
while (my ($id, $date, $class) = $sth->array) {
|
|
||||||
my $asset = WebGUI::Asset->new($self->session,$id,$class,$date);
|
|
||||||
if ($asset){
|
|
||||||
push(@assets, $asset);
|
|
||||||
}else{
|
|
||||||
$self->session->errorHandler->error("AssetTrash::getAssetsInTrash - failed to instanciate asset with assetId $id, className $class, and revisionDate $date");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$sth->finish;
|
|
||||||
return \@assets;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue