r100383 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100382‎ | r100383 | r100384 >
Date:21:36, 20 October 2011
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_18/extensions (modified) (history)
  • /branches/REL1_18/extensions/AbuseFilter/AbuseFilter.parser.php (modified) (history)
  • /branches/REL1_18/extensions/CategoryTree/CategoryTree.php (modified) (history)
  • /branches/REL1_18/extensions/Collection (modified) (history)
  • /branches/REL1_18/extensions/Collection/js/collection.js (modified) (history)
  • /branches/REL1_18/extensions/FlaggedRevs (modified) (history)
  • /branches/REL1_18/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)
  • /branches/REL1_18/extensions/FlaggedRevs/api/FlaggedRevsApi.hooks.php (modified) (history)
  • /branches/REL1_18/extensions/FlaggedRevs/dataclasses/FlaggedRevs.hooks.php (modified) (history)
  • /branches/REL1_18/extensions/FlaggedRevs/maintenance/fixBug28348.inc (modified) (history)
  • /branches/REL1_18/extensions/FlaggedRevs/presentation/FlaggedPageView.php (modified) (history)
  • /branches/REL1_18/extensions/FlaggedRevs/presentation/FlaggedRevsUI.hooks.php (modified) (history)
  • /branches/REL1_18/extensions/FlaggedRevs/presentation/RejectConfirmationFormUI.php (modified) (history)
  • /branches/REL1_18/extensions/FlaggedRevs/presentation/RevisionReviewFormUI.php (modified) (history)
  • /branches/REL1_18/extensions/FlaggedRevs/presentation/language/RevisionReview.i18n.php (modified) (history)
  • /branches/REL1_18/extensions/FlaggedRevs/presentation/modules/review.js (modified) (history)
  • /branches/REL1_18/extensions/FlaggedRevs/presentation/specialpages/reports/PendingChanges_body.php (modified) (history)
  • /branches/REL1_18/extensions/LiquidThreads (modified) (history)
  • /branches/REL1_18/extensions/LiquidThreads/jquery/jquery.thread_collapse.css (modified) (history)
  • /branches/REL1_18/extensions/OggHandler/OggHandler_body.php (modified) (history)
  • /branches/REL1_18/extensions/ProofreadPage/ProofreadPage_body.php (modified) (history)
  • /branches/REL1_18/extensions/WikiEditor (modified) (history)
  • /branches/REL1_18/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.config.js (modified) (history)

Diff [purge]

Index: branches/REL1_18/extensions/LiquidThreads/jquery/jquery.thread_collapse.css
@@ -10,5 +10,5 @@
1111 }
1212 .thread-collapse-control a.thread-control-collapsed {
1313 /* @embed */
14 - background: url(../images/thread_collapse_control_collapsed-ltr.gif) 0 0 no-repeat;
 14+ background: url(../images/thread_collapse_control_collapsed.gif) 0 0 no-repeat;
1515 }
Property changes on: branches/REL1_18/extensions/LiquidThreads
___________________________________________________________________
Modified: svn:mergeinfo
1616 Merged /trunk/extensions/LiquidThreads:r98773,98801,98960,98982,99059,99097,99164,99167
Index: branches/REL1_18/extensions/OggHandler/OggHandler_body.php
@@ -32,6 +32,9 @@
3333 }
3434 return true;
3535 }
 36+ if ( $name == 'noicon' ) {
 37+ return true;
 38+ }
3639 return false;
3740 }
3841
Property changes on: branches/REL1_18/extensions/OggHandler/OggHandler_body.php
___________________________________________________________________
Modified: svn:mergeinfo
3942 Merged /trunk/extensions/OggHandler/OggHandler_body.php:r99167
Index: branches/REL1_18/extensions/ProofreadPage/ProofreadPage_body.php
@@ -1021,7 +1021,7 @@
10221022 $text = '<noinclude><pagequality level="' . $editpage->quality . '" user="' . $editpage->username . '" />' .
10231023 '<div class="pagetext">' . $editpage->header."\n\n\n</noinclude>" .
10241024 $editpage->textbox1 .
1025 - "<noinclude>\n" . $editpage->footer . '</div></noinclude>';
 1025+ "\n<noinclude>" . $editpage->footer . '</div></noinclude>';
