f-spot r3547 - in trunk: . src



Author: sdelcroix
Date: Wed Jan 16 13:17:57 2008
New Revision: 3547
URL: http://svn.gnome.org/viewvc/f-spot?rev=3547&view=rev

Log:
2008-01-16  Stephane Delcroix  <sdelcroix novell com>

	* src/RatingRange.cs:
	* src/PhotoStore.cs: fix 2 query bugs.


Modified:
   trunk/ChangeLog
   trunk/src/PhotoStore.cs
   trunk/src/RatingRange.cs

Modified: trunk/src/PhotoStore.cs
==============================================================================
--- trunk/src/PhotoStore.cs	(original)
+++ trunk/src/PhotoStore.cs	Wed Jan 16 13:17:57 2008
@@ -1416,7 +1416,7 @@
 			where_clauses.Add (searchexpression.SqlCondition ());
 		}
 
-		if (extra_condition != null) {
+		if (extra_condition != null && extra_condition.Trim () != String.Empty) {
 			where_clauses.Add (extra_condition);
 		}
 		

Modified: trunk/src/RatingRange.cs
==============================================================================
--- trunk/src/RatingRange.cs	(original)
+++ trunk/src/RatingRange.cs	Wed Jan 16 13:17:57 2008
@@ -58,7 +58,7 @@
 		{
 			switch (this.ratetype) {
 			case (RatingType.Unrated) :
-				return String.Format (" photos.rating is NULL");
+				return String.Format (" photos.rating is NULL ");
 			case (RatingType.Rated) :
 				return String.Format (" photos.rating >= {0} AND photos.rating <= {1} ", minRating, maxRating);
 			default :



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]