Skip to content

Commit 521be77

Browse files
committed
Rename function for search vars to common display vars
1 parent 8ebc2f6 commit 521be77

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

controller/base.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,18 @@ protected function assign_template_block_vars($block, $rows)
133133
}
134134

135135
/**
136-
* Assign template variables for a search ideas field
136+
* Assign common template variables for Ideas pages
137137
*
138138
* @return void
139139
*/
140-
protected function display_search_ideas()
140+
protected function display_common_vars()
141141
{
142-
$this->template->assign_vars(array(
142+
$this->template->assign_vars([
143143
'S_DISPLAY_SEARCHBOX' => (bool) $this->auth->acl_get('u_search') && $this->auth->acl_get('f_search', $this->config['ideas_forum_id']) && $this->config['load_search'],
144144
'S_SEARCHBOX_ACTION' => append_sid("{$this->root_path}search.{$this->php_ext}"),
145-
'S_SEARCH_IDEAS_HIDDEN_FIELDS' => build_hidden_fields(array('fid' => array($this->config['ideas_forum_id']))),
146-
));
145+
'S_SEARCH_IDEAS_HIDDEN_FIELDS' => build_hidden_fields(['fid' => [$this->config['ideas_forum_id']]]),
146+
147147
'U_SEARCH_MY_IDEAS' => $this->helper->route('phpbb_ideas_list_controller', ['sort' => ideas::SORT_MYIDEAS, 'status' => '-1']),
148+
]);
148149
}
149150
}

controller/index_controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public function index()
5757
'FORUM_NAME' => $this->language->lang('IDEAS'),
5858
));
5959

60-
// Display the search ideas field
61-
$this->display_search_ideas();
60+
// Display common ideas template vars
61+
$this->display_common_vars();
6262

6363
return $this->helper->render('index_body.html', $this->language->lang('IDEAS_TITLE'));
6464
}

controller/list_controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ public function ideas_list($sort)
112112
$start
113113
);
114114

115-
// Display the search ideas field
116-
$this->display_search_ideas();
115+
// Display common ideas template vars
116+
$this->display_common_vars();
117117

118118
return $this->helper->render('list_body.html', $this->language->lang('IDEA_LIST'));
119119
}

0 commit comments

Comments
 (0)