*/
public function getModifiedTime( ResourceLoaderContext $context ) {
$hash = $context->getHash();
- if ( isset( $this->modifiedTime[$hash] ) ) {
- return $this->modifiedTime[$hash];
+ if ( !isset( $this->modifiedTime[$hash] ) ) {
+ global $wgUser;
+ $this->modifiedTime[$hash] = wfTimestamp( TS_UNIX, $wgUser->getTouched() );
}
- global $wgUser;
- return $this->modifiedTime[$hash] = wfTimestamp( TS_UNIX, $wgUser->getTouched() );
+ return $this->modifiedTime[$hash];
}
/**
if ( $options['justify'] ) {
$rules[] = "#article, #bodyContent, #mw_content { text-align: justify; }\n";
}
- if ( !$options['showtoc'] ) {
- $rules[] = "#toc { display: none; }\n";
- }
- if ( !$options['editsection'] ) {
- $rules[] = ".mw-editsection { display: none; }\n";
- }
if ( $options['editfont'] !== 'default' ) {
// Double-check that $options['editfont'] consists of safe characters only
if ( preg_match( '/^[a-zA-Z0-9_, -]+$/', $options['editfont'] ) ) {