fixed crash bug
This commit is contained in:
parent
fe66f47339
commit
ffa283b32d
2 changed files with 21 additions and 11 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
5.5.2
|
||||||
|
- Fixed a bug introduced in the last version that only occurs if there was
|
||||||
|
one forum in a message board.
|
||||||
|
|
||||||
|
|
||||||
5.5.1
|
5.5.1
|
||||||
- Fixed bug #829806 preventing users from updating thier passwords from the updateAccount form.
|
- Fixed bug #829806 preventing users from updating thier passwords from the updateAccount form.
|
||||||
- Added Apache 2 instructions to install.txt. (Thanks to Andy Grundman.)
|
- Added Apache 2 instructions to install.txt. (Thanks to Andy Grundman.)
|
||||||
|
|
|
||||||
|
|
@ -165,17 +165,22 @@ sub www_moveForumUp {
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
sub www_view {
|
sub www_view {
|
||||||
my $callback = WebGUI::URL::page("func=view&wid=".$_[0]->get("wobjectId"));
|
my $callback = WebGUI::URL::page("func=view&wid=".$_[0]->get("wobjectId"));
|
||||||
|
if ($session{form}{forumId} eq "" || $session{form}{forumId} eq "new") {
|
||||||
|
($session{form}{forumId}) = WebGUI::SQL->quickArray("select forumId from MessageBoard_forums
|
||||||
|
where wobjectId=".$_[0]->get("wobjectId")." order by sequenceNumber");
|
||||||
|
}
|
||||||
|
my ($forumId, $title, $description) = WebGUI::SQL->quickArray("select forumId, title, description from MessageBoard_forums
|
||||||
|
where wobjectId=".$_[0]->get("wobjectId")." and forumId=".$session{form}{forumId});
|
||||||
|
my $forumParam = "forumId=".$forumId;
|
||||||
|
$callback = WebGUI::URL::append($callback,$forumParam);
|
||||||
|
my $caller = {
|
||||||
|
callback=>$callback,
|
||||||
|
title=>$title,
|
||||||
|
description=>$description,
|
||||||
|
forumId=>$forumId
|
||||||
|
};
|
||||||
if ($session{form}{forumOp}) {
|
if ($session{form}{forumOp}) {
|
||||||
my ($forumId, $title, $description) = WebGUI::SQL->quickArray("select forumId, title, description from MessageBoard_forums
|
return WebGUI::Forum::UI::forumOp($caller);
|
||||||
where wobjectId=".$_[0]->get("wobjectId")." and forumId=".$session{form}{forumId});
|
|
||||||
my $forumParam = "forumId=".$forumId;
|
|
||||||
$callback = WebGUI::URL::append($callback,$forumParam);
|
|
||||||
return WebGUI::Forum::UI::forumOp({
|
|
||||||
callback=>$callback,
|
|
||||||
title=>$title,
|
|
||||||
description=>$description,
|
|
||||||
forumId=>$forumId
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
my %var;
|
my %var;
|
||||||
$var{title} = $_[0]->get("title");
|
$var{title} = $_[0]->get("title");
|
||||||
|
|
@ -194,7 +199,7 @@ sub www_view {
|
||||||
while (my $forumMeta = $sth->hashRef) {
|
while (my $forumMeta = $sth->hashRef) {
|
||||||
my $forum = WebGUI::Forum->new($forumMeta->{forumId});
|
my $forum = WebGUI::Forum->new($forumMeta->{forumId});
|
||||||
if ($count == 1) {
|
if ($count == 1) {
|
||||||
$var{'default.listing'} = WebGUI::Forum::UI::www_viewForum($callback,$forumMeta->{forumId});
|
$var{'default.listing'} = WebGUI::Forum::UI::www_viewForum($caller,$forumMeta->{forumId});
|
||||||
$var{'default.description'} = $forumMeta->{description};
|
$var{'default.description'} = $forumMeta->{description};
|
||||||
$var{'default.title'} = $forumMeta->{title};
|
$var{'default.title'} = $forumMeta->{title};
|
||||||
$var{'default.controls'} = $_[0]->_formatControls($forum->get("forumId"));
|
$var{'default.controls'} = $_[0]->_formatControls($forum->get("forumId"));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue