r77944 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77943‎ | r77944 | r77945 >
Date:01:21, 7 December 2010
Author:pdhanda
Status:ok
Tags:
Comment:
Merged r77897 and r77930 from trunk - Part of fix/workaround to bug 26163 ...
Modified paths:
  • /branches/priyanka-wmf-fixes/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)
  • /branches/priyanka-wmf-fixes/extensions/FlaggedRevs/client/flaggedrevs.js (modified) (history)

Diff [purge]

Index: branches/priyanka-wmf-fixes/extensions/FlaggedRevs/FlaggedRevs.php
@@ -255,7 +255,7 @@
256256 $wgAvailableRights[] = 'stablesettings';
257257
258258 # Bump this number every time you change flaggedrevs.css/flaggedrevs.js
259 -$wgFlaggedRevStyleVersion = 81;
 259+$wgFlaggedRevStyleVersion = 82;
260260
261261 $wgExtensionFunctions[] = 'efLoadFlaggedRevs';
262262
Index: branches/priyanka-wmf-fixes/extensions/FlaggedRevs/client/flaggedrevs.js
@@ -193,7 +193,7 @@
194194 var oldRevId = diffUIParams.getElementsByTagName('input')[1].value;
195195 var origContents = contentsDiv.innerHTML;
196196 contentsDiv.innerHTML = "<span class='loading mw-small-spinner spinner'></span><span class='loading' >" + wgRevContents.waiting + "</span>";
197 - var requestArgs = 'action=parse&prop=text&format=xml';
 197+ var requestArgs = 'action=parse&prop=text|categorieshtml|languageshtml&format=xml';
198198 if ( window.wgCurRevisionId == oldRevId && window.wgPageName ) {
199199 requestArgs += '&page=' + encodeURIComponent( window.wgPageName );
200200 } else {
@@ -206,12 +206,22 @@
207207 data : requestArgs,
208208 dataType: "xml",
209209 success : function( result ) {
 210+ contentsDiv.innerHTML = "";
210211 contents = jQuery(result).find("text");
211212 if ( contents && contents.text() ) {
212 - contentsDiv.innerHTML = contents.text();
 213+ contentsDiv.innerHTML += contents.text();
213214 } else {
214215 contentsDiv.innerHTML = wgRevContents.error + " " + origContents;
215216 }
 217+ categoryhtml = jQuery(result).find("categorieshtml");
 218+ if ( categoryhtml && categoryhtml.text() ) {
 219+ contentsDiv.innerHTML += categoryhtml.text();
 220+ }
 221+ languageshtml = jQuery(result).find("languageshtml");
 222+ if ( languageshtml && languageshtml.text() ) {
 223+ contentsDiv.innerHTML += languageshtml.text();
 224+ }
 225+
216226 },
217227 error : function(xmlHttpRequest, textStatus, errThrown) {
218228 contentsDiv.innerHTML = wgRevContents.error + " " + origContents;
@@ -240,5 +250,4 @@
241251 FlaggedRevs.getRevisionContents();
242252 }
243253
244 -//TODO figure out the correct way to do this
245254 window.onload = FlaggedRevs.setJSTriggers;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77516Fixes bug 26163 - Missing categories and iw links on diff pages.pdhanda00:12, 1 December 2010
r77896Part of fix/workaround to bug 26163. API calls to get language links and cat...pdhanda18:31, 6 December 2010
r77897Part of fix/workaround to bug 26163. Get the categories and languagelinks as...pdhanda19:47, 6 December 2010
r77930Follow up to r77897. Incrementing version numnerpdhanda23:19, 6 December 2010
r77943Merged r7789 from trunk - Part of fix/workaround to bug 26163. API calls to g...pdhanda01:17, 7 December 2010

Status & tagging log