bunch of fixes
This commit is contained in:
parent
02e687d04c
commit
156f48f465
10 changed files with 45 additions and 23 deletions
|
|
@ -830,7 +830,7 @@ sub setLastPost {
|
|||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $date = shift;
|
||||
$self->update(lastPostId=>$id, lastPostDate=>$date);
|
||||
$self->update({lastPostId=>$id, lastPostDate=>$date});
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -843,6 +843,7 @@ Subscribes a user to this collaboration system.
|
|||
|
||||
sub subscribe {
|
||||
my $self = shift;
|
||||
WebGUI::Cache->new("wobject_".$self->getId."_".$session{user}{userId})->delete;
|
||||
WebGUI::Grouping::addUsersToGroups([$session{user}{userId}],[$self->get("subscriptionGroupId")]);
|
||||
}
|
||||
|
||||
|
|
@ -856,6 +857,7 @@ Unsubscribes a user from this collaboration system
|
|||
|
||||
sub unsubscribe {
|
||||
my $self = shift;
|
||||
WebGUI::Cache->new("wobject_".$self->getId."_".$session{user}{userId})->delete;
|
||||
WebGUI::Grouping::deleteUsersFromGroups([$session{user}{userId}],[$self->get("subscriptionGroupId")]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ sub getEditForm {
|
|||
$sth->finish;
|
||||
unless(%indexName) {
|
||||
return "<p><b>" . WebGUI::International::get(2,"Asset_IndexedSearch") .
|
||||
"<p>" . WebGUI::International::get(3,"Asset_IndexedSearch") . "</b></p>";
|
||||
"<p>" . WebGUI::International::get(3,"Asset_IndexedSearch") . "</p></b></p>";
|
||||
}
|
||||
|
||||
# Index to use
|
||||
|
|
@ -381,10 +381,13 @@ sub view {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("search add/edit");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("26","Asset_IndexedSearch"));
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("search add/edit");
|
||||
my $form = $self->getEditForm;
|
||||
my $output = $form;
|
||||
$output = $form->print unless $form =~ /^<p><b/;
|
||||
return $self->getAdminConsole->render($output,WebGUI::International::get("26","Asset_IndexedSearch"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -687,12 +687,12 @@ sub www_edit {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editSave {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
$_[0]->SUPER::www_editSave();
|
||||
my $output = $_[0]->SUPER::www_editSave();
|
||||
if ($session{form}{proceed} eq "addQuestion") {
|
||||
$session{form}{qid} = "new";
|
||||
return $_[0]->www_editQuestion;
|
||||
}
|
||||
return "";
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -728,7 +728,7 @@ sub www_editAnswer {
|
|||
$question = WebGUI::SQL->buildHashRef("select Survey_questionId,question
|
||||
from Survey_question where Survey_id=".quote($self->get("Survey_id"))." order by sequenceNumber");
|
||||
$question = { ('-1' => WebGUI::International::get(82,'Asset_Survey'),%$question) };
|
||||
$f->select(
|
||||
$f->selectList(
|
||||
-name=>"gotoQuestion",
|
||||
-options=>$question,
|
||||
-value=>[$answer->{gotoQuestion}],
|
||||
|
|
@ -855,11 +855,11 @@ sub www_editQuestion {
|
|||
while (%data = $sth->hash) {
|
||||
$output .=
|
||||
deleteIcon('func=deleteAnswerConfirm&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId},
|
||||
$self->getUrl,WebGUI::International::get(45,'Asset_Survey')).
|
||||
editIcon('func=editAnswer&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId}, $self->getUrl).
|
||||
moveUpIcon('func=moveAnswerUp'.'&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId}, $self->getUrl).
|
||||
moveDownIcon('func=moveAnswerDown&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId}, $self->getUrl).
|
||||
' '.$data{answer}.'<br />';
|
||||
$self->get("url"),WebGUI::International::get(45,'Asset_Survey')).
|
||||
editIcon('func=editAnswer&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId}, $self->get("url")).
|
||||
moveUpIcon('func=moveAnswerUp'.'&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId}, $self->get("url")).
|
||||
moveDownIcon('func=moveAnswerDown&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId}, $self->get("url")).
|
||||
' '.$data{answer}.'<br>';
|
||||
}
|
||||
$sth->finish;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue