summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSiegfried-Angel Gevatter Pujals <siegfried@gevatter.com>2012-10-02 11:14:41 +0200
committerSiegfried-Angel Gevatter Pujals <siegfried@gevatter.com>2012-10-02 11:14:41 +0200
commit86d15dd73f7d6d52223c6c2f9d274c9ebac9791e (patch)
tree2a502b2fa3bc21e91cd4e81d9393fa94c191c921 /src
parent0dddf67690ae2fa58003df8d61f56cb717cd0db9 (diff)
downloadzeitgeist-86d15dd73f7d6d52223c6c2f9d274c9ebac9791e.tar.gz
Revert "Fix assert_no_wildcard"
This reverts commit 0dddf67690ae2fa58003df8d61f56cb717cd0db9.
Diffstat (limited to 'src')
-rw-r--r--src/db-reader.vala22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/db-reader.vala b/src/db-reader.vala
index 85d88723..b27cf810 100644
--- a/src/db-reader.vala
+++ b/src/db-reader.vala
@@ -802,22 +802,20 @@ public class DbReader : Object
* If the value starts with the negation operator, throw an
* error.
*/
- protected void assert_no_negation (string field, string? val)
+ protected void assert_no_negation (string field, string val)
throws EngineError
{
- if (val != null) {
- if (!val.has_prefix ("!"))
- return;
- string error_message =
- "Field '%s' doesn't support negation".printf (field);
- warning (error_message);
- throw new EngineError.INVALID_ARGUMENT (error_message);
- }
+ if (!val.has_prefix ("!"))
+ return;
+ string error_message =
+ "Field '%s' doesn't support negation".printf (field);
+ warning (error_message);
+ throw new EngineError.INVALID_ARGUMENT (error_message);
}
// Used by get_where_clause_from_event_templates
/**
- * If the value starts with the expand operator, throw an
+ * If the value starts with the negation operator, throw an
* error.
*/
protected void assert_no_noexpand (string field, string? val)
@@ -841,10 +839,10 @@ public class DbReader : Object
throws EngineError
{
if (val != null) {
- if (!val.has_suffix ("*"))
+ if (val.has_suffix ("*"))
return;
string error_message =
- "Field '%s' doesn't support suffix search".printf (field);
+ "Field '%s' doesn't support prefix search".printf (field);
warning (error_message);
throw new EngineError.INVALID_ARGUMENT (error_message);
}