File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ services:
2727 - %phpbbde.pastebin.geshi%
2828 - %phpbbde.pastebin.geshilangs%
2929 - %tables.phpbbde.pastebin.pastebin%
30- phpbbde.pastebin.header_listener :
31- class : phpbbde\pastebin\event\header_events
30+ phpbbde.pastebin.base_listener :
31+ class : phpbbde\pastebin\event\base_events
3232 arguments :
3333 - @auth
3434 - @template
Original file line number Diff line number Diff line change 1717/**
1818 * Event listener
1919 */
20- class header_events implements EventSubscriberInterface
20+ class base_events implements EventSubscriberInterface
2121{
2222 static public function getSubscribedEvents ()
2323 {
2424 return array (
2525 'core.page_header_after ' => 'page_header_after ' ,
26+ 'core.viewonline_overwrite_location ' => 'viewonline_page ' ,
2627 );
2728 }
2829
@@ -55,4 +56,16 @@ public function page_header_after($event)
5556 'U_PASTEBIN ' => $ this ->helper ->route ('phpbbde_pastebin_main_controller ' ),
5657 ));
5758 }
59+
60+ public function viewonline_page ($ event )
61+ {
62+ if ($ event ['on_page ' ][1 ] == 'app ' )
63+ {
64+ if (strrpos ($ event ['row ' ]['session_page ' ], 'app. ' . $ this ->php_ext . '/rules ' ) === 0 )
65+ {
66+ $ event ['location ' ] = $ this ->user ->lang ('PASTEBIN_VIEWONLINE ' );
67+ $ event ['location_url ' ] = $ this ->helper ->route ('phpbbde_pastebin_main_controller ' );
68+ }
69+ }
70+ }
5871}
Original file line number Diff line number Diff line change 2626$ lang = array_merge ($ lang , array (
2727 // Globally used language variables (e.g. for the header)
2828 'PASTEBIN ' => 'Pastebin ' ,
29+ 'PASTEBIN_VIEWONLINE ' => 'Im Pastebin ' ,
2930));
Original file line number Diff line number Diff line change 2626$ lang = array_merge ($ lang , array (
2727 // Globally used language variables (e.g. for the header)
2828 'PASTEBIN ' => 'Pastebin ' ,
29+ 'PASTEBIN_VIEWONLINE ' => 'In pastebin ' ,
2930));
You can’t perform that action at this time.
0 commit comments