Skip to content

Commit

Permalink
Remove un-needed language translating
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Friedman <[email protected]>
  • Loading branch information
iMattPro committed May 14, 2023
1 parent 0724a20 commit 2b61d3f
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 43 deletions.
2 changes: 1 addition & 1 deletion acp/main_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function main($id, $mode)
$this->tpl_name = $mode . '_ads';

// Set the page title for our ACP page
$this->page_title = $admin_controller->get_page_title();
$this->page_title = 'ACP_PHPBB_ADS_TITLE';

$admin_controller->{'mode_' . $mode}();
}
Expand Down
10 changes: 0 additions & 10 deletions controller/admin_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,6 @@ public function set_page_url($u_action)
$this->u_action = $u_action;
}

/**
* Get ACP page title for Ads module
*
* @return string Language string for Ads ACP module
*/
public function get_page_title()
{
return $this->language->lang('ACP_PHPBB_ADS_TITLE');
}

/**
* Process user request for settings mode
*
Expand Down
8 changes: 0 additions & 8 deletions controller/ucp_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ public function set_page_url($u_action)
$this->u_action = $u_action;
}

/**
* @return string Module language string
*/
public function get_page_title()
{
return $this->language->lang('UCP_PHPBB_ADS_STATS');
}

/**
* Display UCP ads module
*/
Expand Down
9 changes: 0 additions & 9 deletions tests/controller/admin_controller_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,6 @@ public function get_controller()
return $controller;
}

/**
* Test get_page_title() method
*/
public function test_get_page_title()
{
$controller = $this->get_controller();
self::assertEquals($controller->get_page_title(), $this->language->lang('ACP_PHPBB_ADS_TITLE'));
}

/**
* Test mode_settings()
*/
Expand Down
10 changes: 0 additions & 10 deletions tests/controller/ucp_controller_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@ public function get_controller()
return $controller;
}

/**
* Test get_page_title() method
*/
public function test_get_page_title()
{
$controller = $this->get_controller();

self::assertEquals($this->language->lang('UCP_PHPBB_ADS_STATS'), $controller->get_page_title());
}

/**
* Test data for the test_main() function
*
Expand Down
4 changes: 0 additions & 4 deletions tests/ucp/ucp_module_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ public function test_main_module()
->expects(self::once())
->method('set_page_url');

$ucp_controller
->expects(self::once())
->method('get_page_title');

$ucp_controller
->expects(self::once())
->method('main');
Expand Down
2 changes: 1 addition & 1 deletion ucp/main_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function main()
$this->tpl_name = 'ucp_ads_stats';

// Set the page title for our UCP page
$this->page_title = $ucp_controller->get_page_title();
$this->page_title = 'UCP_PHPBB_ADS_STATS';

$ucp_controller->main();
}
Expand Down

0 comments on commit 2b61d3f

Please sign in to comment.