[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.7-199-gb81e768
jesse
jesse at bestpractical.com
Fri Mar 12 05:39:28 EST 2010
The branch, 3.8-trunk has been updated
via b81e7683b4ad86ba5a52b40595b672d516311310 (commit)
from 539c8516f27955f4db7b7f312b1c065d7268f86b (commit)
Summary of changes:
lib/RT/Search/Googleish.pm | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit b81e7683b4ad86ba5a52b40595b672d516311310
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Fri Mar 12 11:36:17 2010 +0100
Googleish search was making incorrect assumptions about RT::User and
RT::Group's Load function returning a boolean not a list. This was
throwing (harmless, but ugly) errors.
diff --git a/lib/RT/Search/Googleish.pm b/lib/RT/Search/Googleish.pm
index 07e1904..4c14c47 100644
--- a/lib/RT/Search/Googleish.pm
+++ b/lib/RT/Search/Googleish.pm
@@ -142,7 +142,8 @@ sub QueryToSQL {
# Is there a queue named $key?
elsif ( $Queue = RT::Queue->new( $self->TicketsObj->CurrentUser )
- and $Queue->Load($key) )
+ and $Queue->Load($key)
+ and $Queue->id )
{
my $quoted_queue = $Queue->Name;
$quoted_queue =~ s/'/\\'/g;
@@ -152,6 +153,7 @@ sub QueryToSQL {
# Is there a owner named $key?
elsif ( $User = RT::User->new( $self->TicketsObj->CurrentUser )
and $User->Load($key)
+ and $User->id
and $User->Privileged )
{
push @owner_clauses, "Owner = '" . $User->Name . "'";
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list