Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Extended complexWhere to allow a negative operator

  • Loading branch information...
commit 3aeceaf21bfdeb561a816c0a32f39c1842f13852 1 parent fb43267
Chris Hoult authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/Helios/HQL.php
View
10 lib/Helios/HQL.php
@@ -936,7 +936,15 @@ private function _complexWhere( $fieldName, array $terms, $and )
}
else
{
- $where .= "$fieldName = ?";
+ if ( preg_match( '/^!(.+)$/', $term, $matches ) )
+ {
+ $term = $matches[ 1 ];
+ $where .= "$fieldName != ?";
+ }
+ else
+ {
+ $where .= "$fieldName = ?";
+ }
$params[] = $term;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.