r74283 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74282‎ | r74283 | r74284 >
Date:22:17, 4 October 2010
Author:neilk
Status:ok
Tags:
Comment:
mergeinfo commit
Modified paths:
  • /branches/uploadwizard/extensions/UploadWizard/resources/mw.UploadWizard.js (modified) (history)
  • /branches/uploadwizard/phase3 (modified) (history)
  • /branches/uploadwizard/phase3/COPYING (modified) (history)
  • /branches/uploadwizard/phase3/CREDITS (modified) (history)
  • /branches/uploadwizard/phase3/FAQ (modified) (history)
  • /branches/uploadwizard/phase3/HISTORY (modified) (history)
  • /branches/uploadwizard/phase3/INSTALL (modified) (history)
  • /branches/uploadwizard/phase3/README (modified) (history)
  • /branches/uploadwizard/phase3/RELEASE-NOTES (modified) (history)
  • /branches/uploadwizard/phase3/StartProfiler.sample (modified) (history)
  • /branches/uploadwizard/phase3/UPGRADE (modified) (history)
  • /branches/uploadwizard/phase3/api.php (modified) (history)
  • /branches/uploadwizard/phase3/api.php5 (modified) (history)
  • /branches/uploadwizard/phase3/bin (modified) (history)
  • /branches/uploadwizard/phase3/cache (modified) (history)
  • /branches/uploadwizard/phase3/config (modified) (history)
  • /branches/uploadwizard/phase3/docs (modified) (history)
  • /branches/uploadwizard/phase3/images (modified) (history)
  • /branches/uploadwizard/phase3/img_auth.php (modified) (history)
  • /branches/uploadwizard/phase3/img_auth.php5 (modified) (history)
  • /branches/uploadwizard/phase3/index.php (modified) (history)
  • /branches/uploadwizard/phase3/index.php5 (modified) (history)
  • /branches/uploadwizard/phase3/languages (modified) (history)
  • /branches/uploadwizard/phase3/load.php (modified) (history)
  • /branches/uploadwizard/phase3/load.php5 (modified) (history)
  • /branches/uploadwizard/phase3/maintenance (modified) (history)
  • /branches/uploadwizard/phase3/math (modified) (history)
  • /branches/uploadwizard/phase3/opensearch_desc.php (modified) (history)
  • /branches/uploadwizard/phase3/opensearch_desc.php5 (modified) (history)
  • /branches/uploadwizard/phase3/php5.php5 (modified) (history)
  • /branches/uploadwizard/phase3/profileinfo.php (modified) (history)
  • /branches/uploadwizard/phase3/redirect.php (modified) (history)
  • /branches/uploadwizard/phase3/redirect.php5 (modified) (history)
  • /branches/uploadwizard/phase3/redirect.phtml (modified) (history)
  • /branches/uploadwizard/phase3/resources (modified) (history)
  • /branches/uploadwizard/phase3/serialized (modified) (history)
  • /branches/uploadwizard/phase3/skins (modified) (history)
  • /branches/uploadwizard/phase3/thumb.php (modified) (history)
  • /branches/uploadwizard/phase3/thumb.php5 (modified) (history)
  • /branches/uploadwizard/phase3/trackback.php (modified) (history)
  • /branches/uploadwizard/phase3/trackback.php5 (modified) (history)
  • /branches/uploadwizard/phase3/wiki.phtml (modified) (history)

Diff [purge]

