Only show prefershttps if IP can use HTTPS
authorChad Horohoe <chadh@wikimedia.org>
Fri, 23 Aug 2013 19:34:06 +0000 (12:34 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Fri, 23 Aug 2013 19:34:06 +0000 (12:34 -0700)
Change-Id: I7493a329d35fad3f17aac2df935f4f9306828884

includes/Preferences.php

index 9791d8b..4d034fa 100644 (file)
@@ -315,7 +315,7 @@ class Preferences {
                        );
                }
                // Only show preferhttps if secure login is turned on
-               if ( $wgSecureLogin ) {
+               if ( $wgSecureLogin && wfCanIPUseHTTPS( $context->getRequest()->getIP() ) ) {
                        $defaultPreferences['prefershttps'] = array(
                                'type' => 'toggle',
                                'label-message' => 'tog-prefershttps',