From 732eb630c4e5dc4a50b49239ec55b5840cd553e1 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 25 May 2004 20:58:54 +0000 Subject: [PATCH] bugfix [ 956219 ] can't delete survey question --- docs/changelog/6.x.x.txt | 3 +++ lib/WebGUI/Session.pm | 2 +- lib/WebGUI/Wobject/Survey.pm | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 05e6f474a..6d915d8e2 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -15,6 +15,9 @@ - Bugfix [ 949923 ] Collateral changes owner when editing - Bugfix [ 948050 ] Correct email address not accepted (fix) - Bugfix [ 938211 ] FIX: DeleteExpiredEvents.pm ignores offset + - Bugfix [ 951061 ] Login from AOL + - Bugfix [ 956219 ] can't delete survey question + diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm index 5f519e1d3..99df0f87e 100644 --- a/lib/WebGUI/Session.pm +++ b/lib/WebGUI/Session.pm @@ -109,7 +109,7 @@ sub _setupSessionVars { tie %vars, 'Tie::CPHash'; if ($_[0] ne "") { %vars = WebGUI::SQL->quickHash("select * from userSession where sessionId='$_[0]'"); - if ($vars{expires} < _time() || $vars{lastIP} ne $session{env}{REMOTE_ADDR}) { + if ($vars{expires} < _time() ) { #|| $vars{lastIP} ne $session{env}{REMOTE_ADDR}) { # had to remove for revolving ip proxies %vars = (); WebGUI::Session::end($_[0]); } diff --git a/lib/WebGUI/Wobject/Survey.pm b/lib/WebGUI/Wobject/Survey.pm index 45b8647fc..46d0f4ad3 100644 --- a/lib/WebGUI/Wobject/Survey.pm +++ b/lib/WebGUI/Wobject/Survey.pm @@ -453,10 +453,10 @@ sub www_deleteQuestion { sub www_deleteQuestionConfirm { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))); WebGUI::SQL->write("delete from Survey_answer where Survey_questionId=".quote($session{form}{qid})); - WebGUI::SQL->write("delete from Survey_response where Survey_questionId=".quote($session{form}{qid})); + WebGUI::SQL->write("delete from Survey_questionResponse where Survey_questionId=".quote($session{form}{qid})); $_[0]->deleteCollateral("Survey_question","Survey_questionId",$session{form}{qid}); $_[0]->reorderCollateral("Survey_question","Survey_questionId","Survey_id"); - return $_[0]->www_edit; + return ""; } #-------------------------------------------------------------------