| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | 1 | public function main() |
|
| 23 | { |
||
| 24 | 1 | global $phpbb_container; |
|
|
1 ignored issue
–
show
|
|||
| 25 | |||
| 26 | /** @var \phpbb\admanagement\controller\admin_controller $admin_controller */ |
||
| 27 | 1 | $admin_controller = $phpbb_container->get('phpbb.admanagement.admin.controller'); |
|
| 28 | |||
| 29 | // Make the $u_action url available in the admin controller |
||
| 30 | 1 | $admin_controller->set_page_url($this->u_action); |
|
| 31 | |||
| 32 | // Load a template from adm/style for our ACP page |
||
| 33 | 1 | $this->tpl_name = 'manage_ads'; |
|
| 34 | |||
| 35 | // Set the page title for our ACP page |
||
| 36 | 1 | $this->page_title = $admin_controller->get_page_title(); |
|
| 37 | |||
| 38 | 1 | $admin_controller->main(); |
|
| 39 | 1 | } |
|
| 40 | } |
||
| 41 |
Instead of relying on
globalstate, we recommend one of these alternatives:1. Pass all data via parameters
2. Create a class that maintains your state