* @param $index int Index to check
* @return bool
*/
- public static function isNonincludableNamespace( $index ) {
+ public static function isNonincludable( $index ) {
global $wgNonincludableNamespaces;
return $wgNonincludableNamespaces && in_array( $index, $wgNonincludableNamespaces );
}
$data[$ns]['content'] = '';
}
- if ( MWNamespace::isNonincludableNamespace( $ns ) ) {
+ if ( MWNamespace::isNonincludable( $ns ) ) {
$data[$ns]['nonincludable'] = '';
}
}
}
return parent::getComment();
}
+
+ public function getPreloadTitles() {
+ if ( $this->entry->getSubtype() === 'create2' ) {
+ //add the user talk to LinkBatch for the userLink
+ return array( Title::makeTitle( NS_USER_TALK, $this->entry->getTarget()->getText() ) );
+ }
+ return array();
+ }
}
$isHTML = true;
$this->disableCache();
}
- } elseif ( MWNamespace::isNonincludableNamespace( $title->getNamespace() ) ) {
+ } elseif ( MWNamespace::isNonincludable( $title->getNamespace() ) ) {
$found = false; # access denied
wfDebug( __METHOD__.": template inclusion denied for " . $title->getPrefixedDBkey() );
} else {
}
fwrite( $fp, $data['Reason'] );
$timestamp = wfTimestampNow();
- fwrite( $fp, "\n<p>" . wfMsgExt(
- 'lockedbyandtime',
- array( 'content', 'parsemag' ),
+ fwrite( $fp, "\n<p>" . $this->msg( 'lockedbyandtime',
$this->getUser()->getName(),
- $wgContLang->date( $timestamp ),
- $wgContLang->time( $timestamp )
- ) . "</p>\n" );
+ $wgContLang->date( $timestamp, false, false ),
+ $wgContLang->time( $timestamp, false, false )
+ )->inContentLanguage()->text() . "</p>\n" );
fclose( $fp );
return Status::newGood();
$nsNames = array();
foreach( $this->namespaces as $n ) {
if( $n === NS_MAIN ) {
- $nsNames[] = wfMsgNoTrans( 'blanknamespace' );
+ $nsNames[] = $this->msg( 'blanknamespace' )->plain();
} else {
$nsNames[] = $wgContLang->getNsText( $n );
}
*/
if ( isset( $_SERVER['REQUEST_URI'] ) && strpos( $_SERVER['REQUEST_URI'], '&' ) !== false ) {
wfDebug( "Special:Userlogout request {$_SERVER['REQUEST_URI']} looks suspicious, denying.\n" );
- throw new HttpError( 400, wfMessage( 'suspicious-userlogout' ), wfMessage( 'loginerror' ) );
+ throw new HttpError( 400, $this->msg( 'suspicious-userlogout' ), $this->msg( 'loginerror' ) );
}
$this->setHeaders();
# Specifically setting to use "Wanted Files" (NS_MAIN) as title, so as to get what
# category would be used on main namespace pages, for those tricky wikipedia
# admins who like to do {{#ifeq:{{NAMESPACE}}|foo|bar|....}}.
- $catMessage = wfMessage( 'broken-file-category' )
+ $catMessage = $this->msg( 'broken-file-category' )
->title( Title::newFromText( "Wanted Files", NS_MAIN ) )
->inContentLanguage();
'common/commonContent.css' => array( 'media' => 'screen' ),
'common/commonInterface.css' => array( 'media' => 'screen' ),
'vector/screen.css' => array( 'media' => 'screen' ),
- 'vector/screen-hd.css' => array( 'media' => 'screen and (min-width: 900px)' ),
+ 'vector/screen-hd.css' => array( 'media' => 'screen and (min-width: 982px)' ),
),
'scripts' => 'vector/vector.js',
'remoteBasePath' => $GLOBALS['wgStylePath'],
}
+ public function testIsNonincludable() {
+ global $wgNonincludableNamespaces;
+ $wgNonincludableNamespaces = array( NS_USER );
+
+ $this->assertTrue( MWNamespace::isNonincludable( NS_USER ) );
+
+ $this->assertFalse( MWNamespace::isNonincludable( NS_TEMPLATE ) );
+ }
+
####### HELPERS ###########################################################
function __call( $method, $args ) {
// Call the real method if it exists