mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 17:05:45 +02:00
Merge remote-tracking branch 'origin/1.2' into 2.0
# Conflicts: # code/PostgreSQLDatabase.php
This commit is contained in:
commit
1f6d892609
@ -362,6 +362,9 @@ class PostgreSQLDatabase extends Database
|
|||||||
*/
|
*/
|
||||||
public function searchEngine($classesToSearch, $keywords, $start, $pageLength, $sortBy = "ts_rank DESC", $extraFilter = "", $booleanSearch = false, $alternativeFileFilter = "", $invertedMatch = false)
|
public function searchEngine($classesToSearch, $keywords, $start, $pageLength, $sortBy = "ts_rank DESC", $extraFilter = "", $booleanSearch = false, $alternativeFileFilter = "", $invertedMatch = false)
|
||||||
{
|
{
|
||||||
|
$start = (int)$start;
|
||||||
|
$pageLength = (int)$pageLength;
|
||||||
|
|
||||||
//Fix the keywords to be ts_query compatitble:
|
//Fix the keywords to be ts_query compatitble:
|
||||||
//Spaces must have pipes
|
//Spaces must have pipes
|
||||||
//@TODO: properly handle boolean operators here.
|
//@TODO: properly handle boolean operators here.
|
||||||
@ -583,7 +586,7 @@ class PostgreSQLDatabase extends Database
|
|||||||
{
|
{
|
||||||
preg_match_all('/%(.)/', $format, $matches);
|
preg_match_all('/%(.)/', $format, $matches);
|
||||||
foreach ($matches[1] as $match) {
|
foreach ($matches[1] as $match) {
|
||||||
if (array_search($match, array('Y', 'm', 'd', 'H', 'i', 's', 'U')) === false) {
|
if (array_search($match, array('Y','m','d','H','i','s','U')) === false) {
|
||||||
user_error('formattedDatetimeClause(): unsupported format character %' . $match, E_USER_WARNING);
|
user_error('formattedDatetimeClause(): unsupported format character %' . $match, E_USER_WARNING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user