r112647 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112646‎ | r112647 | r112648 >
Date:21:21, 28 February 2012
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_19/phase3 (modified) (history)
  • /branches/REL1_19/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /branches/REL1_19/phase3/includes (modified) (history)
  • /branches/REL1_19/phase3/includes/ImagePage.php (modified) (history)
  • /branches/REL1_19/phase3/includes/MessageBlobStore.php (modified) (history)
  • /branches/REL1_19/phase3/includes/Pager.php (modified) (history)
  • /branches/REL1_19/phase3/includes/filerepo/backend/TempFSFile.php (modified) (history)
  • /branches/REL1_19/phase3/includes/resourceloader/ResourceLoaderContext.php (modified) (history)
  • /branches/REL1_19/phase3/resources/jquery.ui/themes/vector/jquery.ui.datepicker.css (modified) (history)
  • /branches/REL1_19/phase3/resources/mediawiki.action/mediawiki.action.edit.js (modified) (history)
  • /branches/REL1_19/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: branches/REL1_19/phase3/RELEASE-NOTES-1.19
@@ -122,11 +122,17 @@
123123 * sha1 xml tag added to XML dump file.
124124 * (bug 33646) Badtitle error page now emits a 400 HTTP status.
125125 * Special:MovePage now has a dropdown menu for namespaces.
 126+* (bug 33952) Refactor mw.toolbar to allow dynamic additions at any time.
126127
127128 === Bug fixes in 1.19 ===
128129 * $wgUploadNavigationUrl should be used for file redlinks if.
129130 $wgUploadMissingFileUrl is not set. The first was used for this
130131 until the second was introduced in 1.17.
 132+* BREAKING CHANGE: Style rules for wikitable are now more specific and prevent
 133+ inheritance to nested tables which caused various issues (bug 30485 and bug
 134+ 33434). If your wiki has overriden rules for ".wikitable", please revise them and
 135+ adjust where neccecary. For comparison, use the "table.wikitable" section in
 136+ skins/common/shared.css as base.
131137 * (bug 27894) Move 'editondblclick' event listener down from body to
132138 div#bodyContent.
133139 * (bug 30172) The check for posix_isatty() in maintenance scripts did not detect
@@ -214,8 +220,6 @@
215221 for backward compatibility.
216222 * (bug 31469) Make sure tracking category messages expand variables like
217223 {{NAMESPACE}} relative to correct title.
218 -* (bug 30485 and bug 33434) Style rules for wikitable are now more specific and
219 - prevent inheritance to nested tables which caused various issues.
220224 * (bug 33454) ISO-8601 week-based year number (format character 'o') is now
221225 calculated correctly with respect to timezone.
222226 * (bug 32219) InstantCommons now fetches content from Wikimedia Commons using
Index: branches/REL1_19/phase3/includes/ImagePage.php
@@ -108,8 +108,6 @@
109109 }
110110 }
111111
112 - $this->showRedirectedFromHeader();
113 -
114112 if ( $wgShowEXIF && $this->displayImg->exists() ) {
115113 // @todo FIXME: Bad interface, see note on MediaHandler::formatMetadata().
116114 $formattedMetadata = $this->displayImg->formatMetadata();
Index: branches/REL1_19/phase3/includes/filerepo/backend/TempFSFile.php
@@ -11,7 +11,7 @@
1212 * @ingroup FileBackend
1313 */
1414 class TempFSFile extends FSFile {
15 - protected $canDelete = true; // garbage collect the temp file
 15+ protected $canDelete = false; // bool; garbage collect the temp file
1616
1717 /** @var Array of active temp files to purge on shutdown */
1818 protected static $instances = array();
@@ -41,6 +41,7 @@
4242 }
4343 }
4444 $tmpFile = new self( $path );
 45+ $tmpFile->canDelete = true; // safely instantiated
4546 return $tmpFile;
4647 }
4748
Index: branches/REL1_19/phase3/includes/resourceloader/ResourceLoaderContext.php
@@ -63,7 +63,9 @@
6464 $this->only = $request->getVal( 'only' );
6565 $this->version = $request->getVal( 'version' );
6666
67 - if ( !$this->skin ) {
 67+ $skinnames = Skin::getSkinNames();
 68+ // If no skin is specified, or we don't recognize the skin, use the default skin
 69+ if ( !$this->skin || !isset( $skinnames[$this->skin] ) ) {
6870 $this->skin = $wgDefaultSkin;
6971 }
7072 }
Index: branches/REL1_19/phase3/includes/MessageBlobStore.php
@@ -350,12 +350,7 @@
351351 $messages = array();
352352
353353 foreach ( $module->getMessages() as $key ) {
354 - $messages[$key] =
355 - Sanitizer::normalizeCharReferences(
356 - Sanitizer::removeHTMLtags(
357 - wfMsgExt( $key, array( 'language' => $lang ) )
358 - )
359 - );
 354+ $messages[$key] = wfMsgExt( $key, array( 'language' => $lang ) );
360355 }
361356
362357 return FormatJson::encode( (object)$messages );
Index: branches/REL1_19/phase3/includes/Pager.php
@@ -472,7 +472,7 @@
473473 }
474474
475475 # Don't announce the limit everywhere if it's the default
476 - $urlLimit = $this->mLimit == $this->mDefaultLimit ? '' : $this->mLimit;
 476+ $urlLimit = $this->mLimit == $this->mDefaultLimit ? null : $this->mLimit;
