X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=includes%2FOutputPage.php;h=bf9f5ac0b117b51496c6e8d2e34a60e94c4992cc;hb=ab442912044814c61e1803bd9b572ec0952b0166;hp=3657ac30bc295f28125f35a00e074ce189a1e2d3;hpb=66e8143bf5c22b8d44ec5189fe2bea32df2d91c3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 3657ac30bc..bf9f5ac0b1 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2432,14 +2432,6 @@ $templates * @param $options Options array to pass to Linker */ public function addReturnTo( $title, $query = array(), $text = null, $options = array() ) { - if ( in_array( 'http', $options ) ) { - $proto = PROTO_HTTP; - } elseif ( in_array( 'https', $options ) ) { - $proto = PROTO_HTTPS; - } else { - $proto = PROTO_RELATIVE; - } - $link = $this->msg( 'returnto' )->rawParams( Linker::link( $title, $text, array(), $query, $options ) )->escaped(); $this->addHTML( "

{$link}

\n" ); @@ -3024,6 +3016,7 @@ $templates 'wgCurRevisionId' => $latestRevID, 'wgArticleId' => $pageID, 'wgIsArticle' => $this->isArticle(), + 'wgIsRedirect' => $title->isRedirect(), 'wgAction' => Action::getActionName( $this->getContext() ), 'wgUserName' => $user->isAnon() ? null : $user->getName(), 'wgUserGroups' => $user->getEffectiveGroups(), @@ -3051,6 +3044,8 @@ $templates if ( $wgContLang->hasVariants() ) { $vars['wgUserVariant'] = $wgContLang->getPreferredVariant(); } + // Same test as SkinTemplate + $vars['wgIsProbablyEditable'] = $title->quickUserCan( 'edit', $user ) && ( $title->exists() || $title->quickUserCan( 'create', $user ) ); foreach ( $title->getRestrictionTypes() as $type ) { $vars['wgRestriction' . ucfirst( $type )] = $title->getRestrictions( $type ); } @@ -3215,7 +3210,7 @@ $templates foreach ( $variants as $_v ) { $tags["variant-$_v"] = Html::element( 'link', array( 'rel' => 'alternate', - 'hreflang' => $_v, + 'hreflang' => wfBCP47( $_v ), 'href' => $this->getTitle()->getLocalURL( array( 'variant' => $_v ) ) ) ); }