10261026 $editpage->textbox1 = $text;
10271027 } else {
10281028 // replace deprecated template
Index: branches/REL1_18/extensions/FlaggedRevs/FlaggedRevs.php
@@ -390,7 +390,10 @@
391391 'revreview-submitedit', 'revreview-submitedit-title',
392392 'revreview-submit-review', 'revreview-submit-unreview',
393393 'revreview-submit-reviewed', 'revreview-submit-unreviewed',
394 - 'revreview-submitting', 'actioncomplete', 'actionfailed'
 394+ 'revreview-submitting', 'actioncomplete', 'actionfailed',
 395+ 'revreview-adv-reviewing-p', 'revreview-adv-reviewing-c',
 396+ 'revreview-sadv-reviewing-p', 'revreview-sadv-reviewing-c',
 397+ 'revreview-adv-start-link', 'revreview-adv-stop-link'
395398 ),
396399 'dependencies' => array( 'mediawiki.util' ),
397400 'localBasePath' => $localModulePath,
@@ -500,9 +503,6 @@
501504 # Implicit autoreview rights group
502505 $wgHooks['AutopromoteCondition'][] = 'FlaggedRevsHooks::checkAutoPromoteCond';
503506
504 -# Check if a page is currently being reviewed
505 -$wgHooks['MediaWikiPerformAction'][] = 'FlaggedRevsUIHooks::onMediaWikiPerformAction';
506 -
507507 # Actually register special pages
508508 $wgHooks['SpecialPage_initList'][] = 'FlaggedRevsUIHooks::defineSpecialPages';
509509
Index: branches/REL1_18/extensions/FlaggedRevs/maintenance/fixBug28348.inc
@@ -45,8 +45,8 @@
4646 if ( $file ) {
4747 echo "fixed file {$row->fi_name} reference in rev ID {$row->fi_rev_id}\n";
4848 # Fix the fi_img_timestamp value...
49 - $dbw->update( 'flaggedimages',
50 - array( 'fi_img_timestamp' => $dbw->timestamp( $time ) ),
 49+ $db->update( 'flaggedimages',
 50+ array( 'fi_img_timestamp' => $db->timestamp( $time ) ),
5151 array( 'fi_rev_id' => $row->fi_rev_id, 'fi_name' => $row->fi_name ),
5252 __METHOD__
5353 );
Index: branches/REL1_18/extensions/FlaggedRevs/dataclasses/FlaggedRevs.hooks.php
@@ -192,8 +192,6 @@
193193 if ( $title->getNamespace() == NS_MEDIA ) {
194194 $title = Title::makeTitle( NS_FILE, $title->getDBkey() );
195195 $title->resetArticleId( $title->getArticleId() ); // avoid extra queries
196 - } else {
197 - $title =& $title;
198196 }
199197 $time = $sha1 = false; // current version
200198 # Check for the version of this file used when reviewed...
Index: branches/REL1_18/extensions/FlaggedRevs/api/FlaggedRevsApi.hooks.php
@@ -55,6 +55,7 @@
5656 ) );
5757 $module->addWhere( 'fr_user=user_id' );
5858
 59+ $where = array();
