r50126 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50125‎ | r50126 | r50127 >
Date:13:35, 2 May 2009
Author:catrope
Status:ok (Comments)
Tags:
Comment:
API: Add PHP and database version to meta=siteinfo output
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQuerySiteinfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php
@@ -108,6 +108,10 @@
109109 $data['base'] = $mainPage->getFullUrl();
110110 $data['sitename'] = $GLOBALS['wgSitename'];
111111 $data['generator'] = "MediaWiki {$GLOBALS['wgVersion']}";
 112+ $data['phpversion'] = phpversion();
 113+ $data['phpsapi'] = php_sapi_name();
 114+ $data['dbclass'] = get_class($this->getDB());
 115+ $data['dbversion'] = $this->getDB()->getServerVersion();
112116
113117 $svn = SpecialVersion::getSvnRevision( $GLOBALS['IP'] );
114118 if( $svn )
Index: trunk/phase3/RELEASE-NOTES
@@ -126,6 +126,7 @@
127127 * (bug 18597) Internal error with empty generator= parameter
128128 * (bug 16422) Don't display help for format=jsonfm unless specifically requested
129129 * (bug 18617) Add xml:space="preserve" attribute to relevant tags in XML output
 130+* Added PHP and database version to meta=siteinfo output
130131
131132 === Languages updated in 1.16 ===
132133

Follow-up revisions

RevisionCommit summaryAuthorDate
r50161Fix up r50126: dump $wgDBtype rather than a class name, per CR commentcatrope07:00, 4 May 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   22:59, 3 May 2009

Dumping the class name for the database type doesn't strike me as ideal; that's an internal implementation detail and could change without the backend database changing in any way. I'd probably recommend using $wgDBtype here rather than a raw class name.

#Comment by Catrope (talk | contribs)   07:01, 4 May 2009

Done in r50161

#Comment by Brion VIBBER (talk | contribs)   22:34, 5 May 2009

Thanks!

Status & tagging log