Property changes on: branches/uploadwizard/phase3/profileinfo.php
___________________________________________________________________
Modified: svn:mergeinfo
11 Reverse-merged /trunk/phase3/profileinfo.php:r73549-74018,74020-74029
22 Merged /branches/uploadwizard/extensions/profileinfo.php:r73550-74029
Property changes on: branches/uploadwizard/phase3/load.php
___________________________________________________________________
Modified: svn:mergeinfo
33 Reverse-merged /trunk/phase3/load.php:r73549-74018,74020-74029
44 Merged /branches/uploadwizard/extensions/load.php:r73550-74029
Property changes on: branches/uploadwizard/phase3/config
___________________________________________________________________
Modified: svn:mergeinfo
55 Reverse-merged /trunk/phase3/config:r73549-74018,74020-74029
66 Merged /branches/uploadwizard/extensions/config:r73550-74029
Property changes on: branches/uploadwizard/phase3/thumb.php
___________________________________________________________________
Modified: svn:mergeinfo
77 Reverse-merged /trunk/phase3/thumb.php:r73549-74018,74020-74029
88 Merged /branches/uploadwizard/extensions/thumb.php:r73550-74029
Property changes on: branches/uploadwizard/phase3/languages
___________________________________________________________________
Modified: svn:mergeinfo
99 Reverse-merged /trunk/phase3/languages:r73549-74018,74020-74029
1010 Merged /branches/uploadwizard/extensions/languages:r73550-74029
Property changes on: branches/uploadwizard/phase3/RELEASE-NOTES
___________________________________________________________________
Modified: svn:mergeinfo
1111 Merged /branches/uploadwizard/extensions/RELEASE-NOTES:r73550-74029
Property changes on: branches/uploadwizard/phase3/FAQ
___________________________________________________________________
Modified: svn:mergeinfo
1212 Reverse-merged /trunk/phase3/FAQ:r73549-74018,74020-74029
1313 Merged /branches/uploadwizard/extensions/FAQ:r73550-74029
Property changes on: branches/uploadwizard/phase3/resources
___________________________________________________________________
Modified: svn:mergeinfo
1414 Reverse-merged /trunk/phase3/resources:r73549-74018,74020-74029
1515 Merged /branches/uploadwizard/extensions/resources:r73550-74029
Property changes on: branches/uploadwizard/phase3/StartProfiler.sample
___________________________________________________________________
Modified: svn:mergeinfo
1616 Reverse-merged /trunk/phase3/StartProfiler.sample:r73549-74018,74020-74029
1717 Merged /branches/uploadwizard/extensions/StartProfiler.sample:r73550-74029
Property changes on: branches/uploadwizard/phase3/maintenance
___________________________________________________________________
Modified: svn:mergeinfo
1818 Reverse-merged /trunk/phase3/maintenance:r73549-74018,74020-74029
1919 Merged /branches/uploadwizard/extensions/maintenance:r73550-74029
Property changes on: branches/uploadwizard/phase3/php5.php5
___________________________________________________________________
Modified: svn:mergeinfo
2020 Reverse-merged /trunk/phase3/php5.php5:r73549-74018,74020-74029
2121 Merged /branches/uploadwizard/extensions/php5.php5:r73550-74029
Property changes on: branches/uploadwizard/phase3/UPGRADE
___________________________________________________________________
Modified: svn:mergeinfo
2222 Reverse-merged /trunk/phase3/UPGRADE:r73549-74018,74020-74029
2323 Merged /branches/uploadwizard/extensions/UPGRADE:r73550-74029
Property changes on: branches/uploadwizard/phase3/skins
___________________________________________________________________
Modified: svn:mergeinfo
2424 Merged /branches/uploadwizard/extensions/skins:r73550-74029
Property changes on: branches/uploadwizard/phase3/docs
___________________________________________________________________
Modified: svn:mergeinfo
2525 Reverse-merged /trunk/phase3/docs:r73549-74018,74020-74029
2626 Merged /branches/uploadwizard/extensions/docs:r73550-74029
Property changes on: branches/uploadwizard/phase3/math
___________________________________________________________________
Modified: svn:mergeinfo
2727 Reverse-merged /trunk/phase3/math:r73549-74018,74020-74029
2828 Merged /branches/uploadwizard/extensions/math:r73550-74029
Property changes on: branches/uploadwizard/phase3/CREDITS
___________________________________________________________________
Modified: svn:mergeinfo
2929 Reverse-merged /trunk/phase3/CREDITS:r73549-74018,74020-74029
3030 Merged /branches/uploadwizard/extensions/CREDITS:r73550-74029
Property changes on: branches/uploadwizard/phase3/opensearch_desc.php5
___________________________________________________________________
Modified: svn:mergeinfo
3131 Reverse-merged /trunk/phase3/opensearch_desc.php5:r73549-74018,74020-74029
3232 Merged /branches/uploadwizard/extensions/opensearch_desc.php5:r73550-74029
Property changes on: branches/uploadwizard/phase3/trackback.php5
___________________________________________________________________
Modified: svn:mergeinfo
3333 Reverse-merged /trunk/phase3/trackback.php5:r73549-74018,74020-74029
3434 Merged /branches/uploadwizard/extensions/trackback.php5:r73550-74029
Property changes on: branches/uploadwizard/phase3/HISTORY
___________________________________________________________________
Modified: svn:mergeinfo
3535 Reverse-merged /trunk/phase3/HISTORY:r73549-74018,74020-74029
3636 Merged /branches/uploadwizard/extensions/HISTORY:r73550-74029
Property changes on: branches/uploadwizard/phase3/cache
___________________________________________________________________
Modified: svn:mergeinfo
3737 Reverse-merged /trunk/phase3/cache:r73549-74018,74020-74029
3838 Merged /branches/uploadwizard/extensions/cache:r73550-74029
Property changes on: branches/uploadwizard/phase3/images
___________________________________________________________________
Modified: svn:mergeinfo
3939 Reverse-merged /trunk/phase3/images:r73549-74018,74020-74029
4040 Merged /branches/uploadwizard/extensions/images:r73550-74029
Property changes on: branches/uploadwizard/phase3/INSTALL
___________________________________________________________________
Modified: svn:mergeinfo
4141 Reverse-merged /trunk/phase3/INSTALL:r73549-74018,74020-74029
4242 Merged /branches/uploadwizard/extensions/INSTALL:r73550-74029
Property changes on: branches/uploadwizard/phase3/bin
___________________________________________________________________
Modified: svn:mergeinfo
4343 Reverse-merged /trunk/phase3/bin:r73549-74018,74020-74029
4444 Merged /branches/uploadwizard/extensions/bin:r73550-74029
Property changes on: branches/uploadwizard/phase3/img_auth.php5
___________________________________________________________________
Modified: svn:mergeinfo
4545 Reverse-merged /trunk/phase3/img_auth.php5:r73549-74018,74020-74029
4646 Merged /branches/uploadwizard/extensions/img_auth.php5:r73550-74029
Property changes on: branches/uploadwizard/phase3/COPYING
___________________________________________________________________
Modified: svn:mergeinfo
4747 Reverse-merged /trunk/phase3/COPYING:r73549-74018,74020-74029
4848 Merged /branches/uploadwizard/extensions/COPYING:r73550-74029
Property changes on: branches/uploadwizard/phase3/trackback.php
___________________________________________________________________
Modified: svn:mergeinfo
4949 Reverse-merged /trunk/phase3/trackback.php:r73549-74018,74020-74029
5050 Merged /branches/uploadwizard/extensions/trackback.php:r73550-74029
Property changes on: branches/uploadwizard/phase3/opensearch_desc.php
___________________________________________________________________
Modified: svn:mergeinfo
5151 Reverse-merged /trunk/phase3/opensearch_desc.php:r73549-74018,74020-74029
5252 Merged /branches/uploadwizard/extensions/opensearch_desc.php:r73550-74029
Property changes on: branches/uploadwizard/phase3/redirect.php5
___________________________________________________________________
Modified: svn:mergeinfo
5353 Reverse-merged /trunk/phase3/redirect.php5:r73549-74018,74020-74029
5454 Merged /branches/uploadwizard/extensions/redirect.php5:r73550-74029
Property changes on: branches/uploadwizard/phase3/index.php5
___________________________________________________________________
Modified: svn:mergeinfo
5555 Reverse-merged /trunk/phase3/index.php5:r73549-74018,74020-74029
5656 Merged /branches/uploadwizard/extensions/index.php5:r73550-74029
Property changes on: branches/uploadwizard/phase3/img_auth.php
___________________________________________________________________
Modified: svn:mergeinfo
5757 Reverse-merged /trunk/phase3/img_auth.php:r73549-74018,74020-74029
5858 Merged /branches/uploadwizard/extensions/img_auth.php:r73550-74029
Property changes on: branches/uploadwizard/phase3/redirect.phtml
___________________________________________________________________
Modified: svn:mergeinfo
5959 Reverse-merged /trunk/phase3/redirect.phtml:r73549-74018,74020-74029
6060 Merged /branches/uploadwizard/extensions/redirect.phtml:r73550-74029
Property changes on: branches/uploadwizard/phase3/api.php5
___________________________________________________________________
Modified: svn:mergeinfo
6161 Reverse-merged /trunk/phase3/api.php5:r73549-74018,74020-74029
6262 Merged /branches/uploadwizard/extensions/api.php5:r73550-74029
Property changes on: branches/uploadwizard/phase3/wiki.phtml
___________________________________________________________________
Modified: svn:mergeinfo
6363 Reverse-merged /trunk/phase3/wiki.phtml:r73549-74018,74020-74029
6464 Merged /branches/uploadwizard/extensions/wiki.phtml:r73550-74029
Property changes on: branches/uploadwizard/phase3/redirect.php
___________________________________________________________________
Modified: svn:mergeinfo
6565 Reverse-merged /trunk/phase3/redirect.php:r73549-74018,74020-74029
6666 Merged /branches/uploadwizard/extensions/redirect.php:r73550-74029
Property changes on: branches/uploadwizard/phase3/thumb.php5
___________________________________________________________________
Modified: svn:mergeinfo
6767 Reverse-merged /trunk/phase3/thumb.php5:r73549-74018,74020-74029
6868 Merged /branches/uploadwizard/extensions/thumb.php5:r73550-74029
Property changes on: branches/uploadwizard/phase3/load.php5
___________________________________________________________________
Modified: svn:mergeinfo
6969 Reverse-merged /trunk/phase3/load.php5:r73549-74018,74020-74029
7070 Merged /branches/uploadwizard/extensions/load.php5:r73550-74029
Property changes on: branches/uploadwizard/phase3/serialized
___________________________________________________________________
Modified: svn:mergeinfo
7171 Reverse-merged /trunk/phase3/serialized:r73549-74018,74020-74029
7272 Merged /branches/uploadwizard/extensions/serialized:r73550-74029
Property changes on: branches/uploadwizard/phase3/README
___________________________________________________________________
Modified: svn:mergeinfo
7373 Reverse-merged /trunk/phase3/README:r73549-74018,74020-74029
7474 Merged /branches/uploadwizard/extensions/README:r73550-74029
Property changes on: branches/uploadwizard/phase3/index.php
___________________________________________________________________
Modified: svn:mergeinfo
7575 Reverse-merged /trunk/phase3/index.php:r73549-74018,74020-74029
7676 Merged /branches/uploadwizard/extensions/index.php:r73550-74029
Property changes on: branches/uploadwizard/phase3/api.php
___________________________________________________________________
Modified: svn:mergeinfo
7777 Reverse-merged /trunk/phase3/api.php:r73549-74018,74020-74029
7878 Merged /branches/uploadwizard/extensions/api.php:r73550-74029
Property changes on: branches/uploadwizard/phase3
___________________________________________________________________
Modified: svn:mergeinfo
7979 Merged /trunk/phase3/extensions:r73544-74018
8080 Merged /branches/uploadwizard/extensions:r73550-74029*
Index: branches/uploadwizard/extensions/UploadWizard/resources/mw.UploadWizard.js
@@ -198,29 +198,31 @@
199199 * Fetch a thumbnail for this upload of the desired width.
200200 * It is assumed you don't call this until it's been transported.
201201 *
 202+ * The success message from the API should have included enough information to make thumbnails already.
 203+ *
 204+ * But, if we don't have the thumbnail, try to fetch it by invoking a thumbnail URL pattern.
