[Slim-Checkins] r33821 - /7.7/trunk/server/Slim/Web/XMLBrowser.pm

[email protected] Tue, 07 Feb 2012 23:56:59 -0000
Newsgroups gmane.music.equipment.slimdevices.cvs
Message-ID <[email protected]>
Author: adrian
Date: Tue Feb  7 15:56:59 2012
New Revision: 33821

URL: http://svn.slimdevices.com/slim?rev=33821&view=rev
Log:
Bug: 17373
Description: revert change 33811 as it breaks other search results

Modified:
    7.7/trunk/server/Slim/Web/XMLBrowser.pm

Modified: 7.7/trunk/server/Slim/Web/XMLBrowser.pm
URL: http://svn.slimdevices.com/slim/7.7/trunk/server/Slim/Web/XMLBrowser.pm?rev=33821&r1=33820&r2=33821&view=diff
==============================================================================
--- 7.7/trunk/server/Slim/Web/XMLBrowser.pm (original)
+++ 7.7/trunk/server/Slim/Web/XMLBrowser.pm Tue Feb  7 15:56:59 2012
@@ -277,6 +277,9 @@
 			my $searchQuery;
 			
 			if ( $subFeed->{'type'} && $subFeed->{'type'} eq 'search' && defined $stash->{'q'} ) {
+				# bug 17373 - remove period from search expression, as it breaks our index (and is ignored during the search anyway)
+				$stash->{q} =~ s/\./ /g;
+
 				$crumbText .= '_' . uri_escape_utf8( $stash->{q}, "^A-Za-z0-9" );
 				$searchQuery = $stash->{'q'};
 			}
@@ -1183,14 +1186,8 @@
 		return;
 	}
 	
-	# Bug 17373: rewrite the index arg from raw uri if present as it will already be unescaped which breaks search encoding of index
-	# (this is the same issue as bug 17181)
-	my ($itemId) = ($response->request->uri =~ m%index=(.*?)&%);
-	if ($itemId) {
-		$args->{'index'} = $itemId;
-	}
-
 	my ($index, $quantity) = (($args->{'start'} || 0), ($args->{'itemsPerPage'} || $prefs->get('itemsPerPage')));
+	my $itemId = $args->{'index'};
 	if (defined $itemId) {
 		my $i = $itemId;
 		$i =~ s/^(?:[a-f0-9]{8})?\.?//;	# strip sessionid if present