bugs fixed
This commit is contained in:
parent
e6818b58fc
commit
5f33a4a15d
11 changed files with 55 additions and 34 deletions
|
|
@ -212,7 +212,6 @@ sub www_view {
|
|||
$input_name =~ s/^HttpProxy_//;
|
||||
|
||||
my $uploadFile = $session{cgi}->tmpFileName($session{form}{'HttpProxy_'.$input_name});
|
||||
|
||||
if(-r $uploadFile) { # Found uploaded file
|
||||
@formUpload=($uploadFile, qq/$session{form}{'HttpProxy_'.$input_name}/);
|
||||
$formdata{$input_name}=\@formUpload;
|
||||
|
|
|
|||
|
|
@ -431,10 +431,17 @@ sub uiLevel {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteAnswer {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $_[0]->confirm(WebGUI::International::get(45,$_[0]->get("namespace")),
|
||||
WebGUI::URL::page('func=deleteAnswerConfirm&wid='.$_[0]->get("wobjectId").'&aid='
|
||||
.$session{form}{aid}.'&qid='.$session{form}{qid}));
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
my ($answerCount) = WebGUI::SQL->quickArray("select count(*) from Survey_answer where Survey_questionId=".quote($session{form}{qid}));
|
||||
if ($answerCount > 1) {
|
||||
return $self->confirm(
|
||||
$self->i18n(45),
|
||||
WebGUI::URL::page('func=deleteAnswerConfirm&wid='.$self->wid.'&aid='.$session{form}{aid}.'&qid='.$session{form}{qid})
|
||||
);
|
||||
} else {
|
||||
return $self->i18n("cannot delete the last answer");
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue