Merge "In maintenance/postgres/tables.sql, the profiling table should be defined...
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 15 Oct 2013 22:16:48 +0000 (22:16 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 15 Oct 2013 22:16:48 +0000 (22:16 +0000)
resources/mediawiki/mediawiki.Title.js

index 346ab33..b236019 100644 (file)
         *     var title = mw.Title.newFromImg( $( 'img:first' ) );
         *
         * @static
-        * @param {HTMLImageElement|jQuery} img The image to use as a base.
-        * @return {mw.Title|null} The file title - null if unsuccessful.
+        * @param {HTMLElement|jQuery} img The image to use as a base
+        * @return {mw.Title|null} The file title or null if unsuccessful
         */
        Title.newFromImg = function ( img ) {
                var matches, i, regex, src, decodedSrc,
 
                        recount = regexes.length;
 
-               img = img.jquery ? img.get( 0 ) : img;
-
-               src = img.src;
+               src = img.jquery ? img[0].src : img.src;
 
                matches = src.match( thumbPhpRegex );