202205 * We create the thumbnail by passing a special URL which creates the thumbnail on the fly and returns the image contents.
203206 * If the original image URL is http://foo.com/bar/baz/xyz.jpg, and the desired width is 120 pixels,
204207 * the thumbnail URL is http://foo.com/bar/baz/120px-xyz.jpg
 208+ * N.B. in general thumbnails have the same mime-type as the original, but NOT ALWAYS. Getting a thumbnail in this way may
 209+ * cause conflicts between extension & mime-type.
205210 *
206211 * @param width - desired width of thumbnail (height will scale to match)
207212 * @param callback - callback to execute once thumbnail has been obtained -- must accept Image object
208213 */
209214 getThumbnail: function( width, callback ) {
210 - var _this = this;
211 - key = "width" + width;
212 - if ( mw.isDefined( _this._thumbnails[key] ) && typeof _this._thumbnails[key] === 'Image' ) {
213 - callback( _this._thumbnails[key] );
 215+ var key = "width" + width;
 216+ if ( mw.isDefined( this._thumbnails[key] ) && typeof this._thumbnails[key] === 'Image' ) {
 217+ callback( this._thumbnails[key] );
214218 } else {
215 - var thumbUrl = _this.imageinfo.url.replace( /(.*)/([^\/]+)$/, "$1/" + width + "px-" + $2 );
216 - _this._thumbnails[ "width" + width ] = new Image( thumbUrl );
217 - var image = new Image();
218 - image.onload = function(){
219 - _this._thumbnails[key] = image;
220 - callback( image );
 219+ var thumbUrl = this.imageinfo.url.replace( /(.*)\/([^\/]+)$/, "$1/" + width + "px-$2" );
 220+ this._thumbnails[key] = new Image();
 221+ var _this = this;
 222+ this._thumbnails[key].onload = function(){
 223+ callback( _this._thumbnails[key] );
221224 }
222 - image.src = thumbUrl;
 225+ this._thumbnails[key].src = thumbUrl;
223226 }
224 -
225227 },
226228
227229

Status & tagging log