r99959 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99958‎ | r99959 | r99960 >
Date:17:50, 16 October 2011
Author:dasch
Status:deferred (Comments)
Tags:
Comment:
fixes I though already were in r99957 and added output of PHP Extensions
Modified paths:
  • /trunk/extensions/Diagnosis/Diagnosis.php (modified) (history)
  • /trunk/extensions/Diagnosis/SpecialDiagnosis.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Diagnosis/Diagnosis.php
@@ -3,7 +3,7 @@
44 if (!defined('MEDIAWIKI')) {
55 echo <<<EOT
66 To install my extension, put the following line in LocalSettings.php:
7 -require_once( "\$IP/extensions/Diagnostics/Diagnostics.php" );
 7+require_once( "\$IP/extensions/Diagnosis/Diagnosis.php" );
88 EOT;
99 exit( 1 );
1010 }
@@ -12,7 +12,7 @@
1313 'path' => __FILE__,
1414 'name' => 'Diagnosis',
1515 'author' => '[http://www.dasch-tour.de DaSch]',
16 - 'url' => 'http://www.mediawiki.org/wiki/Extension:Diagnostics',
 16+ 'url' => 'http://www.mediawiki.org/wiki/Extension:Diagnosis',
1717 'descriptionmsg' => 'diagnosis-desc',
1818 'version' => '0.0.1',
1919 );
Index: trunk/extensions/Diagnosis/SpecialDiagnosis.php
@@ -1,8 +1,8 @@
22 <?php
3 -class SpecialDiagnostics extends SpecialPage {
 3+class SpecialDiagnosis extends SpecialPage {
44 function __construct() {
5 - parent::__construct( 'Diagnostics', 'diagnostics-access' );
6 - wfLoadExtensionMessages('Diagnostics');
 5+ parent::__construct( 'Diagnosis', 'diagnosis-access' );
 6+ wfLoadExtensionMessages('Diagnosis');
77 }
88
99 function execute( $par ) {
@@ -24,7 +24,7 @@
2525 $sdSystemLocale = explode(" ",shell_exec('locale -a'));
2626 $wgOut->addHTML( '<td>' );
2727 foreach ($sdSystemLocale as $value) {
28 - $wgOut->addHTML($value . '<br\>');
 28+ $wgOut->addHTML($value . '<br/>');
2929 }
3030 $wgOut->addHTML('</td>' );
3131 $wgOut->addHTML( '<td>' . $wgShellLocale . '</td>' );
@@ -67,6 +67,26 @@
6868 }
6969 $wgOut->addHTML( '<td>' . $sdSVGPathStatus . '</td>' );
7070 $wgOut->addHTML( '</tr>' );
 71+ ### PHP Extensions ###
 72+ $wgOut->addHTML( '<tr>' );
 73+ $wgOut->addHTML( '<td>PHP Extensions</td>' );
 74+ $sdPHPExtensions = get_loaded_extensions();
 75+ $wgOut->addHTML( '<td colspan=2>' );
 76+ foreach ($sdPHPExtensions as $value) {
 77+ $wgOut->addHTML($value . '<br/>');
 78+ }
 79+ $wgOut->addHTML('</td>' );
 80+ $wgOut->addHTML( '<td> Loaded PHP Extensions </td>' );
 81+ if ( true ) {
 82+ $sdSVGPathStatus='OK';
 83+ }
 84+ else {
 85+ $sdSVGPathStatus='ERROR';
 86+ }
 87+ $wgOut->addHTML( '<td>' . $sdSVGPathStatus . '</td>' );
 88+ $wgOut->addHTML( '</tr>' );
 89+
 90+
7191 ### End Table ###
7292 $wgOut->addHTML( '</table>' );
7393 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99957Extension for checking the enviroment to find possible problems...dasch17:30, 16 October 2011

Comments

#Comment by Siebrand (talk | contribs)   21:18, 16 October 2011

wfLoadExtensionMessages() is obsolete.

#Comment by DaSch (talk | contribs)   22:41, 16 October 2011

how does it work instead? I've taken this from here Manual:Special_pages#The_Special_Page_File

#Comment by Reach Out to the Truth (talk | contribs)   02:59, 17 October 2011

It also says it's not needed any more. It actually does nothing in recent versions. There's no replacement, so just remove it. So how does it work now? Good question. Magic? However it works, wfLoadExtensionMessages is no longer part of it.

Status & tagging log