merging 7.1.3 changes

This commit is contained in:
JT Smith 2006-10-31 23:34:55 +00:00
parent 82bea1825c
commit 67dfefff08
4 changed files with 20 additions and 15 deletions

View file

@ -13,7 +13,8 @@ save you many hours of grief.
install Text::Aspell, and any dictionary you like. If you want to
use spellchecking you have to setup the dictionaries you want your
users to use in the config file. Also you'll have to check the
spellchecker checkbox in the RichEdit asset you're using.
spellchecker checkbox in the RichEdit asset you're using. You'll
also need to install the Locale::US perl module.
7.1.3
--------------------------------------------------------------------

View file

@ -1081,12 +1081,13 @@ sub www_search {
my $self = shift;
my $i18n = WebGUI::International->new($self->session, 'Asset_Collaboration');
my %var;
my $query = $self->session->form->process("query","text");
$var{'form.header'} = WebGUI::Form::formHeader($self->session,{action=>$self->getUrl})
.WebGUI::Form::hidden($self->session,{ name=>"func", value=>"search" })
.WebGUI::Form::hidden($self->session,{ name=>"doit", value=>1 });
$var{'query.form'} = WebGUI::Form::text($self->session,{
name=>'query',
value=>$self->session->form->process("query","text")
value=>$query
});
$var{'form.search'} = WebGUI::Form::submit($self->session,{value=>$i18n->get(170,'WebGUI')});
$var{'form.footer'} = WebGUI::Form::formFooter($self->session);
@ -1096,11 +1097,11 @@ sub www_search {
if ($self->session->form->process("doit")) {
my $search = WebGUI::Search->new($self->session);
$search->search({
keywords=>$self->session->form->process("query","text"),
keywords=>$query,
lineage=>[$self->get("lineage")],
classes=>["WebGUI::Asset::Post", "WebGUI::Asset::Post::Thread"]
});
my $p = $search->getPaginatorResultSet($self->getUrl("func=search;doit=1"), $self->get("threadsPerPage"));
my $p = $search->getPaginatorResultSet($self->getUrl("func=search;doit=1;query=".$query), $self->get("threadsPerPage"));
$self->appendPostListTemplateVars(\%var, $p);
}
return $self->processStyle($self->processTemplate(\%var, $self->get("searchTemplateId")));

View file

@ -588,15 +588,18 @@ sub getDatabaseUsers {
my $query = $self->get("dbQuery");
WebGUI::Macro::process($self->session,\$query);
my $sth = $dbh->unconditionalRead($query);
unless ($sth->errorCode < 1) {
$self->session->errorHandler->warn("There was a problem with the database query for group ID $gid.");
}
else {
while(my ($userId)=$sth->array) {
push @dbUsers, $userId;
if (defined $sth) {
unless ($sth->errorCode < 1) {
$self->session->errorHandler->warn("There was a problem with the database query for group ID $gid.");
} else {
while(my ($userId)=$sth->array) {
push @dbUsers, $userId;
}
}
$sth->finish;
} else {
$self->session->errorHandler->error("Couldn't process unconditional read for database group with group id $gid.");
}
$sth->finish;
$dbLink->disconnect;
}
}

View file

@ -61,7 +61,7 @@ sub delete {
my $name = shift;
return undef unless ($name);
delete $self->{_data}{$name};
$self->session->db->write("delete from userSessionScratch where name=? and sessionId=?", [$name, $self->{_sessionId}]);
$self->session->db->write("delete from userSessionScratch where name=? and sessionId=?", [$name, $self->session->getId]);
}
@ -76,7 +76,7 @@ Deletes all scratch variables for this session.
sub deleteAll {
my $self = shift;
delete $self->{_data};
$self->session->db->write("delete from userSessionScratch where sessionId=?", [$self->{_sessionId}]);
$self->session->db->write("delete from userSessionScratch where sessionId=?", [$self->session->getId]);
}
@ -175,7 +175,7 @@ sub new {
my $class = shift;
my $session = shift;
my $data = $session->db->buildHashRef("select name,value from userSessionScratch where sessionId=?",[$session->getId]);
bless {_session=>$session,_sessionId=>$session->getId, _data=>$data}, $class;
bless {_session=>$session, _data=>$data}, $class;
}
@ -215,7 +215,7 @@ sub set {
my $value = shift;
return undef unless ($name);
$self->{_data}{$name} = $value;
$self->session->db->write("insert into userSessionScratch (sessionId, name, value) values (?,?,?) on duplicate key update value=VALUES(value)", [$self->{_sessionId}, $name, $value]);
$self->session->db->write("insert into userSessionScratch (sessionId, name, value) values (?,?,?) on duplicate key update value=VALUES(value)", [$self->session->getId, $name, $value]);
}