Index: trunk/extensions/UserDebugInfo/SpecialUserDebugInfo.php |
— | — | @@ -11,22 +11,23 @@ |
12 | 12 | |
13 | 13 | public function execute( $subpage ) { |
14 | 14 | $this->setHeaders(); |
15 | | - global $wgOut; |
16 | | - $wgOut->addHTML( Xml::openElement( 'table', array( 'class' => 'wikitable' ) ) ); |
17 | 15 | |
18 | | - $wgOut->addHTML( '<thead>' ); |
19 | | - $wgOut->addHTML( '<tr>' ); |
20 | | - $wgOut->addHTML( '<th>' ); |
21 | | - $wgOut->addWikiMsg( 'userdebuginfo-key' ); |
22 | | - $wgOut->addHTML( '</th>' ); |
23 | | - $wgOut->addHTML( '<th>' ); |
24 | | - $wgOut->addWikiMsg( 'userdebuginfo-value' ); |
25 | | - $wgOut->addHTML( '</th>' ); |
26 | | - $wgOut->addHTML( '</tr>' ); |
27 | | - $wgOut->addHTML( '</thead>' ); |
| 16 | + $out = $this->getOutput(); |
| 17 | + $out->addHTML( Xml::openElement( 'table', array( 'class' => 'wikitable' ) ) ); |
28 | 18 | |
29 | | - $wgOut->addHTML( '<tbody>' ); |
| 19 | + $out->addHTML( '<thead>' ); |
| 20 | + $out->addHTML( '<tr>' ); |
| 21 | + $out->addHTML( '<th>' ); |
| 22 | + $out->addWikiMsg( 'userdebuginfo-key' ); |
| 23 | + $out->addHTML( '</th>' ); |
| 24 | + $out->addHTML( '<th>' ); |
| 25 | + $out->addWikiMsg( 'userdebuginfo-value' ); |
| 26 | + $out->addHTML( '</th>' ); |
| 27 | + $out->addHTML( '</tr>' ); |
| 28 | + $out->addHTML( '</thead>' ); |
30 | 29 | |
| 30 | + $out->addHTML( '<tbody>' ); |
| 31 | + |
31 | 32 | $this->printRow( 'userdebuginfo-useragent', htmlspecialchars( $_SERVER['HTTP_USER_AGENT'] ) ); |
32 | 33 | |
33 | 34 | if ( isset( $_SERVER['REMOTE_HOST'] ) ) { |
— | — | @@ -36,8 +37,8 @@ |
37 | 38 | $this->printRow( 'userdebuginfo-remoteaddr', wfGetIP() ); |
38 | 39 | $this->printRow( 'userdebuginfo-language', htmlspecialchars( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ); |
39 | 40 | |
40 | | - $wgOut->addHTML( '</tbody>' ); |
41 | | - $wgOut->addHTML( '</table>' ); |
| 41 | + $out->addHTML( '</tbody>' ); |
| 42 | + $out->addHTML( '</table>' ); |
42 | 43 | } |
43 | 44 | |
44 | 45 | /** |
— | — | @@ -45,17 +46,17 @@ |
46 | 47 | * @param $value string Text to output |
47 | 48 | */ |
48 | 49 | private function printRow( $key, $value ) { |
49 | | - global $wgOut; |
50 | | - $wgOut->addHTML( '<tr>' ); |
51 | | - $wgOut->addHTML( '<td>' ); |
52 | | - $wgOut->addWikiMsg( $key ); |
53 | | - $wgOut->addHTML( '</td>' ); |
| 50 | + $out = $this->getOutput(); |
| 51 | + $out->addHTML( '<tr>' ); |
| 52 | + $out->addHTML( '<td>' ); |
| 53 | + $out->addWikiMsg( $key ); |
| 54 | + $out->addHTML( '</td>' ); |
54 | 55 | |
55 | | - $wgOut->addHTML( '<td>' ); |
56 | | - $wgOut->addHTML( $value ); |
57 | | - $wgOut->addHTML( '</td>' ); |
| 56 | + $out->addHTML( '<td>' ); |
| 57 | + $out->addHTML( $value ); |
| 58 | + $out->addHTML( '</td>' ); |
58 | 59 | |
59 | | - $wgOut->addHTML( '</tr>' ); |
| 60 | + $out->addHTML( '</tr>' ); |
60 | 61 | } |
61 | 62 | } |
62 | 63 | |