Index: trunk/extensions/InterfaceConcurrency/InterfaceConcurrency.hooks.php |
— | — | @@ -6,6 +6,7 @@ |
7 | 7 | * |
8 | 8 | * @param $output OutputPage |
9 | 9 | * @param $skin Skin |
| 10 | + * @return bool |
10 | 11 | */ |
11 | 12 | public static function beforePageDisplay( &$output, &$skin ) { |
12 | 13 | $output->addModules( array( 'jquery.interfaceConcurrency' ) ); |
— | — | @@ -16,6 +17,7 @@ |
17 | 18 | * Runs InterfaceConcurrency schema updates |
18 | 19 | * |
19 | 20 | * @param $updater DatabaseUpdater |
| 21 | + * @return bool |
20 | 22 | */ |
21 | 23 | public static function onLoadExtensionSchemaUpdates( $updater = null ) { |
22 | 24 | $dir = dirname( __FILE__ ) . '/sql'; |
Index: trunk/extensions/InterfaceConcurrency/includes/ConcurrencyCheck.php |
— | — | @@ -215,6 +215,10 @@ |
216 | 216 | return $dbw->affectedRows(); |
217 | 217 | } |
218 | 218 | |
| 219 | + /** |
| 220 | + * @param $keys array |
| 221 | + * @return array |
| 222 | + */ |
219 | 223 | public function status( $keys ) { |
220 | 224 | global $wgMemc, $wgDBtype; |
221 | 225 | $dbw = $this->dbw; |
— | — | @@ -247,7 +251,6 @@ |
248 | 252 | // If it's time to go to the database, go ahead and expire old rows. |
249 | 253 | $this->expire(); |
250 | 254 | |
251 | | - |
252 | 255 | // Why LOCK IN SHARE MODE, you might ask? To avoid a race condition: Otherwise, it's possible for |
253 | 256 | // a checkin and/or checkout to occur between this select and the value being stored in cache, which |
254 | 257 | // makes for an incorrect cache. This, in turn, could make checkout() above (which uses the cache) |
— | — | @@ -324,6 +327,9 @@ |
325 | 328 | $this->user = $user; |
326 | 329 | } |
327 | 330 | |
| 331 | + /** |
| 332 | + * @param $expirationTime int|null |
| 333 | + */ |
328 | 334 | public function setExpirationTime( $expirationTime = null ) { |
329 | 335 | global $wgConcurrency; |
330 | 336 | |
— | — | @@ -345,7 +351,7 @@ |
346 | 352 | /** |
347 | 353 | * Check to make sure a record ID is numeric, throw an exception if not. |
348 | 354 | * |
349 | | - * @var $record Integer |
| 355 | + * @param $record Integer |
350 | 356 | * @throws ConcurrencyCheckBadRecordIdException |
351 | 357 | * @return boolean |
352 | 358 | */ |
Index: trunk/extensions/InterfaceConcurrency/modules/jquery.interfaceConcurrency/jquery.interfaceConcurrency.js |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | token: mw.user.tokens.get( 'editToken' ), |
37 | 37 | format: 'json' |
38 | 38 | }, params); |
39 | | - |
| 39 | + |
40 | 40 | return $.ajax( { |
41 | 41 | type: 'POST', |
42 | 42 | url: mw.util.wikiScript( 'api' ), |
— | — | @@ -43,13 +43,14 @@ |
44 | 44 | success: function( data ){ |
45 | 45 | if ( typeof callback === 'function' ){ |
46 | 46 | if ( data && data.concurrency.result ) { |
47 | | - callback( data.concurrency.result ); |
| 47 | + callback( data.concurrency.result ); |
48 | 48 | } |
49 | 49 | } |
50 | 50 | }, |
51 | 51 | dataType: 'json' |
52 | 52 | } ); |
53 | 53 | } |
54 | | - }; |
| 54 | + }; |
55 | 55 | |
56 | | -})( jQuery ); |
\ No newline at end of file |
| 56 | +})( jQuery ); |
| 57 | + |