With the new 1.18 version, the magic word {{SERVER}} don't allow anymore to check protocol (http or https).
But there is one place where it is needed : in [[MediaWiki:Loginend]], system message used in [[Special:Connexion]]. We have to check the protocol to provide the good message permitting to the user to go to "the other" protocol.
It appears that it is not possible with magic words/wikitext, and it is not possible either to "patch" with a javascript feature as JS is disabled in [[Special:Connexion]].
The only solution I've found is to check the protocol in PHP, and provide the system message [[MediaWiki:Loginend]] or [[MediaWiki:Loginend-secure]] (to be created) depending on the result.
The file to update is /includes/templates/Userlogin.php. The class "UserloginTemplate extends QuickTemplate", near the end, the folowing line :
<div id="loginend"><?php $this->msgWiki( 'loginend' ); ?></div>
have to be replaced by something like that :
<div id="loginend"><?php
if($PROTOCOL=="https"){
$this->msgWiki( 'loginend-secure' );
}else{
$this->msgWiki( 'loginend' );
}
?></div>
I don-t know exacty how to perform the ($PROTOCOL=="https") test, I assume that you'll get a solution...
Version: unspecified
Severity: normal