fix my doof

This commit is contained in:
Roy Johnson 2006-06-23 20:34:30 +00:00
parent 37c7f002ac
commit 67cc512c6c
2 changed files with 3 additions and 3 deletions

View file

@ -1656,8 +1656,8 @@ sub publish {
my $self = shift; my $self = shift;
my $statesToPublish = shift; my $statesToPublish = shift;
my $stateList = $self->session->db->quoteAndJoin($statesToPublish); my $stateList = $self->session->db->quoteAndJoin($statesToPublish) if $statesToPublish;
my $where = "and state in (".$stateList.")" if $statesToPublish; my $where = "and state in (".$stateList.")" if $stateList;
my $assetIds = $self->session->db->buildArrayRef("select assetId from asset where lineage like ".$self->session->db->quote($self->get("lineage").'%')." $where"); my $assetIds = $self->session->db->buildArrayRef("select assetId from asset where lineage like ".$self->session->db->quote($self->get("lineage").'%')." $where");
my $idList = $self->session->db->quoteAndJoin($assetIds); my $idList = $self->session->db->quoteAndJoin($assetIds);

View file

@ -153,7 +153,7 @@ sub paste {
my $pastedAsset = WebGUI::Asset->newByDynamicClass($self->session,$assetId); my $pastedAsset = WebGUI::Asset->newByDynamicClass($self->session,$assetId);
return 0 unless ($self->get("state") eq "published"); return 0 unless ($self->get("state") eq "published");
if ($self->getId eq $pastedAsset->get("parentId") || $pastedAsset->setParent($self)) { if ($self->getId eq $pastedAsset->get("parentId") || $pastedAsset->setParent($self)) {
$pastedAsset->publish(['published']); # Paste only published assets $pastedAsset->publish(['clipboard','clipboard-limbo']); # Paste only clipboard items
$pastedAsset->updateHistory("pasted to parent ".$self->getId); $pastedAsset->updateHistory("pasted to parent ".$self->getId);
return 1; return 1;
} }