fixed a couple bugs and added size aware file cache

This commit is contained in:
JT Smith 2005-07-07 19:53:19 +00:00
parent cb2bf8dcaf
commit d72dd21826
9 changed files with 87 additions and 12 deletions

View file

@ -106,19 +106,20 @@ sub getIndexerParams {
sql => "select Article.assetId,
Article.linkTitle,
Article.linkURL,
asset.title,
asset.menuTitle,
asset.url,
assetData.title,
assetData.menuTitle,
assetData.url,
asset.className,
asset.ownerUserId,
asset.groupIdView,
asset.synopsis,
assetData.ownerUserId,
assetData.groupIdView,
assetData.synopsis,
wobject.description
from asset, Article
left join wobject on wobject.assetId = asset.assetId
left join assetData asset.assetId=assetData.assetId
where asset.assetId = Article.assetId
and asset.startDate < $now
and asset.endDate > $now",
and assetData.startDate < $now
and assetData.endDate > $now",
fieldsToIndex => ["linkTitle" ,"linkURL","title","menuTitle","url","synopsis","description" ],
contentType => 'content',
url => 'WebGUI::URL::gateway($data{url})',

View file

@ -66,7 +66,7 @@ These methods are available from this package:
sub _recurseCrumbTrail {
my ($sth, %data, $output);
tie %data, 'Tie::CPHash';
%data = WebGUI::SQL->quickHash("select assetId,parentId,menuTitle,url from asset where assetId=".quote($_[0]));
%data = WebGUI::SQL->quickHash("select asset.assetId,asset.parentId,assetData.menuTitle,asset.url from asset left join assetData on asset.assetId=assetData.assetId where asset.assetId=".quote($_[0])." group by assetData.assetId order by assetData.revisionDate desc");
if ($data{assetId}) {
$output .= _recurseCrumbTrail($data{parentId});
}