Fixed bug #564484.
This commit is contained in:
parent
b2ebf48300
commit
8c8f756933
1 changed files with 2 additions and 1 deletions
|
|
@ -42,6 +42,7 @@ sub duplicate {
|
||||||
my ($w, %data, $newQuestionId, $sth);
|
my ($w, %data, $newQuestionId, $sth);
|
||||||
tie %data, 'Tie::CPHash';
|
tie %data, 'Tie::CPHash';
|
||||||
$w = $_[0]->SUPER::duplicate($_[1]);
|
$w = $_[0]->SUPER::duplicate($_[1]);
|
||||||
|
$w = WebGUI::Wobject::FAQ->new({wobjectId=>$w,namespace=>$namespace});
|
||||||
$w->set({
|
$w->set({
|
||||||
topOn=>$_[0]->get("topOn"),
|
topOn=>$_[0]->get("topOn"),
|
||||||
tocOn=>$_[0]->get("tocOn"),
|
tocOn=>$_[0]->get("tocOn"),
|
||||||
|
|
@ -50,7 +51,7 @@ sub duplicate {
|
||||||
$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) {
|
||||||
$newQuestionId = getNextId("questionId");
|
$newQuestionId = getNextId("questionId");
|
||||||
WebGUI::SQL->write("insert into FAQ_question values ($w, $newQuestionId, "
|
WebGUI::SQL->write("insert into FAQ_question values (".$w->get("wobjectId").", $newQuestionId, "
|
||||||
.quote($data{question}).", ".quote($data{answer}).", $data{sequenceNumber})");
|
.quote($data{question}).", ".quote($data{answer}).", $data{sequenceNumber})");
|
||||||
}
|
}
|
||||||
$sth->finish;
|
$sth->finish;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue