r26444 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26443‎ | r26444 | r26445 >
Date:02:30, 6 October 2007
Author:amidaniel
Status:old
Tags:
Comment:
API: Include, if possible, svn rev in siteinfo query result.
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
@@ -68,7 +68,7 @@
6969 }
7070
7171 protected function appendGeneralInfo($property) {
72 - global $wgSitename, $wgVersion, $wgCapitalLinks, $wgRightsCode, $wgRightsText, $wgLanguageCode;
 72+ global $wgSitename, $wgVersion, $wgCapitalLinks, $wgRightsCode, $wgRightsText, $wgLanguageCode, $IP;
7373
7474 $data = array ();
7575 $mainPage = Title :: newFromText(wfMsgForContent('mainpage'));
@@ -76,6 +76,10 @@
7777 $data['base'] = $mainPage->getFullUrl();
7878 $data['sitename'] = $wgSitename;
7979 $data['generator'] = "MediaWiki $wgVersion";
 80+
 81+ $svn = SpecialVersion::getSvnRevision ( $IP );
 82+ if ( $svn ) $data['rev'] = $svn;
 83+
8084 $data['case'] = $wgCapitalLinks ? 'first-letter' : 'case-sensitive'; // 'case-insensitive' option is reserved for future
8185 if (isset($wgRightsCode))
8286 $data['rightscode'] = $wgRightsCode;
@@ -231,4 +235,4 @@
232236 public function getVersion() {
233237 return __CLASS__ . ': $Id$';
234238 }
235 -}
\ No newline at end of file
 239+}
Index: trunk/phase3/RELEASE-NOTES
@@ -105,6 +105,7 @@
106106 * (bug 11404) Provide name of exception caught in error code field of internal api
107107 error messages.
108108 * (bug 11534) rvendid doesn't work
 109+* Include svn revision number (if install is checked-out from svn) in siteinfo query.
109110
110111 === Languages updated in 1.12 ===
111112

Follow-up revisions

RevisionCommit summaryAuthorDate
r26448Merged revisions 26431-26447 via svnmerge from...david05:36, 6 October 2007

Status & tagging log