Fixato sorting
Signed-off-by: Riccardo Di Dato <r.didato@asdynamics.it>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
db.notizia.ensureIndex({"about.author": "text",sottotitolo: "text",testo: "text",titolo: "text"},{weights: {"about.author": 1,sottotitolo: 7,testo: 5,titolo: 10},name: "notiziaDetails"})
|
||||
@@ -30,6 +30,7 @@ class DatatablesHelper {
|
||||
|
||||
$models = array();
|
||||
if (array_key_exists("search", $_POST) && array_key_exists("value", $_POST["search"]) && strcmp(trim($_POST["search"]["value"]),"")!=0 ){
|
||||
unset($options["sort"]);
|
||||
$models = $dao->search($useModel, trim($_POST["search"]["value"]), $filter, $options);
|
||||
|
||||
$ret->recordsTotal = $dao->searchCount($useModel, trim($_POST["search"]["value"]));
|
||||
|
||||
@@ -52,7 +52,7 @@ try {
|
||||
|
||||
$notizie = GlobalVariables::get("dao")->search("NotiziaModel",$searchParameters,
|
||||
array("status"=>NotiziaModel::STATUS_ACCEPTED),
|
||||
array("sort"=>array("about.data"=>-1),"limit"=>$limit,"skip"=>$skip)
|
||||
array("limit"=>$limit,"skip"=>$skip)
|
||||
);
|
||||
|
||||
// $notizie = GlobalVariables::get("dao")->query("NotiziaModel",
|
||||
|
||||
Reference in New Issue
Block a user