fix: Matrix 'Can instantiate template'

This commit is contained in:
Martin Kamerbeek 2006-08-29 13:12:05 +00:00
parent 72fdc70a87
commit 48a01cc878
3 changed files with 11 additions and 1 deletions

View file

@ -1157,6 +1157,11 @@ sub view {
$p->setDataByQuery($sql);
$self->appendPostListTemplateVars(\%var, $p);
$self->appendTemplateLabels(\%var);
# If the asset is not called through the normal prepareView/view cycle, first call prepareView.
# This happens for instance in the viewDetail method in the Matrix. In that case the Collaboration
# is called through the api.
$self->prepareView unless ($self->{_viewTemplate});
my $out = $self->processTemplate(\%var,undef,$self->{_viewTemplate});
if ($self->session->user->userId eq '1' && !$self->session->form->process("sortBy")) {
WebGUI::Cache->new($self->session,"view_".$self->getId)->set($out,$self->get("visitorCacheTimeout"));

View file

@ -719,7 +719,9 @@ sub www_editListingSave {
karmaRatingMultiplier => 0,
moderatePosts => 0,
moderateGroupId => '4',
postGroupId => '7'
postGroupId => '7',
styleTemplateId => $self->get('styleTemplateId'),
printableStyleTemplateId => $self->get('printableStyleTemplateId'),
});
WebGUI::VersionTag->getWorking($self->session)->commit;
$data{forumId} = $forum->getId;