From d0fb8d5ab729f6ad21b0dbb2d0e6dd2fa576e647 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Sun, 2 May 2004 16:18:30 +0000 Subject: [PATCH] Bugfix [ 940008 ] error deleting parts of a survey in 6.0.1 (Thanks to Andreas Sexauer.) --- docs/changelog/6.x.x.txt | 2 ++ lib/WebGUI/Wobject/Survey.pm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 9794f09a3..3bb26a1b5 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -25,6 +25,8 @@ - Bugfix [ 943298 ] Events Calendar recurrence error in WG6.0 (thanks to Frank Dillon). - Bugfix [ 942865 ] urlizedTitle problem. (Thanks to tr0nd). + - Bugfix [ 940008 ] error deleting parts of a survey in 6.0.1 (Thanks to + Andreas Sexauer.) 6.0.1 diff --git a/lib/WebGUI/Wobject/Survey.pm b/lib/WebGUI/Wobject/Survey.pm index 5f58f555b..af3d43536 100644 --- a/lib/WebGUI/Wobject/Survey.pm +++ b/lib/WebGUI/Wobject/Survey.pm @@ -436,7 +436,7 @@ sub www_deleteAnswer { #------------------------------------------------------------------- sub www_deleteAnswerConfirm { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))); - WebGUI::SQL->write("delete from Survey_response where Survey_answerId=".quote($session{form}{aid})); + WebGUI::SQL->write("delete from Survey_questionResponse where Survey_answerId=".quote($session{form}{aid})); $_[0]->deleteCollateral("Survey_answer","Survey_answerId",$session{form}{aid}); $_[0]->reorderCollateral("Survey_answer","Survey_answerId","Survey_id"); return $_[0]->www_editQuestion;