Index: branches/REL1_18/extensions/LiquidThreads/jquery/jquery.thread_collapse.css |
— | — | @@ -10,5 +10,5 @@ |
11 | 11 | } |
12 | 12 | .thread-collapse-control a.thread-control-collapsed { |
13 | 13 | /* @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; |
15 | 15 | } |
Property changes on: branches/REL1_18/extensions/LiquidThreads |
___________________________________________________________________ |
Modified: svn:mergeinfo |
16 | 16 | 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 @@ |
33 | 33 | } |
34 | 34 | return true; |
35 | 35 | } |
| 36 | + if ( $name == 'noicon' ) { |
| 37 | + return true; |
| 38 | + } |
36 | 39 | return false; |
37 | 40 | } |
38 | 41 | |
Property changes on: branches/REL1_18/extensions/OggHandler/OggHandler_body.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
39 | 42 | Merged /trunk/extensions/OggHandler/OggHandler_body.php:r99167 |
Index: branches/REL1_18/extensions/ProofreadPage/ProofreadPage_body.php |
— | — | @@ -1021,7 +1021,7 @@ |
1022 | 1022 | $text = '<noinclude><pagequality level="' . $editpage->quality . '" user="' . $editpage->username . '" />' . |
1023 | 1023 | '<div class="pagetext">' . $editpage->header."\n\n\n</noinclude>" . |
1024 | 1024 | $editpage->textbox1 . |
1025 | | - "<noinclude>\n" . $editpage->footer . '</div></noinclude>'; |
| 1025 | + "\n<noinclude>" . $editpage->footer . '</div></noinclude>'; |
1026 | 1026 | $editpage->textbox1 = $text; |
1027 | 1027 | } else { |
1028 | 1028 | // replace deprecated template |
Index: branches/REL1_18/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -390,7 +390,10 @@ |
391 | 391 | 'revreview-submitedit', 'revreview-submitedit-title', |
392 | 392 | 'revreview-submit-review', 'revreview-submit-unreview', |
393 | 393 | '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' |
395 | 398 | ), |
396 | 399 | 'dependencies' => array( 'mediawiki.util' ), |
397 | 400 | 'localBasePath' => $localModulePath, |
— | — | @@ -500,9 +503,6 @@ |
501 | 504 | # Implicit autoreview rights group |
502 | 505 | $wgHooks['AutopromoteCondition'][] = 'FlaggedRevsHooks::checkAutoPromoteCond'; |
503 | 506 | |
504 | | -# Check if a page is currently being reviewed |
505 | | -$wgHooks['MediaWikiPerformAction'][] = 'FlaggedRevsUIHooks::onMediaWikiPerformAction'; |
506 | | - |
507 | 507 | # Actually register special pages |
508 | 508 | $wgHooks['SpecialPage_initList'][] = 'FlaggedRevsUIHooks::defineSpecialPages'; |
509 | 509 | |
Index: branches/REL1_18/extensions/FlaggedRevs/maintenance/fixBug28348.inc |
— | — | @@ -45,8 +45,8 @@ |
46 | 46 | if ( $file ) { |
47 | 47 | echo "fixed file {$row->fi_name} reference in rev ID {$row->fi_rev_id}\n"; |
48 | 48 | # 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 ) ), |
51 | 51 | array( 'fi_rev_id' => $row->fi_rev_id, 'fi_name' => $row->fi_name ), |
52 | 52 | __METHOD__ |
53 | 53 | ); |
Index: branches/REL1_18/extensions/FlaggedRevs/dataclasses/FlaggedRevs.hooks.php |
— | — | @@ -192,8 +192,6 @@ |
193 | 193 | if ( $title->getNamespace() == NS_MEDIA ) { |
194 | 194 | $title = Title::makeTitle( NS_FILE, $title->getDBkey() ); |
195 | 195 | $title->resetArticleId( $title->getArticleId() ); // avoid extra queries |
196 | | - } else { |
197 | | - $title =& $title; |
198 | 196 | } |
199 | 197 | $time = $sha1 = false; // current version |
200 | 198 | # Check for the version of this file used when reviewed... |
Index: branches/REL1_18/extensions/FlaggedRevs/api/FlaggedRevsApi.hooks.php |
— | — | @@ -55,6 +55,7 @@ |
56 | 56 | ) ); |
57 | 57 | $module->addWhere( 'fr_user=user_id' ); |
58 | 58 | |
| 59 | + $where = array(); |
59 | 60 | // Construct WHERE-clause to avoid multiplying the number of scanned rows |
60 | 61 | // as flaggedrevs table has composite primary key (fr_page_id,fr_rev_id) |
61 | 62 | foreach ( $pageids as $pageid => $revids ) { |
Index: branches/REL1_18/extensions/FlaggedRevs/presentation/FlaggedRevsUI.hooks.php |
— | — | @@ -119,30 +119,6 @@ |
120 | 120 | return true; |
121 | 121 | } |
122 | 122 | |
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 | | - |
147 | 123 | /** Add user preferences */ |
148 | 124 | public static function onGetPreferences( $user, array &$preferences ) { |
149 | 125 | // Box or bar UI |
— | — | @@ -566,7 +542,7 @@ |
567 | 543 | { |
568 | 544 | return true; // confirm that page is in reviewable namespace |
569 | 545 | } |
570 | | - $rlink = ''; |
| 546 | + $rlink = $css = ''; |
571 | 547 | // page is not reviewed |
572 | 548 | if ( $rc->mAttribs['fp_stable'] == null ) { |
573 | 549 | // 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 @@ |
25 | 25 | $this->watched = $wgRequest->getCheck( 'watched' ); |
26 | 26 | $this->stable = $wgRequest->getCheck( 'stable' ); |
27 | 27 | $feedType = $wgRequest->getVal( 'feed' ); |
| 28 | + |
| 29 | + $incLimit = 0; |
28 | 30 | if ( $this->including() ) { |
29 | 31 | $incLimit = $this->parseParams( $par ); // apply non-URL params |
30 | 32 | } |
Index: branches/REL1_18/extensions/FlaggedRevs/presentation/language/RevisionReview.i18n.php |
— | — | @@ -53,6 +53,7 @@ |
54 | 54 | See the [[Special:Unreviewedpages|list of unreviewed pages]].', |
55 | 55 | '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.', |
56 | 56 | 'revreview-stable2' => 'You may want to view the [{{fullurl:$1|stable=1}} stable version] of this page.', |
| 57 | + 'revreview-cancel' => 'Cancel', |
57 | 58 | 'revreview-submit' => 'Submit', |
58 | 59 | 'revreview-submitting' => 'Submitting...', |
59 | 60 | 'revreview-submit-review' => 'Accept revision', |
— | — | @@ -64,8 +65,14 @@ |
65 | 66 | 'revreview-successful2' => '\'\'\'Revision of [[:$1|$1]] successfully unflagged.\'\'\'', |
66 | 67 | 'revreview-poss-conflict-p' => '\'\'\'Warning: [[User:$1|$1]] started reviewing this page on $2 at $3.\'\'\'', |
67 | 68 | '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', |
70 | 77 | 'revreview-toolow' => '\'\'\'You must rate each of the attributes higher than "inadequate" in order for a revision to be considered reviewed.\'\'\' |
71 | 78 | |
72 | 79 | To remove the review status of a revision, click "unaccept". |
— | — | @@ -78,7 +85,7 @@ |
79 | 86 | 'revreview-update-edited-prev' => '<span class="flaggedrevs_important">Your changes are not yet in the stable version. There are previous changes pending review.</span> |
80 | 87 | |
81 | 88 | 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):', |
83 | 90 | |
84 | 91 | 'revreview-reject-header' => 'Reject changes for $1', |
85 | 92 | '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 @@ |
1408 | 1408 | $changeDiv = ''; |
1409 | 1409 | # If the user can review then prompt them to review them... |
1410 | 1410 | if ( $wgUser->isAllowed( 'review' ) ) { |
1411 | | - # Set a key to note that someone is viewing this |
1412 | | - FRUserActivity::setUserReviewingDiff( |
1413 | | - $wgUser, $oldRev->getId(), $newRev->getId() ); |
1414 | 1411 | // Reviewer just edited... |
1415 | 1412 | if ( $wgRequest->getInt( 'shownotice' ) |
1416 | 1413 | && $newRev->isCurrent() |
Index: branches/REL1_18/extensions/FlaggedRevs/presentation/RevisionReviewFormUI.php |
— | — | @@ -124,30 +124,30 @@ |
125 | 125 | $form .= Xml::closeElement( 'legend' ) . "\n"; |
126 | 126 | # Show explanatory text |
127 | 127 | $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... |
129 | 131 | if ( $priorRevId ) { |
130 | 132 | list( $u, $ts ) = |
131 | 133 | FRUserActivity::getUserReviewingDiff( $priorRevId, $this->rev->getId() ); |
132 | 134 | } else { |
133 | 135 | list( $u, $ts ) = FRUserActivity::getUserReviewingPage( $this->rev->getPage() ); |
134 | 136 | } |
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 |
151 | 150 | } |
| 151 | + $form .= "</p>\n"; |
152 | 152 | |
153 | 153 | if ( $disabled ) { |
154 | 154 | $form .= Xml::openElement( 'div', array( 'class' => 'fr-rating-controls-disabled', |
— | — | @@ -185,11 +185,12 @@ |
186 | 186 | } |
187 | 187 | # Determine if there will be reject button |
188 | 188 | $rejectId = $this->rejectRefRevId(); |
| 189 | + |
189 | 190 | # Add the submit buttons |
190 | 191 | $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 | + |
194 | 195 | # Show stability log if there is anything interesting... |
195 | 196 | if ( $article->isPageLocked() ) { |
196 | 197 | $form .= ' ' . FlaggedRevsXML::logToggle( 'revreview-log-toggle-show' ); |
— | — | @@ -208,7 +209,9 @@ |
209 | 210 | $form .= Html::hidden( 'oldid', $revId, array( 'id' => 'mw-fr-input-oldid' ) ) . "\n"; |
210 | 211 | $form .= Html::hidden( 'wpEditToken', $this->user->editToken() ) . "\n"; |
211 | 212 | $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 |
213 | 216 | # Add review parameters |
214 | 217 | $form .= Html::hidden( 'templateParams', $templateParams ) . "\n"; |
215 | 218 | $form .= Html::hidden( 'imageParams', $imageParams ) . "\n"; |
Index: branches/REL1_18/extensions/FlaggedRevs/presentation/modules/review.js |
— | — | @@ -5,6 +5,7 @@ |
6 | 6 | */ |
7 | 7 | |
8 | 8 | window.FlaggedRevsReview = { |
| 9 | + 'isUserReviewing': 0, // user reviewing this page? |
9 | 10 | /* |
10 | 11 | * Updates for radios/checkboxes on patch by Daniel Arnold (bug 13744). |
11 | 12 | * Visually update the revision rating form on change. |
— | — | @@ -322,17 +323,82 @@ |
323 | 324 | }, |
324 | 325 | |
325 | 326 | /* |
| 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 | + /* |
326 | 368 | * Flag users as "no longer reviewing" |
327 | 369 | */ |
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 | + } |
336 | 375 | } |
| 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; |
337 | 403 | if ( nRevId > 0 ) { |
338 | 404 | // Send GET request via AJAX! |
339 | 405 | var call = jQuery.ajax({ |
— | — | @@ -341,15 +407,20 @@ |
342 | 408 | action : 'reviewactivity', |
343 | 409 | previd : oRevId, |
344 | 410 | oldid : nRevId, |
345 | | - reviewing : 0 |
| 411 | + reviewing : value |
346 | 412 | }, |
347 | 413 | type : "POST", |
348 | 414 | dataType: "html", // response type |
349 | | - timeout : 2000, // don't delay user exiting |
| 415 | + timeout : 1700, // don't delay user exiting |
350 | 416 | async : false |
351 | 417 | }); |
352 | 418 | } |
353 | | - return; |
| 419 | + if ( call.status == 200 ) { |
| 420 | + FlaggedRevsReview.isUserReviewing = value; |
| 421 | + return true; |
| 422 | + } else { |
| 423 | + return false; |
| 424 | + } |
354 | 425 | } |
355 | 426 | }; |
356 | 427 | |
— | — | @@ -357,10 +428,11 @@ |
358 | 429 | FlaggedRevsReview.maybeDisableAcceptButton(); |
359 | 430 | FlaggedRevsReview.updateRatingFormColors(); |
360 | 431 | FlaggedRevsReview.enableAjaxReview(); |
| 432 | +FlaggedRevsReview.enableAjaxReviewActivity(); |
361 | 433 | |
362 | 434 | // Flag users as "no longer reviewing" on navigate-away |
363 | | -window.onbeforeunload = function( e ) { |
| 435 | +$( window ).bind( 'beforeunload', function( e ) { |
364 | 436 | if ( FlaggedRevsReview.isUserReviewing == 1 ) { |
365 | 437 | FlaggedRevsReview.deadvertiseReviewing(); |
366 | 438 | } |
367 | | -}; |
| 439 | +} ); |
Index: branches/REL1_18/extensions/FlaggedRevs/presentation/RejectConfirmationFormUI.php |
— | — | @@ -147,7 +147,7 @@ |
148 | 148 | $form .= Html::input( 'wpSubmit', wfMsg( 'revreview-reject-confirm' ), 'submit' ); |
149 | 149 | $form .= ' '; |
150 | 150 | $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;' ), |
152 | 152 | array( 'oldid' => $this->form->getRefId(), 'diff' => $this->form->getOldId() ) ); |
153 | 153 | $form .= Xml::closeElement( 'form' ); |
154 | 154 | |
Property changes on: branches/REL1_18/extensions/FlaggedRevs |
___________________________________________________________________ |
Modified: svn:mergeinfo |
155 | 155 | 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 @@ |
152 | 152 | $('input.order').attr('disabled', 'disabled'); |
153 | 153 | return; |
154 | 154 | } else { |
155 | | - $('#downloadButton').attr('disabled', ''); |
156 | | - $('input.order').attr('disabled', ''); |
| 155 | + $('#downloadButton').removeAttr('disabled'); |
| 156 | + $('input.order').removeAttr('disabled'); |
157 | 157 | } |
158 | 158 | if (!$('#saveButton').length) { |
159 | 159 | return; |
— | — | @@ -165,14 +165,14 @@ |
166 | 166 | return; |
167 | 167 | } |
168 | 168 | } else if (!$('#personalCollTitle').length || $('#communityCollType:checked').val()) { |
169 | | - $('#communityCollTitle').attr('disabled', ''); |
| 169 | + $('#communityCollTitle').removeAttr('disabled'); |
170 | 170 | $('#personalCollTitle').attr('disabled', 'disabled'); |
171 | 171 | if (!$.trim($('#communityCollTitle').val())) { |
172 | 172 | $('#saveButton').attr('disabled', 'disabled'); |
173 | 173 | return; |
174 | 174 | } |
175 | 175 | } |
176 | | - $('#saveButton').attr('disabled', ''); |
| 176 | + $('#saveButton').removeAttr('disabled'); |
177 | 177 | } |
178 | 178 | |
179 | 179 | function make_sortable() { |
Property changes on: branches/REL1_18/extensions/Collection |
___________________________________________________________________ |
Modified: svn:mergeinfo |
180 | 180 | 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 @@ |
458 | 458 | }, |
459 | 459 | 'offset': { |
460 | 460 | 'default': [-70, -142], |
461 | | - 'default-rtl': [-70, -502], |
| 461 | + 'default-rtl': [-70, -502] |
462 | 462 | }, |
463 | 463 | 'action': { |
464 | 464 | 'type': 'encapsulate', |
Property changes on: branches/REL1_18/extensions/WikiEditor |
___________________________________________________________________ |
Modified: svn:mergeinfo |
465 | 465 | Merged /trunk/extensions/WikiEditor:r99097,99164,99167 |
Index: branches/REL1_18/extensions/CategoryTree/CategoryTree.php |
— | — | @@ -201,7 +201,7 @@ |
202 | 202 | * namely, only providing the mode name or number. |
203 | 203 | * This loads CategoryTreeFunctions.php and calls CategoryTree::ajax() |
204 | 204 | */ |
205 | | -function efCategoryTreeAjaxWrapper( $category, $options, $enc = '' ) { |
| 205 | +function efCategoryTreeAjaxWrapper( $category, $options = array(), $enc = '' ) { |
206 | 206 | global $wgCategoryTreeHTTPCache, $wgSquidMaxage, $wgUseSquid; |
207 | 207 | |
208 | 208 | if ( is_string( $options ) ) { |
— | — | @@ -339,6 +339,9 @@ |
340 | 340 | |
341 | 341 | /** |
342 | 342 | * ArticleFromTitle hook, override category page handling |
| 343 | + * |
| 344 | + * @param $title Title |
| 345 | + * @param $article Article |
343 | 346 | */ |
344 | 347 | function efCategoryTreeArticleFromTitle( $title, &$article ) { |
345 | 348 | if ( $title->getNamespace() == NS_CATEGORY ) { |
Index: branches/REL1_18/extensions/AbuseFilter/AbuseFilter.parser.php |
— | — | @@ -216,12 +216,13 @@ |
217 | 217 | $pattern .= 'i'; |
218 | 218 | } |
219 | 219 | |
| 220 | + $handler = new AFPRegexErrorHandler( $pattern, $pos ); |
220 | 221 | try { |
221 | | - set_error_handler( array( 'AbuseFilterParser', 'regexErrorHandler' ) ); |
| 222 | + $handler->install(); |
222 | 223 | $result = preg_match( $pattern, $str ); |
223 | | - restore_error_handler(); |
| 224 | + $handler->restore(); |
224 | 225 | } catch ( Exception $e ) { |
225 | | - restore_error_handler(); |
| 226 | + $handler->restore(); |
226 | 227 | throw $e; |
227 | 228 | } |
228 | 229 | return new AFPData( self::DBool, (bool)$result ); |
— | — | @@ -381,6 +382,32 @@ |
382 | 383 | } |
383 | 384 | } |
384 | 385 | |
| 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 | + |
385 | 412 | class AbuseFilterParser { |
386 | 413 | var $mParams, $mVars, $mCode, $mTokens, $mPos, $mCur, $mShortCircuit, $mAllowShort; |
387 | 414 | |
— | — | @@ -1453,12 +1480,13 @@ |
1454 | 1481 | |
1455 | 1482 | $matches = array(); |
1456 | 1483 | |
| 1484 | + $handler = new AFPRegexErrorHandler( $needle, $this->mCur->pos ); |
1457 | 1485 | try { |
1458 | | - set_error_handler( array( 'AbuseFilterParser', 'regexErrorHandler' ) ); |
| 1486 | + $handler->install(); |
1459 | 1487 | $count = preg_match_all( $needle, $haystack, $matches ); |
1460 | | - restore_error_handler(); |
| 1488 | + $handler->restore(); |
1461 | 1489 | } catch ( Exception $e ) { |
1462 | | - restore_error_handler(); |
| 1490 | + $handler->restore(); |
1463 | 1491 | throw $e; |
1464 | 1492 | } |
1465 | 1493 | } |
— | — | @@ -1742,17 +1770,6 @@ |
1743 | 1771 | |
1744 | 1772 | return AFPData::castTypes( $val, AFPData::DBool ); |
1745 | 1773 | } |
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 | | - } |
1757 | 1774 | } |
1758 | 1775 | |
1759 | 1776 | # Taken from http://au2.php.net/manual/en/function.fnmatch.php#71725 |
Property changes on: branches/REL1_18/extensions |
___________________________________________________________________ |
Added: svn:mergeinfo |
1760 | 1777 | Merged /trunk/extensions:r97886,97899,97969,98054,98179,98497,98654,98773,98801,98960,98982,99059,99097,99164,99167 |