r73165 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73164‎ | r73165 | r73166 >
Date:22:36, 16 September 2010
Author:tparscal
Status:ok
Tags:
Comment:
Added version method to mediaWiki.loader
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -728,6 +728,18 @@
729729 }
730730 };
731731
 732+ /**
 733+ * Gets the version of a module
 734+ *
 735+ * @param string module name of module to get version for
 736+ */
 737+ this.version = function( module ) {
 738+ if ( module in registry && 'version' in registry[module] ) {
 739+ return formatVersionNumber( registry[module].version );
 740+ }
 741+ return null;
 742+ }
 743+
732744 /* Cache document ready status */
733745
734746 $(document).ready( function() { ready = true; } );

Status & tagging log