| Conditions | 3 |
| Paths | 3 |
| Total Lines | 26 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function main($id, $mode) |
||
| 23 | { |
||
| 24 | global $config, $request, $template, $user; |
||
| 25 | |||
| 26 | $user->add_lang_ext('phpbb/admanagement', 'common'); |
||
| 27 | $this->tpl_name = 'acp_demo_body'; |
||
| 28 | $this->page_title = $user->lang('ACP_DEMO_TITLE'); |
||
| 29 | add_form_key('acme/demo'); |
||
| 30 | |||
| 31 | if ($request->is_set_post('submit')) |
||
| 32 | { |
||
| 33 | if (!check_form_key('acme/demo')) |
||
| 34 | { |
||
| 35 | trigger_error('FORM_INVALID', E_USER_WARNING); |
||
| 36 | } |
||
| 37 | |||
| 38 | $config->set('acme_demo_goodbye', $request->variable('acme_demo_goodbye', 0)); |
||
| 39 | |||
| 40 | trigger_error($user->lang('ACP_DEMO_SETTING_SAVED') . adm_back_link($this->u_action)); |
||
| 41 | } |
||
| 42 | |||
| 43 | $template->assign_vars(array( |
||
| 44 | 'U_ACTION' => $this->u_action, |
||
| 45 | 'ACME_DEMO_GOODBYE' => $config['acme_demo_goodbye'], |
||
| 46 | )); |
||
| 47 | } |
||
| 48 | } |
||
| 49 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.