477477
478478 if ( $this->mIsFirst ) {
479479 $prev = false;
Property changes on: branches/REL1_19/phase3/includes
___________________________________________________________________
Modified: svn:mergeinfo
480480 Merged /trunk/phase3/includes:r112408,112451,112456,112474,112526,112533-112534,112538,112567
Index: branches/REL1_19/phase3/resources/mediawiki.action/mediawiki.action.edit.js
@@ -3,12 +3,17 @@
44 var currentFocused = $( '#wpTextbox1' );
55
66 mw.toolbar = {
7 - $toolbar : [],
 7+ $toolbar : false,
88 buttons : [],
 9+ isReady : false,
910 // If you want to add buttons, use
1011 // mw.toolbar.addButton( imageFile, speedTip, tagOpen, tagClose, sampleText, imageId, selectText );
1112 addButton : function() {
12 - this.buttons.push( [].slice.call( arguments ) );
 13+ if ( this.isReady ) {
 14+ this.insertButton.apply( this, arguments );
 15+ } else {
 16+ this.buttons.push( [].slice.call( arguments ) );
 17+ }
1318 },
1419 insertButton : function( imageFile, speedTip, tagOpen, tagClose, sampleText, imageId, selectText ) {
1520 var image = $('<img>', {
@@ -42,18 +47,20 @@
4348 init : function() {},
4449
4550 onReady : function() {
46 - mw.toolbar.$toolbar = $( '#toolbar' );
 51+ this.$toolbar = $( '#toolbar' );
 52+ this.isReady = true;
4753 // Legacy
4854 // Merge buttons from mwCustomEditButtons
4955 var buttons = [].concat( this.buttons, window.mwCustomEditButtons );
5056 for ( var i = 0; i < buttons.length; i++ ) {
5157 if ( $.isArray( buttons[i] ) ) {
5258 // Passes our button array as arguments
53 - mw.toolbar.insertButton.apply( this, buttons[i] );
 59+ this.insertButton.apply( this, buttons[i] );
5460 } else {
5561 // Legacy mwCustomEditButtons is an object
5662 var c = buttons[i];
57 - mw.toolbar.insertButton( c.imageFile, c.speedTip, c.tagOpen, c.tagClose, c.sampleText, c.imageId, c.selectText );
 63+ this.insertButton( c.imageFile, c.speedTip, c.tagOpen,
 64+ c.tagClose, c.sampleText, c.imageId, c.selectText );
5865 }
5966 }
6067 return true;
Index: branches/REL1_19/phase3/resources/mediawiki/mediawiki.js
@@ -615,6 +615,7 @@
616616 j -= 1;
617617 }
618618 }
 619+ throw e;
619620 }
620621 }
621622
@@ -770,7 +771,6 @@
771772 console.log( 'mw.loader::execute> Exception thrown by ' + module + ': ' + e.message );
772773 }
773774 registry[module].state = 'error';
774 - throw e;
775775 }
776776 }
777777
@@ -1183,7 +1183,8 @@
11841184 * "text/javascript"; if no type is provided, text/javascript is assumed.
11851185 * @param async {Boolean} (optional) If true, load modules asynchronously
11861186 * even if document ready has not yet occurred. If false (default),
1187 - * block before document ready and load async after
 1187+ * block before document ready and load async after. If not set, true will
 1188+ * be assumed if loading a URL, and false will be assumed otherwise.
11881189 */
11891190 load: function ( modules, type, async ) {
11901191 var filtered, m;
@@ -1196,6 +1197,10 @@
11971198 if ( typeof modules === 'string' ) {
11981199 // Support adding arbitrary external scripts
11991200 if ( /^(https?:)?\/\//.test( modules ) ) {
 1201+ if ( async === undefined ) {
 1202+ // Assume async for bug 34542
 1203+ async = true;
 1204+ }
12001205 if ( type === 'text/css' ) {
12011206 $( 'head' ).append( $( '<link>', {
12021207 rel: 'stylesheet',
Index: branches/REL1_19/phase3/resources/jquery.ui/themes/vector/jquery.ui.datepicker.css
@@ -1,6 +1,6 @@
22 /* Datepicker
33 ----------------------------------*/
4 -.ui-datepicker { width: 17em; padding: .2em .2em 0; }
 4+.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
55 .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
66 .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
77 .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
Property changes on: branches/REL1_19/phase3
___________________________________________________________________
Modified: svn:mergeinfo
88 Merged /trunk/phase3:r112384,112400,112408,112451,112456,112474,112526,112533-112534,112538,112567

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112384fixing bug 34609 - datepicker should always be set to display:none by defaultkaldari03:02, 25 February 2012
r112400release-notes 1.19: Mark .wikitable change as BREAKING-CHANGESkrinkle16:36, 25 February 2012
r112408Fixes bug 34715 Image redirects show the "redirected from" subtitle twice....hartman20:30, 25 February 2012
r112451* Fix r111983 (bug 34662): make mw.toolbar.addButton() work even after DOM ready...tstarling22:46, 26 February 2012
r112456Release notes for added feature in r112451 which fixed bug 33952krinkle23:47, 26 February 2012
r112474(bug 34736) empty limit on special pages causes navigation issues...hashar10:17, 27 February 2012
r112526Revert r110045: well-meaning but broken attempt to apply preemptive XSS prote...brion21:52, 27 February 2012
r112533(bug 34542) Calling mw.loader.load('http://someurlhere') sometimes calls docu...catrope22:33, 27 February 2012
r112534In ResourceLoaderContext, normalize invalid skin names to $wgDefaultSkin . Th...catrope22:41, 27 February 2012
r112538Dummy proof TempFSFile purging when the constructor is used directly to avoid...aaron23:00, 27 February 2012
r112567Fix scoping in r112451: isReady was accidentally used as a global variablecatrope02:36, 28 February 2012

Status & tagging log