Change-Id: Id64e7ec8f22cc74926ff374ca207bf19552398aa
/**
* @param $context ResourceLoaderContext
/**
* @param $context ResourceLoaderContext
- * @return string Javascript code
+ * @return string: Javascript code
*/
public function getScript( ResourceLoaderContext $context ) {
global $wgContLang;
*/
public function getScript( ResourceLoaderContext $context ) {
global $wgContLang;
$hash = md5( serialize( $forms ) );
$result = $cache->get( $key );
$hash = md5( serialize( $forms ) );
$result = $cache->get( $key );
- if ( is_array( $result ) ) {
- if ( $result['hash'] === $hash ) {
- return $result['timestamp'];
- }
+ if ( is_array( $result ) && $result['hash'] === $hash ) {
+ return $result['timestamp'];
}
$timestamp = wfTimestamp();
}
$timestamp = wfTimestamp();
- $cache->set( $key, array( 'hash' => $hash, 'timestamp' => $timestamp ) );
+ $cache->set( $key, array(
+ 'hash' => $hash,
+ 'timestamp' => $timestamp,
+ ) );