diff --git a/module/search/model.php b/module/search/model.php index 770c90cc3f..5605abff9c 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -334,7 +334,7 @@ class searchModel extends model * * @param int $queryID * @access public - * @return string + * @return object */ public function getQuery($queryID) { @@ -357,6 +357,20 @@ class searchModel extends model return $query; } + /** + * Get a query. + * + * @param int $queryID + * @access public + * @return object + */ + public function getByID($queryID) + { + $query = $this->dao->findByID($queryID)->from(TABLE_USERQUERY)->fetch(); + if(!$query) return false; + return $query; + } + /** * Save current query to db. * diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php index 7af76e8e24..52918a87dc 100644 --- a/module/search/view/buildform.html.php +++ b/module/search/view/buildform.html.php @@ -228,7 +228,7 @@ foreach($fieldParams as $fieldName => $param)