a bunch of bug fixes

This commit is contained in:
JT Smith 2005-06-14 19:15:06 +00:00
parent 85736ac437
commit 594e27d9eb
7 changed files with 16 additions and 32 deletions

View file

@ -12,8 +12,6 @@ package WebGUI::Asset::Wobject::Article;
use strict;
use WebGUI::DateTime;
#use WebGUI::Forum;
#use WebGUI::Forum::UI;
use WebGUI::International;
use WebGUI::Paginator;
use WebGUI::Privilege;
@ -188,29 +186,11 @@ sub view {
$var{description} = $p->getPage;
}
$p->appendTemplateVars(\%var);
my $callback = $self->getUrl;
if ($self->get("allowDiscussion")) {
my $forum = WebGUI::Forum->new($self->get("forumId"));
$var{"replies.count"} = ($forum->get("replies") + $forum->get("threads"));
$var{"replies.URL"} = WebGUI::Forum::UI::formatForumURL($callback,$forum->get("forumId"));
$var{"replies.label"} = WebGUI::International::get(28,"Asset_Article");
$var{"post.URL"} = WebGUI::Forum::UI::formatNewThreadURL($callback,$forum->get("forumId"));
$var{"post.label"} = WebGUI::International::get(24,"Asset_Article");
}
my $templateId = $self->get("templateId");
if ($session{form}{overrideTemplateId} ne "") {
$templateId = $session{form}{overrideTemplateId};
}
if ($session{form}{forumOp}) {
return WebGUI::Forum::UI::forumOp({
callback=>$callback,
title=>$self->get("title"),
description=>$self->get("description"),
forumId=>$self->get("forumId")
});
} else {
return $self->processTemplate(\%var, $templateId);
}
return $self->processTemplate(\%var, $templateId);
}

View file

@ -213,7 +213,7 @@ sub view {
my $self = shift;
#define default view month range. Note that this could be different from
#the range a user is allowed to view - set by the events calendar limitations.
my $monthRangeLength = int($self->getValue("paginateAfter"));
my $monthRangeLength = int($self->get("paginateAfter"));
# Let's limit the range to 72 for now; later we can make it definable in the calendar itself.
$monthRangeLength = 1 if ($monthRangeLength < 0);
$monthRangeLength = 72 if ($monthRangeLength > 72);