1: <?php
2: 3: 4: 5: 6: 7: 8: 9:
10:
11: if (!defined('XOOPS_ROOT_PATH')) exit();
12:
13: require_once XOOPS_MODULE_PATH . "/legacy/actions/SearchResultsAction.class.php";
14: require_once XOOPS_MODULE_PATH . "/legacy/forms/SearchResultsForm.class.php";
15:
16: class Legacy_SearchAction extends Legacy_SearchResultsAction
17: {
18: function getDefaultView(&$controller, &$xoopsUser)
19: {
20: $root =& $controller->mRoot;
21: $service =& $root->mServiceManager->getService("LegacySearch");
22: if (is_object($service)) {
23: $client =& $root->mServiceManager->createClient($service);
24:
25: $this->mModules = $client->call('getActiveModules', array());
26: }
27:
28: return LEGACY_FRAME_VIEW_INDEX;
29: }
30:
31: function _getSelectedMids()
32: {
33: $ret = array();
34: foreach(array_keys($this->mModules) as $key) {
35: $ret[] = $this->mModules[$key]['mid'];
36: }
37:
38: return $ret;
39: }
40:
41: function executeViewIndex(&$controller, &$xoopsUser, &$render)
42: {
43: $render->setTemplateName("legacy_search_form.html");
44:
45: $render->setAttribute('actionForm', $this->mActionForm);
46:
47: $render->setAttribute('moduleArr', $this->mModules);
48:
49:
50:
51:
52:
53: $render->setAttribute('selectedMidArr', $this->_getSelectedMids());
54: $render->setAttribute('searchRuleMessage', @sprintf(_SR_KEYTOOSHORT, $this->mConfig['keyword_min']));
55: }
56: }
57:
58: ?>
59: