r109445 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109444‎ | r109445 | r109446 >
Date:22:23, 18 January 2012
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Fixup/complete method documentation

Remove trailing whitespace from jquery.interfaceConcurrency.js
Modified paths:
  • /trunk/extensions/InterfaceConcurrency/InterfaceConcurrency.hooks.php (modified) (history)
  • /trunk/extensions/InterfaceConcurrency/includes/ConcurrencyCheck.php (modified) (history)
  • /trunk/extensions/InterfaceConcurrency/modules/jquery.interfaceConcurrency/jquery.interfaceConcurrency.js (modified) (history)

Diff [purge]

Index: trunk/extensions/InterfaceConcurrency/InterfaceConcurrency.hooks.php
@@ -6,6 +6,7 @@
77 *
88 * @param $output OutputPage
99 * @param $skin Skin
 10+ * @return bool
1011 */
1112 public static function beforePageDisplay( &$output, &$skin ) {
1213 $output->addModules( array( 'jquery.interfaceConcurrency' ) );
@@ -16,6 +17,7 @@
1718 * Runs InterfaceConcurrency schema updates
1819 *
1920 * @param $updater DatabaseUpdater
 21+ * @return bool
2022 */
2123 public static function onLoadExtensionSchemaUpdates( $updater = null ) {
2224 $dir = dirname( __FILE__ ) . '/sql';
Index: trunk/extensions/InterfaceConcurrency/includes/ConcurrencyCheck.php
@@ -215,6 +215,10 @@
216216 return $dbw->affectedRows();
217217 }
218218
 219+ /**
 220+ * @param $keys array
 221+ * @return array
 222+ */
219223 public function status( $keys ) {
220224 global $wgMemc, $wgDBtype;
221225 $dbw = $this->dbw;
@@ -247,7 +251,6 @@
248252 // If it's time to go to the database, go ahead and expire old rows.
249253 $this->expire();
250254
251 -
252255 // Why LOCK IN SHARE MODE, you might ask? To avoid a race condition: Otherwise, it's possible for
253256 // a checkin and/or checkout to occur between this select and the value being stored in cache, which
254257 // makes for an incorrect cache. This, in turn, could make checkout() above (which uses the cache)
@@ -324,6 +327,9 @@
325328 $this->user = $user;
326329 }
327330
 331+ /**
 332+ * @param $expirationTime int|null
 333+ */
328334 public function setExpirationTime( $expirationTime = null ) {
329335 global $wgConcurrency;
330336
@@ -345,7 +351,7 @@
346352 /**
347353 * Check to make sure a record ID is numeric, throw an exception if not.
348354 *
349 - * @var $record Integer
 355+ * @param $record Integer
350356 * @throws ConcurrencyCheckBadRecordIdException
351357 * @return boolean
352358 */
Index: trunk/extensions/InterfaceConcurrency/modules/jquery.interfaceConcurrency/jquery.interfaceConcurrency.js
@@ -35,7 +35,7 @@
3636 token: mw.user.tokens.get( 'editToken' ),
3737 format: 'json'
3838 }, params);
39 -
 39+
4040 return $.ajax( {
4141 type: 'POST',
4242 url: mw.util.wikiScript( 'api' ),
@@ -43,13 +43,14 @@
4444 success: function( data ){
4545 if ( typeof callback === 'function' ){
4646 if ( data && data.concurrency.result ) {
47 - callback( data.concurrency.result );
 47+ callback( data.concurrency.result );
4848 }
4949 }
5050 },
5151 dataType: 'json'
5252 } );
5353 }
54 - };
 54+ };
5555
56 -})( jQuery );
\ No newline at end of file
 56+})( jQuery );
 57+

Comments

#Comment by Nikerabbit (talk | contribs)   09:17, 19 January 2012

Wouldn't call that as complete, but whatever.

Status & tagging log