* This is for use prior to Setup.php, when no WebRequest object is available.
* At other times, use the non-static function getProtocol().
*
- * @return array
+ * @return string
*/
public static function detectProtocol() {
if ( ( !empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] !== 'off' ) ||
* @since 1.28
* @param string $name
* @param string|null $default Optional default
- * @return string
+ * @return string|null
*/
public function getRawVal( $name, $default = null ) {
$name = strtr( $name, '.', '_' ); // See comment in self::getGPCVal()
*
* @param string $name
* @param string $default Optional default (or null)
- * @return string
+ * @return string|null
*/
public function getVal( $name, $default = null ) {
$val = $this->getGPCVal( $this->data, $name, $default );
*
* @param string $name
* @param array $default Optional default (or null)
- * @return array
+ * @return array|null
*/
public function getArray( $name, $default = null ) {
$val = $this->getGPCVal( $this->data, $name, $default );
return $this->sessionId;
}
- /**
- * Returns true if the request has a persistent session.
- * This does not necessarily mean that the user is logged in!
- *
- * @deprecated since 1.27, use
- * \MediaWiki\Session\SessionManager::singleton()->getPersistedSessionId()
- * instead.
- * @return bool
- */
- public function checkSessionCookie() {
- global $wgInitialSessionId;
- wfDeprecated( __METHOD__, '1.27' );
- return $wgInitialSessionId !== null &&
- $this->getSession()->getId() === (string)$wgInitialSessionId;
- }
-
/**
* Get a cookie from the $_COOKIE jar
*
header( 'Content-Type: text/html' );
$encUrl = htmlspecialchars( $url );
echo <<<HTML
+<!DOCTYPE html>
<html>
<head>
<title>Security redirect</title>