X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2Fm%2Ftickets%2Fsearch;h=782517453034a2fdfac30003bddd33c995f7c5ad;hb=de9d037528895f7151a9aead6724ce2df95f9586;hp=561e859e9bf2bc494edfc55891498fbf996291a9;hpb=73a6a80a9ca5edbd43d139b7cb25bfee4abfd35e;p=freeside.git

diff --git a/rt/share/html/m/tickets/search b/rt/share/html/m/tickets/search
index 561e859e9..782517453 100644
--- a/rt/share/html/m/tickets/search
+++ b/rt/share/html/m/tickets/search
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
@@ -52,7 +52,7 @@ $order => 'desc'
 $name => undef
 </%args>
 <%init>
-use RT::Search::Googleish;
+use RT::Search::Simple;
 my $query = $ARGS{'query'};
 if ($ARGS{'q'}) {
     my $tickets = RT::Tickets->new( $session{'CurrentUser'} );
@@ -60,7 +60,7 @@ if ($ARGS{'q'}) {
         Argument   => $ARGS{q},
         TicketsObj => $tickets,
     );
-    my $search = RT::Search::Googleish->new(%args);
+    my $search = RT::Search::Simple->new(%args);
     $query = $search->QueryToSQL();
 
 }
@@ -90,11 +90,16 @@ my $search;
         if ( $_->{'Query'} =~ /__Bookmarks__/ ) {
             $_->{'Rows'} = 999;
 
-            # DEPRECATED: will be here for a while up to 3.10/4.0
-            my $bookmarks = $session{'CurrentUser'}->UserObj->FirstAttribute('Bookmarks');
-            $bookmarks = $bookmarks->Content if $bookmarks;
-            $bookmarks ||= {};
-            my $query = join( " OR ", map " id = '$_' ", grep $bookmarks->{$_}, keys %$bookmarks ) || 'id=0';
+            # DEPRECATED: will be here for a while up to 4.4
+            RT->Deprecated(
+                Remove  => "4.4",
+                Instead => "id = '__Bookmarked__'",
+                Message => "The __Bookmarks__ query syntax is deprecated",
+                Object  => $search,
+            );
+
+            my @bookmarks = $session{'CurrentUser'}->UserObj->Bookmarks;
+            my $query = join(" OR ", map " id = '$_' ", @bookmarks ) || 'id=0';
             $_->{'Query'} =~ s/__Bookmarks__/( $query )/g;
         }
     }