Index: branches/REL1_16/extensions/CentralAuth/centralauth.js |
— | — | @@ -1,8 +1,10 @@ |
2 | | -cursor = { x : 0, y : 0 }; |
3 | | -function updateCursorPosition(e) { |
| 2 | +wgCursorPosition = { x : 0, y : 0 }; |
| 3 | +function updateCursorPosition( e ) { |
4 | 4 | e = e || window.event; |
5 | | - cursor.x = e.clientX + ( document.documentElement.scrollLeft || document.body.scrollLeft ) - document.documentElement.clientLeft; |
6 | | - cursor.y = e.clientY + ( document.documentElement.scrollTop || document.body.scrollTop ) - document.documentElement.clientTop; |
| 5 | + wgCursorPosition.x = e.clientX + ( document.documentElement.scrollLeft || document.body.scrollLeft ) |
| 6 | + - document.documentElement.clientLeft; |
| 7 | + wgCursorPosition.y = e.clientY + ( document.documentElement.scrollTop || document.body.scrollTop ) |
| 8 | + - document.documentElement.clientTop; |
7 | 9 | } |
8 | 10 | document.onmousemove = updateCursorPosition; |
9 | 11 | |
— | — | @@ -16,11 +18,12 @@ |
17 | 19 | methodHint = document.createElement( 'div' ); |
18 | 20 | methodHint.innerHTML = helpHtml; |
19 | 21 | methodHint.setAttribute( 'class', 'merge-method-help-div' ); |
20 | | - methodHint.style.left = cursor.x + 'px'; |
21 | | - methodHint.style.top = cursor.y + 'px'; |
| 22 | + methodHint.style.left = wgCursorPosition.x + 'px'; |
| 23 | + methodHint.style.top = wgCursorPosition.y + 'px'; |
22 | 24 | methodHint.setAttribute( 'onclick', 'hideMethodHint()' ); |
23 | 25 | document.getElementById( 'globalWrapper' ).appendChild( methodHint ); |
24 | 26 | } |
| 27 | + |
25 | 28 | function hideMethodHint() { |
26 | 29 | if( methodHint ) { |
27 | 30 | methodHint.parentNode.removeChild( methodHint ); |
Index: branches/REL1_16/extensions/CentralAuth/central-auth.sql |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | |
74 | 74 | -- If true, this account should be hidden from most public user lists. |
75 | 75 | -- Used for "deleting" accounts without breaking referential integrity. |
76 | | - gu_hidden bool not null default 0, |
| 76 | + gu_hidden varbinary(255) not null default '', |
77 | 77 | |
78 | 78 | -- Registration time |
79 | 79 | gu_registration varchar(14) binary, |
— | — | @@ -86,7 +86,10 @@ |
87 | 87 | |
88 | 88 | primary key (gu_id), |
89 | 89 | unique key (gu_name), |
90 | | - key (gu_email) |
| 90 | + key (gu_email), |
| 91 | + |
| 92 | + key gu_locked( gu_name(255), gu_locked ), |
| 93 | + key gu_hidden( gu_name(255), gu_hidden(255) ) |
91 | 94 | ) /*$wgDBTableOptions*/; |
92 | 95 | |
93 | 96 | -- |
Index: branches/REL1_16/extensions/CentralAuth/db_patches/patch-gu_hidden.sql |
— | — | @@ -13,5 +13,5 @@ |
14 | 14 | -- There's also "suppressed" level, which wasn't used before this schema change |
15 | 15 | |
16 | 16 | ALTER TABLE globaluser |
17 | | - ADD INDEX gu_locked( gu_locked ), |
18 | | - ADD INDEX gu_hidden( gu_hidden(255) ); |
| 17 | + ADD INDEX gu_locked( gu_name(255), gu_locked ), |
| 18 | + ADD INDEX gu_hidden( gu_name(255), gu_hidden(255) ); |
Index: branches/REL1_16/extensions/CentralAuth/CentralAuthUser.php |
— | — | @@ -1057,11 +1057,9 @@ |
1058 | 1058 | 'reason' => $reason, |
1059 | 1059 | ); |
1060 | 1060 | $jobs = array(); |
1061 | | - $step = $wgCentralAuthWikisPerSuppressJob; |
1062 | | - for( $jobCount = 0; $jobCount < count( $this->mAttachedArray ); $jobCount += $step ) { |
1063 | | - $length = $jobCount + $step > count( $this->mAttachedArray ) ? |
1064 | | - $jobCount - $step : $step; |
1065 | | - $jobParams['wikis'] = array_slice( $this->mAttachedArray, $jobCount, $length ); |
| 1061 | + $chunks = array_chunk( $this->mAttachedArray, $wgCentralAuthWikisPerSuppressJob ); |
| 1062 | + foreach( $chunks as $wikis ) { |
| 1063 | + $jobParams['wikis'] = $wikis; |
1066 | 1064 | $jobs[] = Job::factory( |
1067 | 1065 | 'crosswikiSuppressUser', |
1068 | 1066 | Title::makeTitleSafe( NS_USER, $this->getName() ), |
Index: branches/REL1_16/extensions/CentralAuth/CentralAuth.php |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | $wgCentralAuthCreateOnView = false; |
125 | 125 | |
126 | 126 | /** |
127 | | - * UPD-transmissed RC settings |
| 127 | + * Settings for sending the CentralAuth events to the RC-to-UDP system |
128 | 128 | */ |
129 | 129 | $wgCentralAuthUDPAddress = false; |
130 | 130 | $wgCentralAuthNew2UDPPrefix = ''; |
Index: branches/REL1_16/extensions/CentralAuth/SpecialCentralAuth.php |
— | — | @@ -204,7 +204,7 @@ |
205 | 205 | |
206 | 206 | function showStatusError( $wikitext ) { |
207 | 207 | global $wgOut; |
208 | | - $wrap = Xml::tags( 'div', array( 'class' => 'error' ), $s ); |
| 208 | + $wrap = Xml::tags( 'div', array( 'class' => 'error' ), $wikitext ); |
209 | 209 | $wgOut->addHTML( $wgOut->parse( $wrap, /*linestart*/true, /*uilang*/true ) ); |
210 | 210 | } |
211 | 211 | |
— | — | @@ -278,7 +278,8 @@ |
279 | 279 | $out = '<fieldset id="mw-centralauth-info">'; |
280 | 280 | $out .= '<legend>' . wfMsgHtml( 'centralauth-admin-info-header' ) . '</legend>'; |
281 | 281 | foreach( $attribs as $tag => $data ) { |
282 | | - $out .= '<p><strong>' . wfMsg( "centralauth-admin-info-$tag" ) . '</strong> ' . $data . '</p>'; |
| 282 | + $out .= '<p><strong>' . wfMsgHtml( "centralauth-admin-info-$tag" ) . '</strong> ' . |
| 283 | + htmlspecialchars( $data ) . '</p>'; |
283 | 284 | } |
284 | 285 | $out .= '</fieldset>'; |
285 | 286 | $wgOut->addHTML( $out ); |
— | — | @@ -290,8 +291,8 @@ |
291 | 292 | $remainder = $this->mUnattachedLocalAccounts; |
292 | 293 | |
293 | 294 | $legend = $this->mCanUnmerge ? |
294 | | - wfMsg( 'centralauth-admin-list-legend-rw' ) : |
295 | | - wfMsg( 'centralauth-admin-list-legend-ro' ); |
| 295 | + wfMsgHtml( 'centralauth-admin-list-legend-rw' ) : |
| 296 | + wfMsgHtml( 'centralauth-admin-list-legend-ro' ); |
296 | 297 | |
297 | 298 | $wgOut->addHTML( "<fieldset><legend>{$legend}</legend>" ); |
298 | 299 | $wgOut->addHTML( $this->listHeader() ); |
— | — | @@ -346,7 +347,7 @@ |
347 | 348 | |
348 | 349 | function listRemainder( $list ) { |
349 | 350 | ksort( $list ); |
350 | | - $notMerged = wfMsg( 'centralauth-admin-unattached' ); |
| 351 | + $notMerged = wfMsgExt( 'centralauth-admin-unattached', array( 'parseinline' ) ); |
351 | 352 | $rows = array(); |
352 | 353 | foreach ( $list as $row ) { |
353 | 354 | $rows[] = '<tr class="unattached-row"><td>' . |
— | — | @@ -372,9 +373,9 @@ |
373 | 374 | function formatMergeMethod( $method ) { |
374 | 375 | global $wgExtensionAssetsPath; |
375 | 376 | |
376 | | - $img = "{$wgExtensionAssetsPath}/CentralAuth/icons/merged-{$method}.png"; |
| 377 | + $img = htmlspecialchars( "{$wgExtensionAssetsPath}/CentralAuth/icons/merged-{$method}.png" ); |
377 | 378 | $brief = wfMsgHtml( "centralauth-merge-method-{$method}" ); |
378 | | - return "<img src=\"{$img}\" alt=\"{$brief}\" />" . |
| 379 | + return "<img src=\"{$img}\" alt=\"{$brief}\" title=\"{$brief}\"/>" . |
379 | 380 | "<span class=\"merge-method-help\" title=\"{$brief}\" onclick=\"showMethodHint('{$method}')\">(?)</span>"; |
380 | 381 | } |
381 | 382 | |
— | — | @@ -586,7 +587,7 @@ |
587 | 588 | } |
588 | 589 | |
589 | 590 | // Should not happen. |
590 | | - return ''; |
| 591 | + throw new MWException( 'Failed to determine home wiki' ); |
591 | 592 | } |
592 | 593 | |
593 | 594 | function evaluateTotalEditcount() { |
— | — | @@ -601,7 +602,7 @@ |
602 | 603 | global $wgOut, $wgLang; |
603 | 604 | $js = "wgMergeMethodDescriptions = {\n"; |
604 | 605 | foreach( array( 'primary', 'new', 'empty', 'password', 'mail', 'admin', 'login' ) as $method ) { |
605 | | - $short = Xml::encodeJsVar( $wgLang->ucFirst( wfMsgHtml( "centralauth-merge-method-{$method}" ) ) ); |
| 606 | + $short = Xml::encodeJsVar( $wgLang->ucfirst( wfMsgHtml( "centralauth-merge-method-{$method}" ) ) ); |
606 | 607 | $desc = Xml::encodeJsVar( wfMsgWikiHtml( "centralauth-merge-method-{$method}-desc" ) ); |
607 | 608 | $js .= "\t'{$method}' : { 'short' : {$short}, 'desc' : {$desc} },\n"; |
608 | 609 | } |
Property changes on: branches/REL1_16/extensions/CentralAuth |
___________________________________________________________________ |
Name: svn:mergeinfo |
609 | 610 | + /trunk/extensions/CentralAuth:62827 |