Index: branches/chad-pre-wmf-merge/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -57,12 +57,11 @@ |
58 | 58 | # Get JS/CSS file locations |
59 | 59 | $encCssFile = htmlspecialchars( "$stylePath/flaggedrevs.css?$wgFlaggedRevStyleVersion" ); |
60 | 60 | $encJsFile = htmlspecialchars( "$stylePath/flaggedrevs.js?$wgFlaggedRevStyleVersion" ); |
61 | | - $encJQueryFile = "jquery.js"; |
62 | 61 | # Add CSS file |
63 | 62 | $linkedStyle = Html::linkedStyle( $encCssFile ); |
64 | 63 | $wgOut->addHeadItem( 'FlaggedRevs', $linkedStyle ); |
65 | 64 | # Add main JS file |
66 | | - $wgOut->addScriptFile( $encJQueryFile ); |
| 65 | + $wgOut->includeJQuery(); |
67 | 66 | $wgOut->addScriptFile( $encJsFile ); |
68 | 67 | # Add review form JS for reviewers |
69 | 68 | if ( $wgUser->isAllowed( 'review' ) ) { |
— | — | @@ -112,7 +111,6 @@ |
113 | 112 | } |
114 | 113 | $globalVars['wgStableRevisionId'] = $stableId; |
115 | 114 | $globalVars['wgLatestRevisionId'] = $fa->getLatest(); |
116 | | - //$globalVars['wgPageId'] = $fa->getID(); |
117 | 115 | $revisionContents = (object) array( |
118 | 116 | 'error' => wfMsgHtml( 'revcontents-error' ), |
119 | 117 | 'waiting' => wfMsgHtml( 'revcontents-waiting' ) |
Index: branches/chad-pre-wmf-merge/extensions/FlaggedRevs/client/flaggedrevs.js |
— | — | @@ -188,12 +188,18 @@ |
189 | 189 | var prevLink = document.getElementById("differences-prevlink"); |
190 | 190 | var nextLink = document.getElementById("differences-nextlink"); |
191 | 191 | var timeoutId = null; |
192 | | - if( contentsDiv ) { |
| 192 | + if( contentsDiv ) { |
193 | 193 | var diffUIParams = document.getElementById("mw-fr-diff-dataform"); |
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&oldid=' + oldRevId; |
| 197 | + var requestArgs = 'action=parse&prop=text&format=xml'; |
| 198 | + if ( window.wgLatestRevisionId == oldRevId && window.wgPageName ) { |
| 199 | + requestArgs += '&page=' + window.wgPageName; |
| 200 | + } else { |
| 201 | + requestArgs += '&oldid=' + oldRevId; |
| 202 | + } |
| 203 | + |
198 | 204 | var call = jQuery.ajax({ |
199 | 205 | url : wgScriptPath + '/api.php', |
200 | 206 | type : "GET", |
Property changes on: branches/chad-pre-wmf-merge/extensions/FlaggedRevs |
___________________________________________________________________ |
Modified: svn:mergeinfo |
201 | 207 | Merged /trunk/extensions/FlaggedRevs:r76604 |