| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function main() |
||
| 23 | { |
||
| 24 | global $phpbb_container; |
||
|
1 ignored issue
–
show
|
|||
| 25 | |||
| 26 | /** @var \phpbb\admanagement\controller\admin_controller $admin_controller */ |
||
| 27 | $admin_controller = $phpbb_container->get('phpbb.admanagement.admin.controller'); |
||
| 28 | |||
| 29 | // Make the $u_action url available in the admin controller |
||
| 30 | $admin_controller->set_page_url($this->u_action); |
||
| 31 | |||
| 32 | // Load a template from adm/style for our ACP page |
||
| 33 | $this->tpl_name = 'manage_ads'; |
||
| 34 | |||
| 35 | // Set the page title for our ACP page |
||
| 36 | $this->page_title = $admin_controller->get_page_title(); |
||
| 37 | |||
| 38 | $admin_controller->main(); |
||
| 39 | } |
||
| 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