[Slim-Checkins] r11865 - in /trunk/server: Changelog7.html Slim/Web/Pages/Search.pm

kdf at svn.slimdevices.com kdf at svn.slimdevices.com
Mon Apr 30 17:53:17 PDT 2007


Author: kdf
Date: Mon Apr 30 17:53:17 2007
New Revision: 11865

URL: http://svn.slimdevices.com?rev=11865&view=rev
Log:
Bug: 4947
Description: allow 0 as a search value


Modified:
    trunk/server/Changelog7.html
    trunk/server/Slim/Web/Pages/Search.pm

Modified: trunk/server/Changelog7.html
URL: http://svn.slimdevices.com/trunk/server/Changelog7.html?rev=11865&r1=11864&r2=11865&view=diff
==============================================================================
--- trunk/server/Changelog7.html (original)
+++ trunk/server/Changelog7.html Mon Apr 30 17:53:17 2007
@@ -83,6 +83,7 @@
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4873">#4873</a> - Error creating INI entry in Logitech.url</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4922">#4922</a> - When PlayList is empty, Download brings up a blank web page and gets stuck there</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4941">#4941</a> - New music limit not working</li>
+		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4947">#4947</a> - Search does not search '0'</li>
 </li>
 	<ul>
 		<li></li>

Modified: trunk/server/Slim/Web/Pages/Search.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Web/Pages/Search.pm?rev=11865&r1=11864&r2=11865&view=diff
==============================================================================
--- trunk/server/Slim/Web/Pages/Search.pm (original)
+++ trunk/server/Slim/Web/Pages/Search.pm Mon Apr 30 17:53:17 2007
@@ -44,7 +44,7 @@
 	$params->{'artwork'}      = 0;
 
 	# short circuit
-	if (!defined($query) || ($params->{'manualSearch'} && !$query)) {
+	if (!defined($query) || ($params->{'manualSearch'} && $query eq '')) {
 		return Slim::Web::HTTP::filltemplatefile("search.html", $params);
 	}
 
@@ -272,7 +272,7 @@
 	my ($params, $rs, $qstring, $advancedSearch) = @_;
 
 	my $player = $params->{'player'};
-	my $query  = $params->{'query'}  || '';
+	my $query  = defined($params->{'query'}) ? $params->{'query'} : '';
 	my $type   = lc($rs->result_source->source_name) || 'track';
 	my $count  = $rs->count || return 0;
 



More information about the checkins mailing list