Skip to content

Commit

Permalink
Fixed: #157
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammaye committed Nov 8, 2013
1 parent 9a7e931 commit 7f466f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EMongoDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ public function count($criteria = array()){
* @param array $project
* @return EMongoDataProvider
*/
public function search($query = array(), $project = array(), $partialMatch=false){
public function search($query = array(), $project = array(), $partialMatch=false, $sort = array()){
$this->trace(__FUNCTION__);

foreach($this->getSafeAttributeNames() as $attribute){
Expand Down Expand Up @@ -1057,7 +1057,7 @@ public function search($query = array(), $project = array(), $partialMatch=false
}
}
}
return new EMongoDataProvider($this, array('criteria' => array('condition' => $query, 'project' => $project)));
return new EMongoDataProvider($this, array('criteria' => array('condition' => $query, 'project' => $project, 'sort' => $sort)));
}

/**
Expand Down

0 comments on commit 7f466f8

Please sign in to comment.