https://bugzilla.wikimedia.org/show_bug.cgi?id=31293

       Web browser: ---
             Bug #: 31293
           Summary: check protocol in Special:Connexion
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Special pages
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


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...

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to