Skip to content
Snippets Groups Projects
Commit 2a3251a8 authored by catch's avatar catch
Browse files

Issue #1565972 by c960657: Clean-up of mapConditionOperator().

parent 926cbd66
No related branches found
No related tags found
No related merge requests found
......@@ -157,18 +157,12 @@ public function databaseType() {
}
public function mapConditionOperator($operator) {
static $specials;
// Function calls not allowed in static declarations, thus this method.
if (!isset($specials)) {
$specials = array(
// In PostgreSQL, 'LIKE' is case-sensitive. For case-insensitive LIKE
// statements, we need to use ILIKE instead.
'LIKE' => array('operator' => 'ILIKE'),
'NOT LIKE' => array('operator' => 'NOT ILIKE'),
);
}
static $specials = array(
// In PostgreSQL, 'LIKE' is case-sensitive. For case-insensitive LIKE
// statements, we need to use ILIKE instead.
'LIKE' => array('operator' => 'ILIKE'),
'NOT LIKE' => array('operator' => 'NOT ILIKE'),
);
return isset($specials[$operator]) ? $specials[$operator] : NULL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment