a bunch of bug fixes
This commit is contained in:
parent
85736ac437
commit
594e27d9eb
7 changed files with 16 additions and 32 deletions
|
|
@ -645,8 +645,6 @@ sub processPropertiesFromFormPost {
|
|||
$self->getThread->lock if ($session{form}{'lock'});
|
||||
$self->getThread->stick if ($session{form}{stick});
|
||||
}
|
||||
} else {
|
||||
$data{ownerUserId} = $session{form}{userId};
|
||||
}
|
||||
$data{groupIdView} =$self->getThread->getParent->get("groupIdView");
|
||||
$data{groupIdEdit} = $self->getThread->getParent->get("groupIdEdit");
|
||||
|
|
@ -953,6 +951,10 @@ sub www_edit {
|
|||
.WebGUI::Form::hidden({
|
||||
name=>"userId",
|
||||
value=>$self->getValue("ownerUserId")
|
||||
})
|
||||
.WebGUI::Form::hidden({
|
||||
name=>"username",
|
||||
value=>$self->getValue("username")
|
||||
});
|
||||
$var{isEdit} = 1;
|
||||
$content = $self->getValue("content");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue