fts : the results are now sorted by date if a date/datetime/time field is available

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3463 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-03-28 07:21:08 +00:00
parent 05d7abe0d3
commit 28d61e1517

10
fts.php
View File

@@ -103,6 +103,16 @@ class fts
$dbl->whereAddParenthesisClose ();
$i++;
}
// Look for the order by date if provided
foreach ($dbl->fields () as $field=>$params)
{
if ($params[0] == "date" || $params[0] == "datetime" ||
$params[0] == "time")
{
$dbl->orderAdd ($field, "DESC");
break;
}
}
return $dbl->execute ();
}