Skip to content

Commit 7ca7d09

Browse files
committed
Index replaces app as controller
1 parent fdfcc66 commit 7ca7d09

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

event/listener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function add_permission($event)
126126
*/
127127
public function viewonline_page($event)
128128
{
129-
if ($event['on_page'][1] === 'app' && strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/rules') === 0)
129+
if ($event['on_page'][1] === 'index' && strrpos($event['row']['session_page'], 'index.' . $this->php_ext . '/rules') === 0)
130130
{
131131
$event['location'] = $this->lang->lang('BOARDRULES_VIEWONLINE');
132132
$event['location_url'] = $this->controller_helper->route('phpbb_boardrules_main_controller');

tests/entity/rule_entity_message_test.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ protected function setUp(): void
2626
$db = $this->db;
2727

2828
$request = new \phpbb_mock_request();
29-
$request->overwrite('SCRIPT_NAME', '/app.php', \phpbb\request\request_interface::SERVER);
30-
$request->overwrite('SCRIPT_FILENAME', 'app.php', \phpbb\request\request_interface::SERVER);
31-
$request->overwrite('REQUEST_URI', '/app.php', \phpbb\request\request_interface::SERVER);
29+
$request->overwrite('SCRIPT_NAME', '/index.php', \phpbb\request\request_interface::SERVER);
30+
$request->overwrite('SCRIPT_FILENAME', 'index.php', \phpbb\request\request_interface::SERVER);
31+
$request->overwrite('REQUEST_URI', '/index.php', \phpbb\request\request_interface::SERVER);
3232

3333
$user = new \phpbb_mock_user();
3434
$user->optionset('viewcensors', false);

tests/event/listener_test.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,26 +326,26 @@ public static function viewonline_page_data()
326326
'$location_url',
327327
'$location',
328328
),
329-
// test when on_page is app and session_page is NOT for boardrules
329+
// test when on_page is index and session_page is NOT for boardrules
330330
array(
331331
array(
332-
1 => 'app',
332+
1 => 'index',
333333
),
334334
array(
335-
'session_page' => 'app.' . $phpEx . '/foobar'
335+
'session_page' => 'index.' . $phpEx . '/foobar'
336336
),
337337
'$location_url',
338338
'$location',
339339
'$location_url',
340340
'$location',
341341
),
342-
// test when on_page is app and session_page is for boardrules
342+
// test when on_page is index and session_page is for boardrules
343343
array(
344344
array(
345-
1 => 'app',
345+
1 => 'index',
346346
),
347347
array(
348-
'session_page' => 'app.' . $phpEx . '/rules'
348+
'session_page' => 'index.' . $phpEx . '/rules'
349349
),
350350
'$location_url',
351351
'$location',

tests/functional/boardrules_controller_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class boardrules_controller_test extends boardrules_functional_base
2020
*/
2121
public function test_boardrules_page()
2222
{
23-
$crawler = self::request('GET', 'app.php/rules');
23+
$crawler = self::request('GET', 'index.php/rules');
2424
$this->assertContainsLang('BOARDRULES_HEADER', $crawler->filter('h2')->text());
2525

2626
self::assertEquals(1, $crawler->filter('#example-category')->count());

tests/functional/viewonline_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function test_viewonline_visit_rules()
2222
{
2323
// Send the admin to the Rules page
2424
$this->login();
25-
$crawler = self::request('GET', "app.php/rules?sid={$this->sid}");
25+
$crawler = self::request('GET', "index.php/rules?sid={$this->sid}");
2626
$this->assertContainsLang('BOARDRULES_HEADER', $crawler->filter('h2')->text());
2727
}
2828

0 commit comments

Comments
 (0)