diff options
author | xue <> | 2006-05-12 12:38:32 +0000 |
---|---|---|
committer | xue <> | 2006-05-12 12:38:32 +0000 |
commit | e2149e3d8b87b382563a9def6f376a5f289754d3 (patch) | |
tree | fd24e9c28d023a483cc632683e6e998d2e11bfce /demos/quickstart/protected/pages/Search.php | |
parent | d84327e69e858d369ea0c78f6106cfaa54994032 (diff) |
Merge from 3.0 branch till 1054.
Diffstat (limited to 'demos/quickstart/protected/pages/Search.php')
-rw-r--r-- | demos/quickstart/protected/pages/Search.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/demos/quickstart/protected/pages/Search.php b/demos/quickstart/protected/pages/Search.php index c7bdce89..297d2f50 100644 --- a/demos/quickstart/protected/pages/Search.php +++ b/demos/quickstart/protected/pages/Search.php @@ -9,9 +9,17 @@ class Search extends TPage {
if(!$this->IsPostBack && strlen($text = $this->search->getText()) > 0)
{
- $search = $this->getApplication()->getModule("search");
- $this->results->setDataSource($search->find($text));
- $this->results->dataBind();
+ $quickstart = $this->getApplication()->getModule("quickstart_search");
+ $hits_1 = $quickstart->find($text);
+ $this->quickstart_results->setDataSource($hits_1);
+ $this->quickstart_results->dataBind();
+
+ $api = $this->getApplication()->getModule("api_search");
+ $hits_2 = $api->find($text);
+ $this->api_results->setDataSource($hits_2);
+ $this->api_results->dataBind();
+
+ $this->emptyResult->setVisible(count($hits_1)+count($hits_2) == 0);
}
}
|