r12280 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12279‎ | r12280 | r12281 >
Date:02:59, 29 December 2005
Author:robchurch
Status:old
Tags:
Comment:
* Fix phpdoc headers
* Add failsafe in case SERVER_SOFTWARE isn't set
Modified paths:
  • /trunk/phase3/includes/SpecialVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialVersion.php
@@ -5,8 +5,8 @@
66 * @package MediaWiki
77 * @subpackage SpecialPage
88 *
9 - * @authors Ævar Arnfjörð Bjarmason <avarab@gmail.com>, Rob Church <robchur@gmail.com>
10 - * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason, Rob Church
 9+ * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
 10+ * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
1111 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1212 */
1313
@@ -84,7 +84,7 @@
8585
8686 * [http://www.mediawiki.org/ MediaWiki]: $wgVersion
8787 * [http://www.php.net/ PHP]: " . phpversion() . " (" . php_sapi_name() . ")
88 - * " . $this->getServerSoftware() . "
 88+ " . $this->getServerSoftware() . "
8989 * " . $dbr->getSoftwareLink() . ": " . $dbr->getServerVersion() . "
9090 </div>";
9191
@@ -93,8 +93,13 @@
9494
9595 function getServerSoftware() {
9696 # Return tweaked version of $_SERVER['SERVER_SOFTWARE']
97 - $osver = explode( ' ', $_SERVER['SERVER_SOFTWARE'] );
98 - return( count( $osver ) > 1 ? $osver[0] . ' ' . $osver[1] : $osver[0] );
 97+ if( isset( $_SERVER['SERVER_SOFTWARE'] ) ) {
 98+ $osver = explode( ' ', $_SERVER['SERVER_SOFTWARE'] );
 99+ $ssoft = "* " . ( count( $osver ) > 1 ? " * " . $osver[0] . ' ' . $osver[1] : $osver[0] );
 100+ } else {
 101+ $ssoft = "";
 102+ }
 103+ return( $ssoft );
99104 }
100105
101106 function extensionCredits() {

Status & tagging log