*/
private static function fnamePart( $url ) {
$basename = strrchr( $url, '/' );
- if ( false === $basename ) {
+ if ( $basename === false ) {
$basename = $url;
} else {
$basename = substr( $basename, 1 );
$prefix = $postfix = '';
- if ( 'center' == $frameParams['align'] ) {
+ if ( $frameParams['align'] == 'center' ) {
$prefix = '<div class="center">';
$postfix = '</div>';
$frameParams['align'] = 'none';
$userId, $userText, $redContribsWhenNoEdits = false, $flags = 0, $edits = null
) {
global $wgUser, $wgDisableAnonTalk, $wgLang;
- $talkable = !( $wgDisableAnonTalk && 0 == $userId );
+ $talkable = !( $wgDisableAnonTalk && $userId == 0 );
$blockable = !( $flags & self::TOOL_LINKS_NOBLOCK );
$addEmailLink = $flags & self::TOOL_LINKS_EMAIL && $userId;
$section = str_replace( '[[', '', $section );
$section = str_replace( ']]', '', $section );
+ // We don't want any links in the auto text to be linked, but we still
+ // want to show any [[ ]]
+ $sectionText = str_replace( '[[', '[[', $auto );
+
$section = substr( Parser::guessSectionNameFromStrippedText( $section ), 1 );
if ( $local ) {
$sectionTitle = Title::makeTitleSafe( NS_MAIN, '', $section );
}
if ( $sectionTitle ) {
$auto = Linker::makeCommentLink(
- $sectionTitle, $wgLang->getArrow() . $wgLang->getDirMark() . $auto,
+ $sectionTitle, $wgLang->getArrow() . $wgLang->getDirMark() . $sectionText,
$wikiId, 'noclasses'
);
}