r76605 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76604‎ | r76605 | r76606 >
Date:23:58, 12 November 2010
Author:demon
Status:ok
Tags:
Comment:
MFT r76604
Modified paths:
  • /branches/chad-pre-wmf-merge/extensions/FlaggedRevs (modified) (history)
  • /branches/chad-pre-wmf-merge/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)
  • /branches/chad-pre-wmf-merge/extensions/FlaggedRevs/client/flaggedrevs.js (modified) (history)

Diff [purge]

Index: branches/chad-pre-wmf-merge/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -57,12 +57,11 @@
5858 # Get JS/CSS file locations
5959 $encCssFile = htmlspecialchars( "$stylePath/flaggedrevs.css?$wgFlaggedRevStyleVersion" );
6060 $encJsFile = htmlspecialchars( "$stylePath/flaggedrevs.js?$wgFlaggedRevStyleVersion" );
61 - $encJQueryFile = "jquery.js";
6261 # Add CSS file
6362 $linkedStyle = Html::linkedStyle( $encCssFile );
6463 $wgOut->addHeadItem( 'FlaggedRevs', $linkedStyle );
6564 # Add main JS file
66 - $wgOut->addScriptFile( $encJQueryFile );
 65+ $wgOut->includeJQuery();
6766 $wgOut->addScriptFile( $encJsFile );
6867 # Add review form JS for reviewers
6968 if ( $wgUser->isAllowed( 'review' ) ) {
@@ -112,7 +111,6 @@
113112 }
114113 $globalVars['wgStableRevisionId'] = $stableId;
115114 $globalVars['wgLatestRevisionId'] = $fa->getLatest();
116 - //$globalVars['wgPageId'] = $fa->getID();
117115 $revisionContents = (object) array(
118116 'error' => wfMsgHtml( 'revcontents-error' ),
119117 'waiting' => wfMsgHtml( 'revcontents-waiting' )
Index: branches/chad-pre-wmf-merge/extensions/FlaggedRevs/client/flaggedrevs.js
@@ -188,12 +188,18 @@
189189 var prevLink = document.getElementById("differences-prevlink");
190190 var nextLink = document.getElementById("differences-nextlink");
191191 var timeoutId = null;
192 - if( contentsDiv ) {
 192+ if( contentsDiv ) {
193193 var diffUIParams = document.getElementById("mw-fr-diff-dataform");
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&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+
198204 var call = jQuery.ajax({
199205 url : wgScriptPath + '/api.php',
200206 type : "GET",
Property changes on: branches/chad-pre-wmf-merge/extensions/FlaggedRevs
___________________________________________________________________
Modified: svn:mergeinfo
201207 Merged /trunk/extensions/FlaggedRevs:r76604

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76604Followup to r76599. Change how jQuery is included. API call now uses page ins...pdhanda23:31, 12 November 2010

Status & tagging log