working out some kinks

This commit is contained in:
JT Smith 2003-10-18 04:38:47 +00:00
parent b9de5b1a3c
commit 65a9ecbd34
5 changed files with 36 additions and 39 deletions

View file

@ -50,27 +50,11 @@ sub new {
my $property = shift;
my $self = WebGUI::Wobject->new(
-properties=>$property,
-extendedProperties=>{
messagesPerPage=>{
defaultValue=>50
}
},
-useTemplate=>1
);
bless $self, $class;
}
#-------------------------------------------------------------------
sub status {
if ($_[0] eq "Approved") {
return WebGUI::International::get(560);
} elsif ($_[0] eq "Denied") {
return WebGUI::International::get(561);
} elsif ($_[0] eq "Pending") {
return WebGUI::International::get(562);
}
}
#-------------------------------------------------------------------
sub www_deleteForum {
return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId")));
@ -89,14 +73,7 @@ sub www_deleteForumConfirm {
#-------------------------------------------------------------------
sub www_edit {
my $properties = WebGUI::HTMLForm->new;
my $layout = WebGUI::HTMLForm->new;
$layout->integer(
-name=>"messagesPerPage",
-label=>WebGUI::International::get(4,$_[0]->get("namespace")),
-value=>$_[0]->getValue("messagesPerPage")
);
return $_[0]->SUPER::www_edit(
-layout=>$layout->printRowsOnly,
-properties=>$properties->printRowsOnly,
-headingId=>6,
-helpId=>1
@ -166,11 +143,6 @@ sub www_moveForumUp {
return "";
}
#-------------------------------------------------------------------
sub www_showMessage {
return $_[0]->SUPER::www_showMessage('<a href="'.WebGUI::URL::page().'">'.WebGUI::International::get(11,$_[0]->get("namespace")).'</a><br>');
}
#-------------------------------------------------------------------
sub www_view {
my $callback = WebGUI::URL::page("func=view&amp;wid=".$_[0]->get("wobjectId"));
@ -210,7 +182,7 @@ sub www_view {
'forum.url' => WebGUI::Forum::UI::formatForumURL($callback,$forum->get("forumId")),
'forum.lastPost.url' => WebGUI::Forum::UI::formatThreadURL($callback,$lastPost->get("forumPostId")),
'forum.lastPost.date' => WebGUI::Forum::UI::formatPostDate($lastPost->get("dateOfPost")),
'forum.lastPost.time' => WebGUI::Forum::UI::formatPostDate($lastPost->get("dateOfPost")),
'forum.lastPost.time' => WebGUI::Forum::UI::formatPostTime($lastPost->get("dateOfPost")),
'forum.lastPost.epoch' => $lastPost->get("dateOfPost"),
'forum.lastPost.subject' => WebGUI::Forum::UI::formatSubject($lastPost->get("subject")),
'forum.lastPost.user.id' => $lastPost->get("userId"),