r89083 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89082‎ | r89083 | r89084 >
Date:03:13, 29 May 2011
Author:krinkle
Status:resolved
Tags:
Comment:
Introducing mw.libs, moving JpegMeta into it.
* Reverts/re-do's r88794 and r88796.
** mediawiki.util.js no longer extends itself but is defined once.
** mediawiki.util.jpegmeta no longer extends mw.util but is installed as an object property of mw.libs
* Empty placeholder defined in mediawiki.js
* Removed the redundant 'mw' argument from the IIFE around mediawiki.libs.jpegmeta.js


* Fixed all usages in /mediawiki/trunk/*
** http://toolserver.org/~krinkle/wikimedia-svn-search/view.php?id=205&hash=ddc0908eef111558816c9fe1c775f7c1
Modified paths:
  • /trunk/phase3/resources/Resources.php (modified) (history)
  • /trunk/phase3/resources/mediawiki.special/mediawiki.special.upload.js (modified) (history)
  • /trunk/phase3/resources/mediawiki.util/mediawiki.util.js (modified) (history)
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.js
@@ -3,7 +3,7 @@
44 */
55 ( function( $, mw ) {
66
7 - mw.util = $.extend( mw.util || {}, {
 7+ mw.util = {
88
99 /* Initialisation */
1010 /**
@@ -586,7 +586,7 @@
587587 && address.search( /::/ ) != -1 && address.search( /::.*::/ ) == -1;
588588 }
589589
590 - } );
 590+ };
591591
592592 mw.util.init();
593593
Index: trunk/phase3/resources/Resources.php
@@ -456,8 +456,8 @@
457457 'jquery.placeholder',
458458 ),
459459 ),
460 - 'mediawiki.util.jpegmeta' => array(
461 - 'scripts' => 'resources/mediawiki.util/mediawiki.util.jpegmeta.js',
 460+ 'mediawiki.libs.jpegmeta' => array(
 461+ 'scripts' => 'resources/mediawiki.libs/mediawiki.libs.jpegmeta.js',
462462 ),
463463 'mediawiki.action.history' => array(
464464 'scripts' => 'resources/mediawiki.action/mediawiki.action.history.js',
@@ -529,7 +529,7 @@
530530 'size-gigabytes',
531531 'largefileserver',
532532 ),
533 - 'dependencies' => array( 'mediawiki.util.jpegmeta' ),
 533+ 'dependencies' => array( 'mediawiki.libs.jpegmeta' ),
534534 ),
535535
536536 'mediawiki.language' => array(
Index: trunk/phase3/resources/mediawiki.special/mediawiki.special.upload.js
@@ -131,7 +131,7 @@
132132 img.src = dataURL;
133133 }, mw.config.get( 'wgFileCanRotate' ) ? function ( data ) {
134134 try {
135 - meta = mw.util.jpegmeta( data, file.fileName );
 135+ meta = mw.libs.jpegmeta( data, file.fileName );
136136 meta._binary_data = null;
137137 } catch ( e ) {
138138 meta = null;
Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -214,12 +214,12 @@
215215 */
216216 this.log = function() { };
217217
218 - /*
219 - * Make the Map-class publicly available
 218+ /**
 219+ * @var constructor Make the Map-class publicly available.
220220 */
221221 this.Map = Map;
222222
223 - /*
 223+ /**
224224 * List of configuration values
225225 *
226226 * Dummy placeholder. Initiated in startUp module as a new instance of mw.Map().
@@ -228,6 +228,13 @@
229229 */
230230 this.config = null;
231231
 232+ /**
 233+ * @var object
 234+ *
 235+ * Empty object that plugins can be installed in.
 236+ */
 237+ this.libs = {};
 238+
232239 /*
233240 * Localization system
234241 */

Follow-up revisions

RevisionCommit summaryAuthorDate
r89084Fix r89083: Actually add the directorykrinkle03:23, 29 May 2011
r89335properly move the jpegmeta.js file from util to libs....hashar13:44, 2 June 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r88794Use $.extend() in mw.util and mw.util.jpegmeta so they can be loaded in eithe...catrope15:19, 25 May 2011
r88796Fix syntax error in r88794catrope15:28, 25 May 2011

Status & tagging log