5960 // Construct WHERE-clause to avoid multiplying the number of scanned rows
6061 // as flaggedrevs table has composite primary key (fr_page_id,fr_rev_id)
6162 foreach ( $pageids as $pageid => $revids ) {
Index: branches/REL1_18/extensions/FlaggedRevs/presentation/FlaggedRevsUI.hooks.php
@@ -119,30 +119,6 @@
120120 return true;
121121 }
122122
123 - public static function onMediaWikiPerformAction(
124 - $output, $article, Title $title, $user, $request
125 - ) {
126 - $fa = FlaggedPage::getTitleInstance( $title );
127 - self::maybeMarkUnderReview( $fa, $request );
128 - return true;
129 - }
130 -
131 - // Mark when an unreviewed page is being reviewed
132 - protected static function maybeMarkUnderReview( FlaggedPage $fa, WebRequest $request ) {
133 - global $wgUser;
134 - if ( !$request->getInt( 'reviewing' ) && !$request->getInt( 'rcid' ) ) {
135 - return true; // not implied by URL
136 - }
137 - # Set a key to note when someone is reviewing this.
138 - # NOTE: diff-to-stable views already handled elsewhere.
139 - if ( $fa->isReviewable() && !$fa->getStable() // not reviewed yet
140 - && $fa->getTitle()->userCan( 'review' ) )
141 - {
142 - FRUserActivity::setUserReviewingPage( $wgUser, $fa->getID() );
143 - }
144 - return true;
145 - }
146 -
147123 /** Add user preferences */
148124 public static function onGetPreferences( $user, array &$preferences ) {
149125 // Box or bar UI
@@ -566,7 +542,7 @@
567543 {
568544 return true; // confirm that page is in reviewable namespace
569545 }
570 - $rlink = '';
 546+ $rlink = $css = '';
571547 // page is not reviewed
572548 if ( $rc->mAttribs['fp_stable'] == null ) {
573549 // Is this a config were pages start off reviewable?
Index: branches/REL1_18/extensions/FlaggedRevs/presentation/specialpages/reports/PendingChanges_body.php
@@ -24,6 +24,8 @@
2525 $this->watched = $wgRequest->getCheck( 'watched' );
2626 $this->stable = $wgRequest->getCheck( 'stable' );
2727 $feedType = $wgRequest->getVal( 'feed' );
 28+
 29+ $incLimit = 0;
2830 if ( $this->including() ) {
2931 $incLimit = $this->parseParams( $par ); // apply non-URL params
3032 }
Index: branches/REL1_18/extensions/FlaggedRevs/presentation/language/RevisionReview.i18n.php
@@ -53,6 +53,7 @@
5454 See the [[Special:Unreviewedpages|list of unreviewed pages]].',
5555 'revreview-stable1' => 'You may want to view [{{fullurl:$1|stableid=$2}} this flagged version] and see if it is now the [{{fullurl:$1|stable=1}} stable version] of this page.',
5656 'revreview-stable2' => 'You may want to view the [{{fullurl:$1|stable=1}} stable version] of this page.',
 57+ 'revreview-cancel' => 'Cancel',
5758 'revreview-submit' => 'Submit',
5859 'revreview-submitting' => 'Submitting...',
5960 'revreview-submit-review' => 'Accept revision',
@@ -64,8 +65,14 @@
6566 'revreview-successful2' => '\'\'\'Revision of [[:$1|$1]] successfully unflagged.\'\'\'',
6667 'revreview-poss-conflict-p' => '\'\'\'Warning: [[User:$1|$1]] started reviewing this page on $2 at $3.\'\'\'',
6768 'revreview-poss-conflict-c' => '\'\'\'Warning: [[User:$1|$1]] started reviewing these changes on $2 at $3.\'\'\'',
68 - 'revreview-adv-reviewing-p' => '\'\'\'Notice: You are being advertised as having started reviewing this page on $1 at $2.\'\'\'',
69 - 'revreview-adv-reviewing-c' => '\'\'\'Notice: You are being advertised as having started reviewing these changes on $1 at $2.\'\'\'',
 69+ 'revreview-adv-reviewing-p' => 'Notice: Other reviewers can see that you are reviewing this page.',
 70+ 'revreview-adv-reviewing-c' => 'Notice: Other reviewers can see that you are reviewing these changes.',
 71+ 'revreview-sadv-reviewing-p' => 'You can $1 yourself as reviewing this page to other users.',
 72+ 'revreview-sadv-reviewing-c' => 'You can $1 yourself as reviewing these changes to other users.',
 73+ 'revreview-adv-start-link' => 'advertise',
 74+ 'revreview-adv-stop-link' => 'de-advertise',
 75+ 'revreview-advertise-start' => 'Advertise',
 76+ 'revreview-advertise-stop' => 'De-advertise',
7077 'revreview-toolow' => '\'\'\'You must rate each of the attributes higher than "inadequate" in order for a revision to be considered reviewed.\'\'\'
7178
7279 To remove the review status of a revision, click "unaccept".
@@ -78,7 +85,7 @@
7986 'revreview-update-edited-prev' => '<span class="flaggedrevs_important">Your changes are not yet in the stable version. There are previous changes pending review.</span>
8087
8188 Please review all the changes shown below to make your edits appear in the stable version.',
82 - 'revreview-update-includes' => '\'\'\'Templates/files updated (unreviewed pages in bold):\'\'\'',
 89+ 'revreview-update-includes' => 'Templates/files updated (unreviewed pages in bold):',
8390
8491 'revreview-reject-header' => 'Reject changes for $1',
8592 'revreview-reject-text-list' => 'By completing this action you will be \'\'\'rejecting\'\'\' the source text changes from the following {{PLURAL:$1|revision|revisions}} of [[:$2|$2]]:',
Index: branches/REL1_18/extensions/FlaggedRevs/presentation/FlaggedPageView.php
@@ -1407,9 +1407,6 @@
14081408 $changeDiv = '';
14091409 # If the user can review then prompt them to review them...
14101410 if ( $wgUser->isAllowed( 'review' ) ) {
1411 - # Set a key to note that someone is viewing this
1412 - FRUserActivity::setUserReviewingDiff(
1413 - $wgUser, $oldRev->getId(), $newRev->getId() );
14141411 // Reviewer just edited...
14151412 if ( $wgRequest->getInt( 'shownotice' )
14161413 && $newRev->isCurrent()
Index: branches/REL1_18/extensions/FlaggedRevs/presentation/RevisionReviewFormUI.php
@@ -124,30 +124,30 @@
125125 $form .= Xml::closeElement( 'legend' ) . "\n";
126126 # Show explanatory text
127127 $form .= $this->topNotice;
128 - # Show possible conflict warning msg...
 128+
 129+ # Check if anyone is reviewing this already and
 130+ # show a conflict warning message as needed...
129131 if ( $priorRevId ) {
130132 list( $u, $ts ) =
131133 FRUserActivity::getUserReviewingDiff( $priorRevId, $this->rev->getId() );
132134 } else {
133135 list( $u, $ts ) = FRUserActivity::getUserReviewingPage( $this->rev->getPage() );
134136 }
135 - if ( $u !== null ) { // page under review...
136 - $form .= '<p><span class="fr-under-review">';
137 - if ( $u != $this->user->getName() ) { // by another user...
138 - $msg = $priorRevId
139 - ? 'revreview-poss-conflict-c'
140 - : 'revreview-poss-conflict-p';
141 - $form .= wfMsgExt( $msg, 'parseinline',
142 - $u, $wgLang->date( $ts, true ), $wgLang->time( $ts, true ) );
143 - } else { // by this user...
144 - $msg = $priorRevId
145 - ? 'revreview-adv-reviewing-c'
146 - : 'revreview-adv-reviewing-p';
147 - $form .= wfMsgExt( $msg, 'parseinline',
148 - $wgLang->date( $ts, true ), $wgLang->time( $ts, true ) );
149 - }
150 - $form .= "</span></p>\n";
 137+ $form .= "<p>";
 138+ // Page under review (and not by this user)...
 139+ if ( $u !== null && $u != $this->user->getName() ) {
 140+ $form .= '<span class="fr-under-review">';
 141+ $msg = $priorRevId
 142+ ? 'revreview-poss-conflict-c'
 143+ : 'revreview-poss-conflict-p';
 144+ $form .= wfMsgExt( $msg, 'parseinline',
 145+ $u, $wgLang->date( $ts, true ), $wgLang->time( $ts, true ) );
 146+ $form .= "</span>";
 147+ // Page not under review or under review by this user...
 148+ } elseif ( !$frev ) { // rev not already reviewed
 149+ $form .= '<span id="mw-fr-reviewing-status" style="display:none;"></span>'; // JS widget
151150 }
 151+ $form .= "</p>\n";
152152
153153 if ( $disabled ) {
154154 $form .= Xml::openElement( 'div', array( 'class' => 'fr-rating-controls-disabled',
@@ -185,11 +185,12 @@
186186 }
187187 # Determine if there will be reject button
188188 $rejectId = $this->rejectRefRevId();
 189+
189190 # Add the submit buttons
190191 $form .= self::submitButtons( $rejectId, $frev, (bool)$disabled, $reviewIncludes );
191 - # Untoggle "reviewing" status on exit
192 - $form .= '<script type="text/javascript">var jsReviewingStatus = ' .
193 - (int)( $u == $this->user->getName() ) . "</script>\n";
 192+ # Add "cancel" link
 193+ $form .= Linker::link( $article->getTitle(), wfMsg( 'revreview-cancel' ) );
 194+
194195 # Show stability log if there is anything interesting...
195196 if ( $article->isPageLocked() ) {
196197 $form .= ' ' . FlaggedRevsXML::logToggle( 'revreview-log-toggle-show' );
@@ -208,7 +209,9 @@
209210 $form .= Html::hidden( 'oldid', $revId, array( 'id' => 'mw-fr-input-oldid' ) ) . "\n";
210211 $form .= Html::hidden( 'wpEditToken', $this->user->editToken() ) . "\n";
211212 $form .= Html::hidden( 'changetime', $reviewTime,
212 - array( 'id' => 'mw-fr-input-changetime' ) ) . "\n";; // id for JS
 213+ array( 'id' => 'mw-fr-input-changetime' ) ) . "\n"; // id for JS
 214+ $form .= Html::hidden( 'userreviewing', (int)($u === $this->user->getName()),
 215+ array( 'id' => 'mw-fr-user-reviewing' ) ) . "\n"; // id for JS
213216 # Add review parameters
214217 $form .= Html::hidden( 'templateParams', $templateParams ) . "\n";
215218 $form .= Html::hidden( 'imageParams', $imageParams ) . "\n";
Index: branches/REL1_18/extensions/FlaggedRevs/presentation/modules/review.js
@@ -5,6 +5,7 @@
66 */
77
88 window.FlaggedRevsReview = {
 9+ 'isUserReviewing': 0, // user reviewing this page?
910 /*
1011 * Updates for radios/checkboxes on patch by Daniel Arnold (bug 13744).
1112 * Visually update the revision rating form on change.
@@ -322,17 +323,82 @@
323324 },
324325
325326 /*
 327+ * Enable AJAX-based functionality to set that a user is reviewing a page/diff
 328+ */
 329+ 'enableAjaxReviewActivity': function() {
 330+ // User is already reviewing in another tab...
 331+ if ( $('#mw-fr-user-reviewing').val() == 1 ) {
 332+ FlaggedRevsReview.isUserReviewing = 1;
 333+ FlaggedRevsReview.advertiseReviewing( null, true );
 334+ // User is not already reviewing this....
 335+ } else {
 336+ FlaggedRevsReview.deadvertiseReviewing( null, true );
 337+ }
 338+ $('#mw-fr-reviewing-status').show();
 339+ },
 340+
 341+ /*
 342+ * Flag users as "now reviewing"
 343+ */
 344+ 'advertiseReviewing': function( e, isInitial ) {
 345+ if ( isInitial !== true ) { // don't send if just setting up form
 346+ if ( !FlaggedRevsReview.setReviewingStatus( 1 ) ) {
 347+ return; // failed
 348+ }
 349+ }
 350+ // Build notice to say that user is advertising...
 351+ var msgkey = $('#mw-fr-input-refid').length
 352+ ? 'revreview-adv-reviewing-c' // diff
 353+ : 'revreview-adv-reviewing-p' // page
 354+ var $underReview = $(
 355+ '<span class="fr-under-review">' + mw.message( msgkey ).escaped() + '</span>' );
 356+ // Update notice to say that user is advertising...
 357+ $('#mw-fr-reviewing-status')
 358+ .empty()
 359+ .append( $underReview )
 360+ .append( ' (' + mw.html.element( 'a',
 361+ { id: 'mw-fr-reviewing-stop' }, mw.msg( 'revreview-adv-stop-link' ) ) + ')' )
 362+ .find( '#mw-fr-reviewing-stop')
 363+ .css( 'cursor', 'pointer' )
 364+ .click( FlaggedRevsReview.deadvertiseReviewing );
 365+ },
 366+
 367+ /*
326368 * Flag users as "no longer reviewing"
327369 */
328 - 'deadvertiseReviewing': function() {
329 - var form = document.getElementById('mw-fr-reviewform');
330 - if( form && jsReviewingStatus ) {
331 - var oRevId = document.getElementById('mw-fr-input-refid').value;
332 - var nRevId = document.getElementById('mw-fr-input-oldid').value;
333 - } else if( location.href.indexOf('&reviewing=1') != -1 ) {
334 - var oRevId = 0;
335 - var nRevId = mw.config.get('wgCurRevisionId');
 370+ 'deadvertiseReviewing': function( e, isInitial ) {
 371+ if ( isInitial !== true ) { // don't send if just setting up form
 372+ if ( !FlaggedRevsReview.setReviewingStatus( 0 ) ) {
 373+ return; // failed
 374+ }
336375 }
 376+ // Build notice to say that user is not advertising...
 377+ var msgkey = $('#mw-fr-input-refid').length
 378+ ? 'revreview-sadv-reviewing-c' // diff
 379+ : 'revreview-sadv-reviewing-p' // page
 380+ var $underReview = $(
 381+ '<span class="fr-make-under-review">' +
 382+ mw.message( msgkey )
 383+ .escaped()
 384+ .replace( /\$1/, mw.html.element( 'a',
 385+ { id: 'mw-fr-reviewing-start' }, mw.msg( 'revreview-adv-start-link' ) ) ) +
 386+ '</span>'
 387+ );
 388+ $underReview.find( '#mw-fr-reviewing-start')
 389+ .css( 'cursor', 'pointer' )
 390+ .click( FlaggedRevsReview.advertiseReviewing );
 391+ // Update notice to say that user is not advertising...
 392+ $('#mw-fr-reviewing-status').empty().append( $underReview );
 393+ },
 394+
 395+ /*
 396+ * Set reviewing status for this page/diff
 397+ */
 398+ 'setReviewingStatus': function( value ) {
 399+ // Get {previd,oldid} array for this page view.
 400+ // The previd value will be 0 if this is not a diff view.
 401+ var oRevId = $('#mw-fr-input-refid') ? $('#mw-fr-input-refid').val() : 0;
 402+ var nRevId = $('#mw-fr-input-oldid') ? $('#mw-fr-input-oldid').val() : 0;
337403 if ( nRevId > 0 ) {
338404 // Send GET request via AJAX!
339405 var call = jQuery.ajax({
@@ -341,15 +407,20 @@
342408 action : 'reviewactivity',
343409 previd : oRevId,
344410 oldid : nRevId,
345 - reviewing : 0
 411+ reviewing : value
346412 },
347413 type : "POST",
348414 dataType: "html", // response type
349 - timeout : 2000, // don't delay user exiting
 415+ timeout : 1700, // don't delay user exiting
350416 async : false
351417 });
352418 }
353 - return;
 419+ if ( call.status == 200 ) {
 420+ FlaggedRevsReview.isUserReviewing = value;
 421+ return true;
 422+ } else {
 423+ return false;
 424+ }
354425 }
355426 };
356427
@@ -357,10 +428,11 @@
358429 FlaggedRevsReview.maybeDisableAcceptButton();
359430 FlaggedRevsReview.updateRatingFormColors();
360431 FlaggedRevsReview.enableAjaxReview();
 432+FlaggedRevsReview.enableAjaxReviewActivity();
361433
362434 // Flag users as "no longer reviewing" on navigate-away
363 -window.onbeforeunload = function( e ) {
 435+$( window ).bind( 'beforeunload', function( e ) {
364436 if ( FlaggedRevsReview.isUserReviewing == 1 ) {
365437 FlaggedRevsReview.deadvertiseReviewing();
366438 }
367 -};
 439+} );
Index: branches/REL1_18/extensions/FlaggedRevs/presentation/RejectConfirmationFormUI.php
@@ -147,7 +147,7 @@
148148 $form .= Html::input( 'wpSubmit', wfMsg( 'revreview-reject-confirm' ), 'submit' );
149149 $form .= ' ';
150150 $form .= $skin->link( $this->form->getPage(), wfMsg( 'revreview-reject-cancel' ),
151 - array( 'onClick' => 'history.back(); return false;' ),
 151+ array( 'onClick' => 'history.back(); return history.length <= 1;' ),
152152 array( 'oldid' => $this->form->getRefId(), 'diff' => $this->form->getOldId() ) );
153153 $form .= Xml::closeElement( 'form' );
154154
Property changes on: branches/REL1_18/extensions/FlaggedRevs
___________________________________________________________________
Modified: svn:mergeinfo
155155 Merged /trunk/extensions/FlaggedRevs:r97886,97899,97969,98054,98179,98497,98654,98773,98801,98960,98982,99059,99097,99164,99167
Index: branches/REL1_18/extensions/Collection/js/collection.js
@@ -151,8 +151,8 @@
152152 $('input.order').attr('disabled', 'disabled');
153153 return;
154154 } else {
155 - $('#downloadButton').attr('disabled', '');
156 - $('input.order').attr('disabled', '');
 155+ $('#downloadButton').removeAttr('disabled');
 156+ $('input.order').removeAttr('disabled');
157157 }
158158 if (!$('#saveButton').length) {
159159 return;
@@ -165,14 +165,14 @@
166166 return;
167167 }
168168 } else if (!$('#personalCollTitle').length || $('#communityCollType:checked').val()) {
169 - $('#communityCollTitle').attr('disabled', '');
 169+ $('#communityCollTitle').removeAttr('disabled');
170170 $('#personalCollTitle').attr('disabled', 'disabled');
171171 if (!$.trim($('#communityCollTitle').val())) {
172172 $('#saveButton').attr('disabled', 'disabled');
173173 return;
174174 }
175175 }
176 - $('#saveButton').attr('disabled', '');
 176+ $('#saveButton').removeAttr('disabled');
177177 }
178178
179179 function make_sortable() {
Property changes on: branches/REL1_18/extensions/Collection
___________________________________________________________________
Modified: svn:mergeinfo
180180 Merged /trunk/extensions/Collection:r98982,99059,99097,99164,99167
Index: branches/REL1_18/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.config.js
@@ -457,7 +457,7 @@
458458 },
459459 'offset': {
460460 'default': [-70, -142],
461 - 'default-rtl': [-70, -502],
 461+ 'default-rtl': [-70, -502]
462462 },
463463 'action': {
464464 'type': 'encapsulate',
Property changes on: branches/REL1_18/extensions/WikiEditor
___________________________________________________________________
Modified: svn:mergeinfo
465465 Merged /trunk/extensions/WikiEditor:r99097,99164,99167
Index: branches/REL1_18/extensions/CategoryTree/CategoryTree.php
@@ -201,7 +201,7 @@
202202 * namely, only providing the mode name or number.
203203 * This loads CategoryTreeFunctions.php and calls CategoryTree::ajax()
204204 */
205 -function efCategoryTreeAjaxWrapper( $category, $options, $enc = '' ) {
 205+function efCategoryTreeAjaxWrapper( $category, $options = array(), $enc = '' ) {
206206 global $wgCategoryTreeHTTPCache, $wgSquidMaxage, $wgUseSquid;
207207
208208 if ( is_string( $options ) ) {
@@ -339,6 +339,9 @@
340340
341341 /**
342342 * ArticleFromTitle hook, override category page handling
 343+ *
 344+ * @param $title Title
 345+ * @param $article Article
343346 */
344347 function efCategoryTreeArticleFromTitle( $title, &$article ) {
345348 if ( $title->getNamespace() == NS_CATEGORY ) {
Index: branches/REL1_18/extensions/AbuseFilter/AbuseFilter.parser.php
@@ -216,12 +216,13 @@
217217 $pattern .= 'i';
218218 }
219219
 220+ $handler = new AFPRegexErrorHandler( $pattern, $pos );
220221 try {
221 - set_error_handler( array( 'AbuseFilterParser', 'regexErrorHandler' ) );
 222+ $handler->install();
222223 $result = preg_match( $pattern, $str );
223 - restore_error_handler();
 224+ $handler->restore();
224225 } catch ( Exception $e ) {
225 - restore_error_handler();
 226+ $handler->restore();
226227 throw $e;
227228 }
228229 return new AFPData( self::DBool, (bool)$result );
@@ -381,6 +382,32 @@
382383 }
383384 }
384385
 386+class AFPRegexErrorHandler {
 387+ function __construct( $regex, $pos ) {
 388+ $this->regex = $regex;
 389+ $this->pos = $pos;
 390+ }
 391+
 392+ function handleError( $errno, $errstr, $errfile, $errline, $context ) {
 393+ if ( error_reporting() == 0 ) {
 394+ return true;
 395+ }
 396+ throw new AFPUserVisibleException(
 397+ 'regexfailure',
 398+ $this->pos,
 399+ array( $errstr, $this->regex )
 400+ );
 401+ }
 402+
 403+ function install() {
 404+ set_error_handler( array( $this, 'handleError' ) );
 405+ }
 406+
 407+ function restore() {
 408+ restore_error_handler();
 409+ }
 410+}
 411+
385412 class AbuseFilterParser {
386413 var $mParams, $mVars, $mCode, $mTokens, $mPos, $mCur, $mShortCircuit, $mAllowShort;
387414
@@ -1453,12 +1480,13 @@
14541481
14551482 $matches = array();
14561483
 1484+ $handler = new AFPRegexErrorHandler( $needle, $this->mCur->pos );
14571485 try {
1458 - set_error_handler( array( 'AbuseFilterParser', 'regexErrorHandler' ) );
 1486+ $handler->install();
14591487 $count = preg_match_all( $needle, $haystack, $matches );
1460 - restore_error_handler();
 1488+ $handler->restore();
14611489 } catch ( Exception $e ) {
1462 - restore_error_handler();
 1490+ $handler->restore();
14631491 throw $e;
14641492 }
14651493 }
@@ -1742,17 +1770,6 @@
17431771
17441772 return AFPData::castTypes( $val, AFPData::DBool );
17451773 }
1746 -
1747 - public static function regexErrorHandler( $errno, $errstr, $errfile, $errline, $context ) {
1748 - if ( error_reporting() == 0 ) {
1749 - return true;
1750 - }
1751 - throw new AFPUserVisibleException(
1752 - 'regexfailure',
1753 - $context['pos'],
1754 - array( $errstr, $context['regex'] )
1755 - );
1756 - }
17571774 }
17581775
17591776 # Taken from http://au2.php.net/manual/en/function.fnmatch.php#71725
Property changes on: branches/REL1_18/extensions
___________________________________________________________________
Added: svn:mergeinfo
17601777 Merged /trunk/extensions:r97886,97899,97969,98054,98179,98497,98654,98773,98801,98960,98982,99059,99097,99164,99167

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97886* Made "under review" notices require the user's consent (bug 31093)...aaron03:38, 23 September 2011
r97899FU r97886: fix for JS back buttonaaron08:44, 23 September 2011
r97969FU r97886:...aaron22:45, 23 September 2011
r98179FU r97886:...aaron21:38, 26 September 2011
r98497More PHPStorm fixesaaron00:50, 30 September 2011
r98654Fix some things noticed in http://www.mediawiki.org/wiki/User:Krinkle/Extensi......aaron03:23, 2 October 2011
r98773fix Bug #31317 - LiquidThreads arrow icon disappears upon collapsing a thread...mah16:20, 3 October 2011
r98801FU r98497 another instance of dbw bogus varaaron20:35, 3 October 2011
r98960Oct 5 00:32:16 10.0.2.175 apache2[351]: PHP Warning: Missing argument 2 for...reedy00:37, 5 October 2011
r98982(bug 31360) Use removeAttr('disabled') instead of attr('disabled', ''). Conso...tstarling06:30, 5 October 2011
r99059(bug 31379) Don't use the $errcontext parameter of a PHP error handler to get...tstarling23:31, 5 October 2011
r99097(bug 31411) Remove stray comma introduced in r86853, broke WikiEditor in IEcatrope13:15, 6 October 2011
r99164Followup to r98583; ProofreadPage was inserting a new newline at the start of...brion23:01, 6 October 2011
r99167* (bug 31415) Fix regression: 'noicon' works again for OggHandler...brion23:20, 6 October 2011

Status & tagging log