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/SearchShowallAction.class.php";
14: require_once XOOPS_MODULE_PATH . "/legacy/forms/SearchShowallbyuserForm.class.php";
15:
16: class Legacy_SearchShowallbyuserAction extends Legacy_SearchShowallAction
17: {
18: function _setupActionForm()
19: {
20: $this->mActionForm =new Legacy_SearchShowallbyuserForm(0);
21: $this->mActionForm->prepare();
22: }
23:
24: function _getTemplateName()
25: {
26: return "legacy_search_showallbyuser.html";
27: }
28:
29: function _getSelectedMids()
30: {
31: $ret = array();
32: $ret[] = $this->mActionForm->get('mid');
33:
34: return $ret;
35: }
36:
37: function _doSearch(&$client, &$xoopsUser, &$params)
38: {
39: return $client->call('searchItemsOfUser', $params);
40: }
41:
42: function _getMaxHit()
43: {
44: return LEGACY_SEARCH_SHOWALL_MAXHIT;
45: }
46:
47: function executeViewIndex(&$controller, &$xoopsUser, &$render)
48: {
49: parent::executeViewIndex($controller, $xoopsUser, $render);
50:
51: $handler =& xoops_gethandler('user');
52: $user =& $handler->get($this->mActionForm->get('uid'));
53:
54: $render->setAttribute('targetUser', $user);
55:
56: $prevStart = $this->mActionForm->get('start') - LEGACY_SEARCH_SHOWALL_MAXHIT;
57: if ($prevStart < 0) {
58: $prevStart = 0;
59: }
60:
61: $render->setAttribute('prevStart', $prevStart);
62: $render->setAttribute('nextStart', $this->mActionForm->get('start') + LEGACY_SEARCH_SHOWALL_MAXHIT);
63: }
64: }
65:
66: ?>
67: