Break user javascript client side caching with the revision id instead of $wgStyleVersion. This way updated version will be automatically served.
NS_USER,
$userpage->getDBkey() . '/' . $name . '.js'
);
- if ( $scriptpage && $scriptpage->exists() ) {
+ if ( $scriptpage && $scriptpage->exists() && ( $scriptpage->getLength() > 0 ) ) {
$userjs = $scriptpage->getLocalURL( 'action=raw&ctype=' . $wgJsMimeType );
- $this->addScriptFile( $userjs );
+ $this->addScriptFile( $userjs, $scriptpage->getLatestRevID() );
}
}
}