Fixed a duplication bug.

This commit is contained in:
JT Smith 2002-11-02 19:49:42 +00:00
parent 840b6ac80a
commit 9ba51985d7

View file

@ -33,9 +33,7 @@ sub duplicate {
$w = $_[0]->SUPER::duplicate($_[1]); $w = $_[0]->SUPER::duplicate($_[1]);
$w = WebGUI::Wobject::FAQ->new({wobjectId=>$w,namespace=>$namespace}); $w = WebGUI::Wobject::FAQ->new({wobjectId=>$w,namespace=>$namespace});
$w->set({ $w->set({
topOn=>$_[0]->get("topOn"), templateId=>$_[0]->get("templateId")
tocOn=>$_[0]->get("tocOn"),
qaOn=>$_[0]->get("qaOn")
}); });
$sth = WebGUI::SQL->read("select * from FAQ_question where wobjectId=".$_[0]->get("wobjectId")); $sth = WebGUI::SQL->read("select * from FAQ_question where wobjectId=".$_[0]->get("wobjectId"));
while (%data = $sth->hash) { while (%data = $sth->hash) {
@ -179,9 +177,8 @@ sub www_moveQuestionUp {
#------------------------------------------------------------------- #-------------------------------------------------------------------
sub www_view { sub www_view {
my (%question, $output, $controls, $sth, %var, @qa, @toc); my (%question, $controls, $sth, %var, @qa, @toc);
tie %question,'Tie::CPHash'; tie %question,'Tie::CPHash';
$output = $_[0]->displayTitle;
if ($session{var}{adminOn}) { if ($session{var}{adminOn}) {
$var{addquestion} .= '<a href="'.WebGUI::URL::page('func=editQuestion&wid='.$_[0]->get("wobjectId")).'">' $var{addquestion} .= '<a href="'.WebGUI::URL::page('func=editQuestion&wid='.$_[0]->get("wobjectId")).'">'
.WebGUI::International::get(9,$namespace).'</a>'; .WebGUI::International::get(9,$namespace).'</a>';
@ -209,7 +206,7 @@ sub www_view {
$sth->finish; $sth->finish;
$var{toc_loop} = \@toc; $var{toc_loop} = \@toc;
$var{qa_loop} = \@qa; $var{qa_loop} = \@qa;
return $_[0]->processMacros($output.$_[0]->processTemplate($_[0]->get("templateId"),\%var)); return $_[0]->processMacros($_[0]->displayTitle.$_[0]->processTemplate($_[0]->get("templateId"),\%var));
} }