more bug fixes

This commit is contained in:
JT Smith 2005-08-11 16:19:04 +00:00
parent a3e4cf1dd3
commit 7fae1e435d
3 changed files with 15 additions and 16 deletions

View file

@ -42,7 +42,8 @@ sub appendPostListTemplateVars {
my $page = $p->getPageData;
my $i = 0;
foreach my $row (@$page) {
my $post = WebGUI::Asset::Wobject::Collaboration->newByPropertyHashRef($row);
#my $post = WebGUI::Asset::Wobject::Collaboration->newByPropertyHashRef($row);
my $post = WebGUI::Asset::Wobject::Collaboration->new($row->{assetId}, $row->{className}, $row->{revisionDate});
$post->{_parent} = $self; # caching parent for efficiency
my $controls = deleteIcon('func=delete',$post->get("url"),"Delete").editIcon('func=edit',$post->get("url"));
if ($self->get("sortBy") eq "lineage") {
@ -903,7 +904,7 @@ sub view {
$constraints .= " or assetData.status='pending'";
}
$constraints .= ")";
my $sql = "select *
my $sql = "select asset.assetId,asset.className,assetData.revisionDate
from Thread
left join asset on Thread.assetId=asset.assetId
left join Post on Post.assetId=Thread.assetId and Thread.revisionDate = Post.revisionDate
@ -1030,7 +1031,7 @@ sub www_search {
}
# please note that the SQL generated here-in is not for the feint of heart, mind, or stomach
# this is for trained professionals only and should not be attempted at home
my $sql = "select *
my $sql = "select asset.assetId, asset.className, assetData.revisionDate
from asset
left join assetData on assetData.assetId=asset.assetId
left join Thread on Thread.assetId=assetData.assetId and assetData.revisionDate = Thread.revisionDate