Index: trunk/extensions/UserDebugInfo/UserDebugInfo.alias.php |
— | — | @@ -0,0 +1,8 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +$specialPageAliases = array(); |
| 5 | + |
| 6 | +/** English (English) */ |
| 7 | +$specialPageAliases['en'] = array( |
| 8 | + 'UserDebugInfo' => array( 'UserDebugInfo', ), |
| 9 | +); |
\ No newline at end of file |
Property changes on: trunk/extensions/UserDebugInfo/UserDebugInfo.alias.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 10 | + native |
Index: trunk/extensions/UserDebugInfo/UserDebugInfo.i18n.php |
— | — | @@ -0,0 +1,24 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +$messages = array(); |
| 5 | + |
| 6 | +/** |
| 7 | + * @author Reedy |
| 8 | + */ |
| 9 | +$messages['en'] = array( |
| 10 | + 'userdebuginfo' => 'User Debugging Information', |
| 11 | + 'userdebuginfo-desc' => 'Displays some potentially useful debugging information about the current user', |
| 12 | + 'userdebuginfo-useragent' => 'HTTP user agent', |
| 13 | + 'userdebuginfo-remotehost' => 'HTTP remote host', |
| 14 | + 'userdebuginfo-remoteaddr' => 'HTTP remote address', |
| 15 | + 'userdebuginfo-key' => 'Key', |
| 16 | + 'userdebuginfo-value' => 'Value', |
| 17 | +); |
| 18 | + |
| 19 | +/** |
| 20 | + * Message documentation (Message documentation) |
| 21 | + * @author Reedy |
| 22 | + */ |
| 23 | +$messages['qqq'] = array( |
| 24 | + 'userdebuginfo-desc' => '{{desc}}', |
| 25 | +); |
\ No newline at end of file |
Property changes on: trunk/extensions/UserDebugInfo/UserDebugInfo.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 26 | + native |
Index: trunk/extensions/UserDebugInfo/UserDebugInfo.php |
— | — | @@ -0,0 +1,18 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +$wgExtensionCredits['specialpage'][] = array( |
| 5 | + 'path' => __FILE__, |
| 6 | + 'name' => 'UserDebugInfo', |
| 7 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:UserDebugInfo', |
| 8 | + 'author' => 'Sam Reed', |
| 9 | + 'descriptionmsg' => 'userdebuginfo-desc', |
| 10 | +); |
| 11 | + |
| 12 | +$dir = dirname( __FILE__ ) . '/'; |
| 13 | + |
| 14 | +$wgAutoloadClasses['SpecialUserDebugInfo'] = $dir . 'SpecialUserDebugInfo.php'; |
| 15 | +$wgSpecialPages['UserDebugInfo'] = 'SpecialUserDebugInfo'; |
| 16 | +$wgSpecialPageGroups['UserDebugInfo'] = 'other'; |
| 17 | + |
| 18 | +$wgExtensionMessagesFiles['UserDebugInfo'] = $dir . 'UserDebugInfo.i18n.php'; |
| 19 | +$wgExtensionAliasesFiles['UserDebugInfo'] = $dir . 'UserDebugInfo.alias.php'; |
\ No newline at end of file |
Property changes on: trunk/extensions/UserDebugInfo/UserDebugInfo.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 20 | + native |
Index: trunk/extensions/UserDebugInfo/SpecialUserDebugInfo.php |
— | — | @@ -0,0 +1,69 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * |
| 6 | + */ |
| 7 | +class SpecialUserDebugInfo extends SpecialPage { |
| 8 | + |
| 9 | + public function __construct() { |
| 10 | + parent::__construct( 'UserDebugInfo' ); |
| 11 | + } |
| 12 | + |
| 13 | + public function execute( $subpage ) { |
| 14 | + $this->setHeaders(); |
| 15 | + global $wgOut; |
| 16 | + $wgOut->addHTML( Xml::openElement( 'table', array( 'class' => 'TablePager' ) ) ); |
| 17 | + |
| 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>' ); |
| 28 | + |
| 29 | + $wgOut->addHTML( '<tbody>' ); |
| 30 | + |
| 31 | + $wgOut->addHTML( '<tr>' ); |
| 32 | + $wgOut->addHTML( '<td>' ); |
| 33 | + $wgOut->addWikiMsg( 'userdebuginfo-useragent' ); |
| 34 | + $wgOut->addHTML( '</td>' ); |
| 35 | + |
| 36 | + $wgOut->addHTML( '<td>' ); |
| 37 | + $wgOut->addHTML( $_SERVER['HTTP_USER_AGENT'] ); |
| 38 | + $wgOut->addHTML( '</td>' ); |
| 39 | + |
| 40 | + $wgOut->addHTML( '</tr>' ); |
| 41 | + |
| 42 | + if ( isset( $_SERVER['REMOTE_HOST'] ) ) { |
| 43 | + $wgOut->addHTML( '<tr>' ); |
| 44 | + $wgOut->addHTML( '<td>' ); |
| 45 | + $wgOut->addWikiMsg( 'userdebuginfo-remotehost' ); |
| 46 | + $wgOut->addHTML( '</td>' ); |
| 47 | + |
| 48 | + $wgOut->addHTML( '<td>' ); |
| 49 | + $wgOut->addHTML( $_SERVER['REMOTE_HOST'] ); |
| 50 | + $wgOut->addHTML( '</td>' ); |
| 51 | + |
| 52 | + $wgOut->addHTML( '</tr>' ); |
| 53 | + } |
| 54 | + |
| 55 | + $wgOut->addHTML( '<tr>' ); |
| 56 | + $wgOut->addHTML( '<td>' ); |
| 57 | + $wgOut->addWikiMsg( 'userdebuginfo-remoteaddr' ); |
| 58 | + $wgOut->addHTML( '</td>' ); |
| 59 | + |
| 60 | + $wgOut->addHTML( '<td>' ); |
| 61 | + $wgOut->addHTML( $_SERVER['REMOTE_ADDR'] ); |
| 62 | + $wgOut->addHTML( '</td>' ); |
| 63 | + |
| 64 | + $wgOut->addHTML( '</tr>' ); |
| 65 | + |
| 66 | + $wgOut->addHTML( '</tbody>' ); |
| 67 | + $wgOut->addHTML( '</table>' ); |
| 68 | + } |
| 69 | +} |
| 70 | + |
Property changes on: trunk/extensions/UserDebugInfo/SpecialUserDebugInfo.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 71 | + native |