Index: branches/priyanka-wmf-fixes/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -255,7 +255,7 @@ |
256 | 256 | $wgAvailableRights[] = 'stablesettings'; |
257 | 257 | |
258 | 258 | # Bump this number every time you change flaggedrevs.css/flaggedrevs.js |
259 | | -$wgFlaggedRevStyleVersion = 81; |
| 259 | +$wgFlaggedRevStyleVersion = 82; |
260 | 260 | |
261 | 261 | $wgExtensionFunctions[] = 'efLoadFlaggedRevs'; |
262 | 262 | |
Index: branches/priyanka-wmf-fixes/extensions/FlaggedRevs/client/flaggedrevs.js |
— | — | @@ -193,7 +193,7 @@ |
194 | 194 | var oldRevId = diffUIParams.getElementsByTagName('input')[1].value; |
195 | 195 | var origContents = contentsDiv.innerHTML; |
196 | 196 | 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'; |
198 | 198 | if ( window.wgCurRevisionId == oldRevId && window.wgPageName ) { |
199 | 199 | requestArgs += '&page=' + encodeURIComponent( window.wgPageName ); |
200 | 200 | } else { |
— | — | @@ -206,12 +206,22 @@ |
207 | 207 | data : requestArgs, |
208 | 208 | dataType: "xml", |
209 | 209 | success : function( result ) { |
| 210 | + contentsDiv.innerHTML = ""; |
210 | 211 | contents = jQuery(result).find("text"); |
211 | 212 | if ( contents && contents.text() ) { |
212 | | - contentsDiv.innerHTML = contents.text(); |
| 213 | + contentsDiv.innerHTML += contents.text(); |
213 | 214 | } else { |
214 | 215 | contentsDiv.innerHTML = wgRevContents.error + " " + origContents; |
215 | 216 | } |
| 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 | + |
216 | 226 | }, |
217 | 227 | error : function(xmlHttpRequest, textStatus, errThrown) { |
218 | 228 | contentsDiv.innerHTML = wgRevContents.error + " " + origContents; |
— | — | @@ -240,5 +250,4 @@ |
241 | 251 | FlaggedRevs.getRevisionContents(); |
242 | 252 | } |
243 | 253 | |
244 | | -//TODO figure out the correct way to do this |
245 | 254 | window.onload = FlaggedRevs.setJSTriggers; |