return $this->mDatePreference;
}
+ /**
+ * Determine based on the wiki configuration and the user's options,
+ * whether this user must be over HTTPS no matter what.
+ *
+ * @return bool
+ */
+ public function requiresHTTPS() {
+ global $wgSecureLogin;
+ if ( !$wgSecureLogin ) {
+ return false;
+ } else {
+ $https = $this->getBoolOption( 'prefershttps' );
+ wfRunHooks( 'UserRequiresHTTPS', array( $this, &$https ) );
+ if ( $https ) {
+ $https = wfCanIPUseHTTPS( $this->getRequest()->getIP() );
+ }
+ return $https;
+ }
+ }
+
/**
* Get the user preferred stub threshold
*
* will cause the site to redirect the user to HTTPS, if they access
* it over HTTP. Bug 29898.
*/
- if ( $request->getCheck( 'wpStickHTTPS' ) ) {
+ if ( $request->getCheck( 'wpStickHTTPS' ) || $this->requiresHTTPS() ) {
$this->setCookie( 'forceHTTPS', 'true', time() + 2592000, false ); //30 days
}
}
} elseif ( $type === true ) {
$message = 'confirmemail_body_changed';
} else {
+ // Give grep a chance to find the usages:
+ // confirmemail_body_changed, confirmemail_body_set
$message = 'confirmemail_body_' . $type;
}