$nextRedirect = $wgStylePath . '/common/images/nextredirect' . $imageDir . '.png';
$alt = $wgContLang->isRTL() ? '←' : '→';
// Automatically append redirect=no to each link, since most of them are redirect pages themselves.
- // FIXME: where this happens?
foreach ( $target as $rt ) {
$link .= Html::element( 'img', array( 'src' => $nextRedirect, 'alt' => $alt ) );
if ( $forceKnown ) {
- $link .= $sk->linkKnown( $rt, htmlspecialchars( $rt->getFullText() ) );
+ $link .= $sk->linkKnown( $rt, htmlspecialchars( $rt->getFullText(), array(), array( 'redirect' => 'no' ) ) );
} else {
- $link .= $sk->link( $rt, htmlspecialchars( $rt->getFullText() ) );
+ $link .= $sk->link( $rt, htmlspecialchars( $rt->getFullText() ), array(), array( 'redirect' => 'no' ) );
}
}
*/
public static function newFromRedirectArray( $text ) {
global $wgMaxRedirects;
- // are redirects disabled?
- if ( $wgMaxRedirects < 1 ) {
- return null;
- }
$title = self::newFromRedirectInternal( $text );
if ( is_null( $title ) ) {
return null;
* @return Title
*/
protected static function newFromRedirectInternal( $text ) {
+ global $wgMaxRedirects;
+ if ( $wgMaxRedirects < 1 ) {
+ //redirects are disabled, so quit early
+ return null;
+ }
$redir = MagicWord::get( 'redirect' );
$text = trim( $text );
if ( $redir->matchStartAndRemove( $text ) ) {