r52792 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52791‎ | r52792 | r52793 >
Date:12:08, 6 July 2009
Author:shinjiman
Status:reverted
Tags:
Comment:
* (bug 14611) Added support showing the version of the web server which it is currently using.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -104,11 +104,47 @@
105105 global $wgAllowTitlesInSVG, $wgSVGConverter, $wgSVGConverters, $wgSVGConverterPath;
106106 $dbr = wfGetDB( DB_SLAVE );
107107
 108+ // Get the web server name and its version, if applicable
 109+ // Chop off PHP text from the string if it has the text desired
 110+ $serverSoftware = $_SERVER['SERVER_SOFTWARE'];
 111+ if ( strrpos( $serverSoftware, 'PHP' ) === false ) {
 112+ } else {
 113+ $serverSoftware = trim( substr( $serverSoftware, 0, strrpos($serverSoftware,'PHP') - 1 ) );
 114+ }
 115+
 116+ // Get the web server name and its version.
 117+ $serverSoftwareLine = explode('/',$serverSoftware);
 118+ $serverSoftwareName = $serverSoftwareLine[0];
 119+
 120+ // Insert the website of the web server if applicable.
 121+ if ( stristr( $serverSoftwareName, 'Apache' ) )
 122+ $serverSoftwareURL = 'http://httpd.apache.org/';
 123+ else if ( stristr( $serverSoftwareName, 'IIS' ) )
 124+ $serverSoftwareURL = 'http://www.microsoft.com/iis/';
 125+ else if ( stristr( $serverSoftwareName, 'Cherokee' ) )
 126+ $serverSoftwareURL = 'http://www.cherokee-project.com/';
 127+ else if ( stristr( $serverSoftwareName, 'lighttpd' ) )
 128+ $serverSoftwareURL = 'http://www.lighttpd.net/';
 129+ else if ( stristr( $serverSoftwareName, 'Sun' ) )
 130+ $serverSoftwareURL = 'http://www.sun.com/software/products/web_srvr/';
 131+
 132+ // Get the version of the web server. If does not have one,
 133+ // leave it as empty.
 134+ if ( $serverSoftwareLine[1] != '' ) {
 135+ $serverSoftwareVersion = $serverSoftwareLine[1];
 136+ } else {
 137+ $serverSoftwareVersion = '';
 138+ }
 139+
108140 // Put the software in an array of form 'name' => 'version'. All messages should
109141 // be loaded here, so feel free to use wfMsg*() in the 'name'. Raw HTML or wikimarkup
110142 // can be used
111143 $software = array();
112144 $software['[http://www.mediawiki.org/ MediaWiki]'] = self::getVersionLinked();
 145+ if ( isset( $serverSoftwareURL ) )
 146+ $software["[$serverSoftwareURL $serverSoftwareName]"] = $serverSoftwareVersion;
 147+ else
 148+ $software[$serverSoftwareName] = $serverSoftwareVersion;
113149 $software['[http://www.php.net/ PHP]'] = phpversion() . " (" . php_sapi_name() . ")";
114150 $software[$dbr->getSoftwareLink()] = $dbr->getServerVersion();
115151
Index: trunk/phase3/RELEASE-NOTES
@@ -102,8 +102,8 @@
103103 stripped from them.
104104 * Added a PHP port of CDB (constant database), for improved local caching when
105105 the DBA extension is not available.
106 -* (bug 14611) Added support showing the version of the image thumbnailing
107 - engine, diff/diff3 engine and TeX engine.
 106+* (bug 14611) Added support showing the version of the web server, image
 107+ thumbnailing engine, diff/diff3 engine and TeX engine.
108108 * Introduced a new system for localisation caching. The system is based around
109109 fast fetches of individual messages, minimising memory overhead and startup
110110 time in the typical case. The database backend will be used by default, but

Follow-up revisions

RevisionCommit summaryAuthorDate
r53398* (bug 14611) Add a global variable hook to show the extended software inform...shinjiman14:49, 17 July 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r52476* (bug 14611) Added support showing the version of the image thumbnailing eng...shinjiman21:58, 26 June 2009
r52486* (bug 14611) Added support showing the version of the diff/diff3 engine.shinjiman10:40, 27 June 2009
r52516* (bug 14611) Added support showing the version of the SVG image thumbnailing...shinjiman16:25, 28 June 2009
r52525* (bug 14611) Added support showing the version of the Math rendering engine.shinjiman18:42, 28 June 2009

Status & tagging log