MDL-46269 dml: Add casesensitive argument to sql_regex()
This commit is contained in:
@@ -1260,8 +1260,12 @@ class pgsql_native_moodle_database extends moodle_database {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function sql_regex($positivematch=true) {
|
||||
return $positivematch ? '~*' : '!~*';
|
||||
public function sql_regex($positivematch = true, $casesensitive = false) {
|
||||
if ($casesensitive) {
|
||||
return $positivematch ? '~' : '!~';
|
||||
} else {
|
||||
return $positivematch ? '~*' : '!~*';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user