r82151 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82150‎ | r82151 | r82152 >
Date:22:55, 14 February 2011
Author:catrope
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CentralAuth/centralauth.js (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CodeReview/CodeReview.i18n.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CodeReview/ui/CodeRevisionCommitter.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CodeReview/ui/CodeRevisionView.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/DoubleWiki/DoubleWiki_body.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/NewUserMessage/NewUserMessage.class.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/PagedTiffHandler/PagedTiffHandler.i18n.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/Vector/modules/ext.vector.simpleSearch.js (modified) (history)
  • /branches/wmf/1.17wmf1/includes/GlobalFunctions.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/PrefixSearch.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/Title.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/WatchedItem.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/json/FormatJson.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/media/SVG.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/specials/SpecialListfiles.php (modified) (history)
  • /branches/wmf/1.17wmf1/languages/messages/MessagesEn.php (modified) (history)
  • /branches/wmf/1.17wmf1/languages/messages/MessagesQqq.php (modified) (history)
  • /branches/wmf/1.17wmf1/maintenance/language/messageTypes.inc (modified) (history)
  • /branches/wmf/1.17wmf1/maintenance/language/messages.inc (modified) (history)
  • /branches/wmf/1.17wmf1/skins/chick/main.css (modified) (history)
  • /branches/wmf/1.17wmf1/skins/common/mwsuggest.js (modified) (history)
  • /branches/wmf/1.17wmf1/skins/common/shared.css (modified) (history)
  • /branches/wmf/1.17wmf1/skins/modern/main.css (modified) (history)
  • /branches/wmf/1.17wmf1/skins/monobook/main.css (modified) (history)
  • /branches/wmf/1.17wmf1/skins/vector/screen.css (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/maintenance/language/messages.inc
@@ -2698,6 +2698,7 @@
26992699 'exif-gpsareainformation',
27002700 'exif-gpsdatestamp',
27012701 'exif-gpsdifferential',
 2702+ 'exif-objectname',
27022703 ),
27032704 'exif-values' => array(
27042705 'exif-make-value',
Index: branches/wmf/1.17wmf1/maintenance/language/messageTypes.inc
@@ -601,4 +601,5 @@
602602 'exif-gpsdestdistance-n',
603603 'exif-gpsdirection-t',
604604 'exif-gpsdirection-m',
 605+ 'exif-objectname',
605606 );
Index: branches/wmf/1.17wmf1/skins/chick/main.css
@@ -47,6 +47,7 @@
4848 background: none;
4949 font-weight: normal;
5050 margin: 0;
 51+ overflow: hidden;
5152 padding-top: 0.5em;
5253 padding-bottom: 0.17em;
5354 border-bottom: 1px solid #aaaaaa;
@@ -279,7 +280,6 @@
280281 /* thumbnails */
281282 div.thumb {
282283 margin-bottom: 0.5em;
283 - border-style: solid; border-color: white;
284284 width: auto;
285285 }
286286 div.thumbinner {
@@ -312,13 +312,12 @@
313313 div.tright {
314314 clear: right;
315315 float: right;
316 - border-width: 0.5em 0 0.8em 1.4em;
 316+ margin: 0.5em 0 1.3em 1.4em;
317317 }
318318 div.tleft {
319319 float: left;
320320 clear: left;
321 - margin-right:0.5em;
322 - border-width: 0.5em 1.4em 0.8em 0;
 321+ margin: 0.5em 1.4em 1.3em 0;
323322 }
324323 img.thumbborder {
325324 border: 1px solid #dddddd;
Index: branches/wmf/1.17wmf1/skins/monobook/main.css
@@ -117,6 +117,7 @@
118118 background: none;
119119 font-weight: normal;
120120 margin: 0;
 121+ overflow: hidden;
121122 padding-top: .5em;
122123 padding-bottom: .17em;
123124 border-bottom: 1px solid #aaa;
@@ -404,8 +405,6 @@
405406 /* thumbnails */
406407 div.thumb {
407408 margin-bottom: .5em;
408 - border-style: solid;
409 - border-color: white;
410409 width: auto;
411410 }
412411 div.thumbinner {
@@ -439,13 +438,12 @@
440439 div.tright {
441440 clear: right;
442441 float: right;
443 - border-width: .5em 0 .8em 1.4em;
 442+ margin: .5em 0 1.3em 1.4em;
444443 }
445444 div.tleft {
446445 float: left;
447446 clear: left;
448 - margin-right: .5em;
449 - border-width: .5em 1.4em .8em 0;
 447+ margin: .5em 1.4em 1.3em 0;
450448 }
451449 img.thumbborder {
452450 border: 1px solid #dddddd;
@@ -1270,4 +1268,4 @@
12711269 /* Tooltips are outside of the normal body code, so this helps make the size of the text sensible */
12721270 .tipsy {
12731271 font-size: 127%;
1274 -}
\ No newline at end of file
 1272+}
Index: branches/wmf/1.17wmf1/skins/modern/main.css
@@ -333,6 +333,10 @@
334334 border-bottom: solid 1px #003366;
335335 }
336336
 337+h1, h2, h3, h4, h5, h6 {
 338+ overflow: hidden;
 339+}
 340+
337341 #preftoc {
338342 width: 100%;
339343 margin: 0 0 0 0;
@@ -487,8 +491,6 @@
488492 /* thumbnails */
489493 div.thumb {
490494 margin-bottom: .5em;
491 - border-style: solid;
492 - border-color: white;
493495 width: auto;
494496 }
495497 div.thumbinner {
@@ -522,13 +524,12 @@
523525 div.tright {
524526 clear: right;
525527 float: right;
526 - border-width: .5em 0 .8em 1.4em;
 528+ margin: .5em 0 .8em 1.4em;
527529 }
528530 div.tleft {
529531 float: left;
530532 clear: left;
531 - margin-right: .5em;
532 - border-width: .5em 1.4em .8em 0;
 533+ margin: .5em 1.4em .8em 0;
533534 }
534535 img.thumbborder {
535536 border: 1px solid #dddddd;
@@ -879,4 +880,4 @@
880881 /* Tooltips are outside of the normal body code, so this helps make the size of the text sensible */
881882 .tipsy {
882883 font-size: 130%;
883 -}
\ No newline at end of file
 884+}
Index: branches/wmf/1.17wmf1/skins/common/shared.css
@@ -9,6 +9,10 @@
1010 .mw-plusminus-neg { color: #8b0000; } /* dark red */
1111 .mw-plusminus-null { color: #aaa; } /* gray */
1212
 13+/* Links to redirects appear italicized on [[Special:AllPages]],
 14+ and in category listings */
 15+.allpagesredirect, .redirect-in-category { font-style: italic; }
 16+
1317 /* Comment and username portions of RC entries */
1418 span.comment {
1519 font-style: italic;
Property changes on: branches/wmf/1.17wmf1/skins/common/shared.css
___________________________________________________________________
Modified: svn:mergeinfo
1620 Merged /trunk/phase3/skins/common/shared.css:r78964,79086-79087,79091,82004,82025,82048,82070,82073,82081,82085,82088,82090-82091,82096,82100-82101,82114,82128-82131,82146
Index: branches/wmf/1.17wmf1/skins/common/mwsuggest.js
@@ -7,6 +7,12 @@
88 * by Robert Stojnic (April 2008)
99 */
1010
 11+// Make sure wgMWSuggestTemplate is defined
 12+if ( !mw.config.exists( 'wgMWSuggestTemplate' ) ) {
 13+ mw.config.set( 'wgMWSuggestTemplate', mw.config.get( 'wgServer' ) + mw.config.get( 'wgScriptPath' )
 14+ + "/api.php?action=opensearch\x26search={searchTerms}\x26namespace={namespaces}\x26suggest" );
 15+}
 16+
1117 // search_box_id -> Results object
1218 window.os_map = {};
1319 // cached data, url -> json_text
@@ -40,6 +46,9 @@
4147 window.os_container_max_width = 2;
4248 // currently active animation timer
4349 window.os_animation_timer = null;
 50+// whether MWSuggest is enabled. Set to false when os_MWSuggestDisable() is called
 51+window.os_enabled = true;
 52+
4453 /**
4554 * <datalist> is a new HTML5 element that allows you to manually supply
4655 * suggestion lists and have them rendered according to the right platform
@@ -99,7 +108,11 @@
100109
101110 /** Initialization, call upon page onload */
102111 window.os_MWSuggestInit = function() {
103 - for( i = 0; i < os_autoload_inputs.length; i++ ) {
 112+ if ( !window.os_enabled ) {
 113+ return;
 114+ }
 115+
 116+ for( var i = 0; i < os_autoload_inputs.length; i++ ) {
104117 var id = os_autoload_inputs[i];
105118 var form = os_autoload_forms[i];
106119 element = document.getElementById( id );
@@ -109,6 +122,25 @@
110123 }
111124 };
112125
 126+/* Teardown, called when things like SimpleSearch need to disable MWSuggest */
 127+window.os_MWSuggestTeardown = function() {
 128+ for( var i = 0; i < os_autoload_inputs.length; i++ ) {
 129+ var id = os_autoload_inputs[i];
 130+ var form = os_autoload_forms[i];
 131+ element = document.getElementById( id );
 132+ if( element != null ) {
 133+ os_teardownHandlers( id, form, element );
 134+ }
 135+ }
 136+};
 137+
 138+/* Call this to disable MWSuggest. Works regardless of whether MWSuggest has been initialized already. */
 139+window.os_MWSuggestDisable = function() {
 140+ window.os_MWSuggestTeardown();
 141+ window.os_enabled = false;
 142+}
 143+
 144+
113145 /** Init Result objects and event handlers */
114146 window.os_initHandlers = function( name, formname, element ) {
115147 var r = new os_Results( name, formname );
@@ -118,20 +150,20 @@
119151 return;
120152 }
121153 // event handler
122 - os_hookEvent( element, 'keyup', function( event ) { os_eventKeyup( event ); } );
123 - os_hookEvent( element, 'keydown', function( event ) { os_eventKeydown( event ); } );
124 - os_hookEvent( element, 'keypress', function( event ) { os_eventKeypress( event ); } );
 154+ os_hookEvent( element, 'keyup', os_eventKeyup );
 155+ os_hookEvent( element, 'keydown', os_eventKeydown );
 156+ os_hookEvent( element, 'keypress', os_eventKeypress );
125157 if ( !os_use_datalist ) {
126158 // These are needed for the div hack to hide it if the user blurs.
127 - os_hookEvent( element, 'blur', function( event ) { os_eventBlur( event ); } );
128 - os_hookEvent( element, 'focus', function( event ) { os_eventFocus( event ); } );
 159+ os_hookEvent( element, 'blur', os_eventBlur );
 160+ os_hookEvent( element, 'focus', os_eventFocus );
129161 // We don't want browser auto-suggestions interfering with our div, but
130162 // autocomplete must be on for datalist to work (at least in Opera
131163 // 10.10).
132164 element.setAttribute( 'autocomplete', 'off' );
133165 }
134166 // stopping handler
135 - os_hookEvent( formElement, 'submit', function( event ) { return os_eventOnsubmit( event ); } );
 167+ os_hookEvent( formElement, 'submit', os_eventOnsubmit );
136168 os_map[name] = r;
137169 // toggle link
138170 if( document.getElementById( r.toggle ) == null ) {
@@ -159,6 +191,30 @@
160192
161193 };
162194
 195+window.os_teardownHandlers = function( name, formname, element ) {
 196+ var formElement = document.getElementById( formname );
 197+ if( !formElement ) {
 198+ // Older browsers (Opera 8) cannot get form elements
 199+ return;
 200+ }
 201+
 202+ os_unhookEvent( element, 'keyup', os_eventKeyup );
 203+ os_unhookEvent( element, 'keydown', os_eventKeydown );
 204+ os_unhookEvent( element, 'keypress', os_eventKeypress );
 205+ if ( !os_use_datalist ) {
 206+ // These are needed for the div hack to hide it if the user blurs.
 207+ os_unhookEvent( element, 'blur', os_eventBlur );
 208+ os_unhookEvent( element, 'focus', os_eventFocus );
 209+ // We don't want browser auto-suggestions interfering with our div, but
 210+ // autocomplete must be on for datalist to work (at least in Opera
 211+ // 10.10).
 212+ element.removeAttribute( 'autocomplete' );
 213+ }
 214+ // stopping handler
 215+ os_unhookEvent( formElement, 'submit', os_eventOnsubmit );
 216+};
 217+
 218+
163219 window.os_hookEvent = function( element, hookName, hookFunct ) {
164220 if ( element.addEventListener ) {
165221 element.addEventListener( hookName, hookFunct, false );
@@ -167,6 +223,14 @@
168224 }
169225 };
170226
 227+window.os_unhookEvent = function( element, hookName, hookFunct ) {
 228+ if ( element.removeEventListener ) {
 229+ element.removeEventListener( hookName, hookFunct, false );
 230+ } else if ( element.detachEvent ) {
 231+ element.detachEvent( 'on' + hookName, hookFunct );
 232+ }
 233+}
 234+
171235 /********************
172236 * Keyboard events
173237 ********************/
@@ -414,7 +478,7 @@
415479 var r = os_timer.r;
416480 var query = os_timer.query;
417481 os_timer = null;
418 - var path = wgMWSuggestTemplate.replace( "{namespaces}", os_getNamespaces( r ) )
 482+ var path = mw.config.get( 'wgMWSuggestTemplate' ).replace( "{namespaces}", os_getNamespaces( r ) )
419483 .replace( "{dbname}", wgDBname )
420484 .replace( "{searchTerms}", os_encodeQuery( query ) );
421485
Index: branches/wmf/1.17wmf1/skins/vector/screen.css
@@ -710,6 +710,7 @@
711711 background: none;
712712 font-weight: normal;
713713 margin: 0;
 714+ overflow: hidden;
714715 padding-top: .5em;
715716 padding-bottom: .17em;
716717 border-bottom: 1px solid #aaa;
@@ -903,8 +904,6 @@
904905 /* Thumbnails */
905906 div.thumb {
906907 margin-bottom: .5em;
907 - border-style: solid;
908 - border-color: white;
909908 width: auto;
910909 background-color: transparent;
911910 }
@@ -940,14 +939,13 @@
941940 div.tright {
942941 clear: right;
943942 float: right;
944 - border-width: .5em 0 .8em 1.4em;
 943+ margin: .5em 0 1.3em 1.4em;
945944 }
946945 /* @noflip */
947946 div.tleft {
948947 float: left;
949948 clear: left;
950 - margin-right: .5em;
951 - border-width: .5em 1.4em .8em 0;
 949+ margin: .5em 1.4em 1.3em 0;
952950 }
953951 img.thumbborder {
954952 border: 1px solid #dddddd;
@@ -1204,4 +1202,4 @@
12051203 /* Tooltips are outside of the normal body code, so this helps make the size of the text sensible */
12061204 .tipsy {
12071205 font-size: 0.8em;
1208 -}
\ No newline at end of file
 1206+}
Property changes on: branches/wmf/1.17wmf1/skins/vector/screen.css
___________________________________________________________________
Modified: svn:mergeinfo
12091207 Merged /trunk/phase3/skins/vector/screen.css:r78964,79086-79087,79091,82004,82025,82048,82070,82073,82081,82085,82088,82090-82091,82096,82100-82101,82114,82128-82131,82146
Index: branches/wmf/1.17wmf1/extensions/DoubleWiki/DoubleWiki_body.php
@@ -121,7 +121,8 @@
122122 $left_chunk = '';
123123 $right_chunk = '';
124124
125 - for ( $i=0 ; $i < count($left_slices) ; $i++ ) {
 125+ $leftSliceCount = count( $left_slices );
 126+ for ( $i=0 ; $i < $leftSliceCount; $i++ ) {
126127
127128 // some slices might be empty
128129 if( $left_slices[$i] == '' ) {
@@ -167,7 +168,8 @@
168169
169170 $left_chunk = '';
170171 $right_chunk = '';
171 - for($l=0; $l < count( $left_bits ) ; $l++ ) {
 172+ $leftBitCount = count( $left_bits );
 173+ for($l=0; $l < $leftBitCount ; $l++ ) {
172174 $body .=
173175 "<tr><td valign=\"top\" style=\"vertical-align:100%;padding-right: 0.5em\" lang=\"{$left_lang}\">"
174176 ."<div style=\"width:35em; margin:0px auto\">\n".$left_bits[$l]."</div>"
@@ -201,7 +203,8 @@
202204 preg_match_all( $this->tags, $text, $m, PREG_SET_ORDER);
203205 $counter = 0;
204206 $out = '';
205 - for($i=0; $i < count($m); $i++){
 207+ $matchCount = count( $m );
 208+ for( $i = 0; $i < $matchCount; $i++ ){
206209 $t = $m[$i][0];
207210 if( substr( $t, 0, 2) != "</" ) {
208211 $counter++;
@@ -253,7 +256,8 @@
254257 for( $i=0 ; $i < $n ; $i++) {
255258 preg_match_all( $this->tags, $left_slices[$i], $m, PREG_SET_ORDER);
256259 $counter = 0;
257 - for($k=0 ; $k < count($m) ; $k++) {
 260+ $matchCount = count( $m );
 261+ for($k=0 ; $k < $matchCount ; $k++) {
258262 $t = $m[$k];
259263 if( substr( $t[0], 0, 2) != "</" ) {
260264 $counter++;
Index: branches/wmf/1.17wmf1/extensions/Vector/modules/ext.vector.simpleSearch.js
@@ -1,11 +1,5 @@
22 /* JavaScript for SimpleSearch extension */
33
4 -// XXX: Disable mwsuggest.js's effect on searchInput
5 -if ( typeof os_autoload_inputs !== 'undefined' && os_autoload_forms !== 'undefined' ) {
6 - os_autoload_inputs = [];
7 - os_autoload_forms = [];
8 -}
9 -
104 $( document ).ready( function() {
115
126 // Compatibility map
@@ -34,6 +28,11 @@
3529 return true;
3630 }
3731
 32+ // Disable MWSuggest if loaded
 33+ if ( window.os_MWSuggestDisable ) {
 34+ window.os_MWSuggestDisable();
 35+ }
 36+
3837 // Placeholder text for SimpleSearch box
3938 $( 'div#simpleSearch > input#searchInput' )
4039 .attr( 'placeholder', mediaWiki.msg( 'vector-simplesearch-search' ) )
Property changes on: branches/wmf/1.17wmf1/extensions/Vector/modules/ext.vector.simpleSearch.js
___________________________________________________________________
Modified: svn:mergeinfo
4140 Merged /trunk/extensions/Vector/modules/ext.vector.simpleSearch.js:r78964,79086-79087,79091,82004,82025,82048,82070,82073,82081,82085,82088,82090-82091,82096,82100-82101,82114,82128-82131,82146
Index: branches/wmf/1.17wmf1/extensions/PagedTiffHandler/PagedTiffHandler.i18n.php
@@ -28,7 +28,7 @@
2929 'tiff_size_error' => 'The reported file size does not match the actual file size.',
3030 'tiff_script_detected' => 'The uploaded file contains scripts.',
3131 'tiff_bad_file' => 'The uploaded file contains errors: $1',
32 - 'tiff-file-info-size' => 'page $5, $1 × $2 pixel, file size: $3, MIME type: $4',
 32+ 'tiff-file-info-size' => 'page $5, $1 × $2 pixels, file size: $3, MIME type: $4',
3333 );
3434
3535 /** Message documentation (Message documentation)
Index: branches/wmf/1.17wmf1/extensions/CodeReview/CodeReview.i18n.php
@@ -162,8 +162,10 @@
163163 'codereview-email-body3' => 'User "$1" changed the status of $2.
164164
165165 Old Status: $3
166 -New Status: $4',
 166+New Status: $4
167167
 168+Full URL: $5',
 169+
168170 'codereview-email-subj4' => '[$1 $2]: New comment added, and revision status changed',
169171 'codereview-email-body4' => 'User "$1" changed the status of $2.
170172
@@ -205,6 +207,7 @@
206208 'right-codereview-set-status' => 'Change revisions status',
207209 'right-codereview-signoff' => 'Sign off on revisions',
208210 'right-codereview-link-user' => 'Link authors to wiki users',
 211+ 'right-codereview-associate' => 'Manage revision associations',
209212
210213 'specialpages-group-developer' => 'Developer tools',
211214 );
Index: branches/wmf/1.17wmf1/extensions/CodeReview/ui/CodeRevisionCommitter.php
@@ -117,18 +117,18 @@
118118 $dbw->commit();
119119
120120 if ( $statusChanged || $commentAdded ) {
 121+ $url = $this->mRev->getFullUrl( $commentId );
121122 if ( $statusChanged && $commentAdded ) {
122 - $url = $this->mRev->getFullUrl( $commentId );
123123 $this->mRev->emailNotifyUsersOfChanges( 'codereview-email-subj4', 'codereview-email-body4',
124 - $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->mOldStatus, $this->mRev->mStatus,
125 - $url, $this->text
 124+ $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->mOldStatus,
 125+ $this->mRev->getStatus(), $url, $this->text
126126 );
127127 } else if ( $statusChanged ) {
128128 $this->mRev->emailNotifyUsersOfChanges( 'codereview-email-subj3', 'codereview-email-body3',
129 - $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->mOldStatus, $this->mRev->mStatus
 129+ $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->mOldStatus,
 130+ $this->mRev->getStatus(), $url
130131 );
131132 } else if ( $commentAdded ) {
132 - $url = $this->mRev->getFullUrl( $commentId );
133133 $this->mRev->emailNotifyUsersOfChanges( 'codereview-email-subj', 'codereview-email-body',
134134 $wgUser->getName(), $url, $this->mRev->getIdStringUnique(), $this->text
135135 );
Index: branches/wmf/1.17wmf1/extensions/CodeReview/ui/CodeRevisionView.php
@@ -136,12 +136,23 @@
137137 "<div class='mw-codereview-diff' id='mw-codereview-diff'>" . $diffHtml . "</div>\n";
138138 $html .= $this->formatImgDiff();
139139 }
 140+
140141 # Show sign-offs
141 - $html .= "<h2 id='code-signoffs'>" . wfMsgHtml( 'code-signoffs' ) .
142 - "</h2>\n" . $this->formatSignoffs( $this->canSignoff() );
 142+ $userCanSignoff = $this->canSignoff();
 143+ $signOffs = $this->mRev->getSignoffs();
 144+ if ( count( $signOffs ) || $userCanSignoff ) {
 145+ $html .= "<h2 id='code-signoffs'>" . wfMsgHtml( 'code-signoffs' ) .
 146+ "</h2>\n" . $this->formatSignoffs( $signOffs, $userCanSignoff );
 147+ }
 148+
143149 # Show code relations
144 - $html .= "<h2 id='code-references'>" . wfMsgHtml( 'code-references' ) .
145 - "</h2>\n" . $this->formatReferences( $this->canAssociate() );
 150+ $userCanAssociate = $this->canAssociate();
 151+ $references = $this->mRev->getReferences();
 152+ if ( count( $references ) || $userCanAssociate ) {
 153+ $html .= "<h2 id='code-references'>" . wfMsgHtml( 'code-references' ) .
 154+ "</h2>\n" . $this->formatReferences( $references, $userCanAssociate );
 155+ }
 156+
146157 # Add revision comments
147158 if ( $comments ) {
148159 $html .= "<h2 id='code-comments'>" . wfMsgHtml( 'code-comments' ) .
@@ -446,9 +457,9 @@
447458 * @param $showButtons bool Whether the buttons to strike and submit sign-offs should be shown
448459 * @return string HTML
449460 */
450 - protected function formatSignoffs( $showButtons ) {
 461+ protected function formatSignoffs( $signOffs, $showButtons ) {
451462 $signoffs = implode( "\n",
452 - array_map( array( $this, 'formatSignoffInline' ), $this->mRev->getSignoffs() )
 463+ array_map( array( $this, 'formatSignoffInline' ), $signOffs )
453464 );
454465 $header = '<th></th>';
455466 $header .= '<th>' . wfMsgHtml( 'code-signoff-field-user' ) . '</th>';
@@ -481,9 +492,9 @@
482493 return "<ul class='mw-codereview-changes'>$changes</ul>";
483494 }
484495
485 - protected function formatReferences( $showButtons ) {
 496+ protected function formatReferences( $references, $showButtons ) {
486497 $refs = implode( "\n",
487 - array_map( array( $this, 'formatReferenceInline' ), $this->mRev->getReferences() )
 498+ array_map( array( $this, 'formatReferenceInline' ), $references )
488499 );
489500 $header = '<th></th>';
490501 $header .= '<th>' . wfMsgHtml( 'code-field-id' ) . '</th>';
Index: branches/wmf/1.17wmf1/extensions/NewUserMessage/NewUserMessage.class.php
@@ -79,16 +79,16 @@
8080 }
8181
8282 /**
83 - * Produce the text of the message.
 83+ * Produce the template that contains the text of the message.
8484 * @returns String
8585 */
8686 static function fetchText() {
87 - $text = self::fetchTemplateIfExists( wfMsg( 'newusermessage-template-body' ) );
 87+ $template = wfMsg( 'newusermessage-template-body' );
8888 // Fall back if necessary to the old template
89 - if ( !$text ) {
90 - $text = self::fetchTemplateIfExists( wfMsg( 'newusermessage-template' ) );
 89+ if ( !$template ) {
 90+ $template = wfMsg( 'newusermessage-template' );
9191 }
92 - return $text;
 92+ return $template;
9393 }
9494
9595 /**
@@ -123,9 +123,9 @@
124124 $substitute = wfMsgForContent( 'newusermessage-substitute' );
125125
126126 if ( $substitute ) {
127 - $str = "{{subst:{{$str}}}|realName=$realName|name=$name}}";
 127+ $str = '{{subst:' . "$str|realName=$realName|name=$name}}";
128128 } else {
129 - $str = "{{{$str}|realName=$realName|name=$name}}";
 129+ $str = '{{' . "$str|realName=$realName|name=$name}}";
130130 }
131131
132132 if ( $preparse ) {
Index: branches/wmf/1.17wmf1/extensions/CategoryTree/CategoryTreeFunctions.php
@@ -767,7 +767,9 @@
768768 # The title must be in the category namespace
769769 # Ignore a leading Category: if there is one
770770 $t = Title::newFromText( $title, NS_CATEGORY );
771 - if ( $t && ( $t->getNamespace() != NS_CATEGORY || $t->getInterWiki() != '' ) ) {
 771+ if ( !$t || $t->getNamespace() != NS_CATEGORY || $t->getInterWiki() != '' ) {
 772+ // If we were given something like "Wikipedia:Foo" or "Template:",
 773+ // try it again but forced.
772774 $title = "Category:$title";
773775 $t = Title::newFromText( $title );
774776 }
Property changes on: branches/wmf/1.17wmf1/extensions/CategoryTree/CategoryTreeFunctions.php
___________________________________________________________________
Modified: svn:mergeinfo
775777 Merged /trunk/extensions/CategoryTree/CategoryTreeFunctions.php:r78964,79086-79087,79091,82004,82025,82048,82070,82073,82081,82085,82088,82090-82091,82096,82100-82101,82114,82128-82131,82146
Index: branches/wmf/1.17wmf1/extensions/CentralAuth/centralauth.js
@@ -21,7 +21,9 @@
2222 methodHint.style.left = wgCursorPosition.x + 'px';
2323 methodHint.style.top = wgCursorPosition.y + 'px';
2424 methodHint.setAttribute( 'onclick', 'hideMethodHint()' );
25 - document.getElementById( 'globalWrapper' ).appendChild( methodHint );
 25+
 26+ var content = document.getElementById('content') || document.getElementById('mw_content') || document.body;
 27+ content.appendChild( methodHint );
2628 }
2729
2830 function hideMethodHint() {
Index: branches/wmf/1.17wmf1/includes/json/FormatJson.php
@@ -44,11 +44,11 @@
4545 */
4646 public static function decode( $value, $assoc = false ) {
4747 if ( !function_exists( 'json_decode' ) ) {
48 - $json = new Services_JSON();
 48+ if( $assoc )
 49+ $json = new Services_JSON( SERVICES_JSON_LOOSE_TYPE );
 50+ else
 51+ $json = new Services_JSON();
4952 $jsonDec = $json->decode( $value );
50 - if( $assoc ) {
51 - $jsonDec = wfObjectToArray( $jsonDec );
52 - }
5353 return $jsonDec;
5454 } else {
5555 return json_decode( $value, $assoc );
Index: branches/wmf/1.17wmf1/includes/PrefixSearch.php
@@ -78,6 +78,9 @@
7979 protected static function specialSearch( $search, $limit ) {
8080 global $wgContLang;
8181
 82+ # normalize searchKey, so aliases with spaces can be found - bug 25675
 83+ $search = str_replace( ' ', '_', $search );
 84+
8285 $searchKey = $wgContLang->caseFold( $search );
8386
8487 // Unlike SpecialPage itself, we want the canonical forms of both
Index: branches/wmf/1.17wmf1/includes/GlobalFunctions.php
@@ -3501,10 +3501,13 @@
35023502 }
35033503
35043504 /* Recursively converts the parameter (an object) to an array with the same data */
3505 -function wfObjectToArray( $object, $recursive = true ) {
 3505+function wfObjectToArray( $objOrArray, $recursive = true ) {
35063506 $array = array();
3507 - foreach ( get_object_vars( $object ) as $key => $value ) {
3508 - if ( is_object( $value ) && $recursive ) {
 3507+ if( is_object( $objOrArray ) ) {
 3508+ $objOrArray = get_object_vars( $objOrArray );
 3509+ }
 3510+ foreach ( $objOrArray as $key => $value ) {
 3511+ if ( $recursive && ( is_object( $value ) || is_array( $value ) ) ) {
35093512 $value = wfObjectToArray( $value );
35103513 }
35113514
Property changes on: branches/wmf/1.17wmf1/includes/GlobalFunctions.php
___________________________________________________________________
Modified: svn:mergeinfo
35123515 Merged /trunk/phase3/includes/GlobalFunctions.php:r78964,79086-79087,79091,82004,82025,82048,82070,82073,82081,82085,82088,82090-82091,82096,82100-82101,82114,82128-82131,82146
Index: branches/wmf/1.17wmf1/includes/WatchedItem.php
@@ -84,6 +84,8 @@
8585 * @return bool
8686 */
8787 public function removeWatch() {
 88+ wfProfileIn( __METHOD__ );
 89+
8890 $success = false;
8991 $dbw = wfGetDB( DB_MASTER );
9092 $dbw->delete( 'watchlist',
@@ -112,6 +114,8 @@
113115 if ( $dbw->affectedRows() ) {
114116 $success = true;
115117 }
 118+
 119+ wfProfileOut( __METHOD__ );
116120 return $success;
117121 }
118122
Index: branches/wmf/1.17wmf1/includes/media/SVG.php
@@ -206,11 +206,22 @@
207207
208208 // Sort fields into visible and collapsed
209209 $visibleFields = $this->visibleMetadataFields();
 210+
 211+ // Rename fields to be compatible with exif, so that
 212+ // the labels for these fields work.
 213+ $conversion = array( 'width' => 'imagewidth',
 214+ 'height' => 'imagelength',
 215+ 'description' => 'imagedescription',
 216+ 'title' => 'objectname',
 217+ );
210218 foreach ( $metadata as $name => $value ) {
211219 $tag = strtolower( $name );
 220+ if ( isset( $conversion[$tag] ) ) {
 221+ $tag = $conversion[$tag];
 222+ }
212223 self::addMeta( $result,
213224 in_array( $tag, $visibleFields ) ? 'visible' : 'collapsed',
214 - 'svg',
 225+ 'exif',
215226 $tag,
216227 $value
217228 );
Index: branches/wmf/1.17wmf1/includes/Title.php
@@ -3945,7 +3945,8 @@
39463946 }
39473947 // Check cache first
39483948 $uid = $user->getId();
3949 - if ( isset( $this->mNotificationTimestamp[$uid] ) ) {
 3949+ // avoid isset here, as it'll return false for null entries
 3950+ if ( array_key_exists( $uid, $this->mNotificationTimestamp ) ) {
39503951 return $this->mNotificationTimestamp[$uid];
39513952 }
39523953 if ( !$uid || !$wgShowUpdatedMarker ) {
Property changes on: branches/wmf/1.17wmf1/includes/Title.php
___________________________________________________________________
Modified: svn:mergeinfo
39533954 Merged /trunk/phase3/includes/Title.php:r78964,79086-79087,79091,82004,82025,82048,82070,82073,82081,82085,82088,82090-82091,82096,82100-82101,82114,82128-82131,82146
Index: branches/wmf/1.17wmf1/includes/specials/SpecialListfiles.php
@@ -213,7 +213,7 @@
214214 Xml::fieldset( wfMsg( 'listfiles' ) ) .
215215 Html::openElement( 'table', array( 'id' => 'mw-listfiles-table' ) ) .
216216 Xml::buildForm( $inputForm, 'table_pager_limit_submit' ) .
217 - $this->getHiddenFields( array( 'limit', 'ilsearch', 'username' ) ) .
 217+ $this->getHiddenFields( array( 'limit', 'ilsearch', 'user' ) ) .
218218 Html::closeElement( 'table' ) .
219219 Html::closeElement( 'fieldset' ) .
220220 Html::closeElement( 'form' ) . "\n";
Index: branches/wmf/1.17wmf1/languages/messages/MessagesQqq.php
@@ -3295,6 +3295,7 @@
32963296 See also Wikipedia on [http://en.wikipedia.org/wiki/Focal_length#In_photography focal length].',
32973297 'exif-gpslatitude' => '{{Identical|Latitude}}',
32983298 'exif-gpslongitude' => '{{Identical|Longitude}}',
 3299+'exif-objectname' => 'This message labels a field in the image metadata table that is a short name or title for the image. (As compared to {{msg-mw|exif-imagedescription}} which is a long description of the image).',
32993300
33003301 # EXIF attributes
33013302 'exif-compression-6' => '{{optional}}',
Index: branches/wmf/1.17wmf1/languages/messages/MessagesEn.php
@@ -3771,6 +3771,7 @@
37723772 'exif-gpsareainformation' => 'Name of GPS area',
37733773 'exif-gpsdatestamp' => 'GPS date',
37743774 'exif-gpsdifferential' => 'GPS differential correction',
 3775+'exif-objectname' => 'Short title',
37753776
37763777 # Make & model, can be wikified in order to link to the camera and model name
37773778 'exif-make-value' => '$1', # do not translate or duplicate this message to other languages

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78964Adding default styling for redirects...krinkle15:07, 24 December 2010
r79086Room around thumbs should be margin, not a transparent border....krinkle20:45, 27 December 2010
r79087Adding overflow:hidden to heading elements in Vector....krinkle20:53, 27 December 2010
r79091* Follow-up r79087. Applying to other skins that have similar article styling...krinkle23:23, 27 December 2010
r82004* (bug 27333) Fix repetitive last-seen time queries on page history...brion01:10, 12 February 2011
r82025Since mwsuggest.js is no longer used in core, wgMWSuggestTemplate is not defi...krinkle20:08, 12 February 2011
r82048(Follow-up r75968) r75968 started extracting and displaying some svg metadata...bawolff04:55, 13 February 2011
r82070Add profiling to removeWatchreedy19:12, 13 February 2011
r82073Bug 27383 - TIFF file description pages state "pixel" rather than "pixels"raymond19:50, 13 February 2011
r82081* (bug 27377) Fix Special:Listfile user selector when initial form parameters...brion21:20, 13 February 2011
r82085* (bug 26856) Fix category tree AJAX expansion and inline use for category na...brion22:19, 13 February 2011
r82088Further fixes for NewUserMessage: newusermessage contains the template name, ...btongminh22:37, 13 February 2011
r82090* (bug 26250, bug 23817) Fix wfObjectToArray() to descend into arrays; fixes ...brion23:04, 13 February 2011
r82091* (bug 23817, bug 26250) User Service_JSON's native associative array mode in...brion23:08, 13 February 2011
r82096* (bug 25675) Fix search suggestions for Special: pages with spaces...brion00:32, 14 February 2011
r82100count() in for() is slow, just use a temporary variabledemon01:36, 14 February 2011
r82101* (bug 23320) Fix CentralAuth method popup on Vector skin...brion01:45, 14 February 2011
r82114* (bug 27399) right-codereview-associate message is missingreedy15:46, 14 February 2011
r82128Improve message from r82114 per Nikerabbitreedy19:53, 14 February 2011
r82129(bug 27402) Add support for disabling MWSuggestcatrope19:55, 14 February 2011
r82130(Bug 27402) Disable MWSuggest when SimpleSearch is enabled. Requires MWSugges...catrope19:55, 14 February 2011
r82131Just telling users that a revision status has changed without giving them a l...reedy19:55, 14 February 2011
r82146* (bug 27407) Hide "Sign offs" section when empty for users without the coder...reedy21:17, 14 February 2011

Status & tagging log