Merge "PostgreSQL: Improve dropping of foreign key constraint"
[lhc/web/wiklou.git] / includes / WebRequest.php
index bf99e95..f86a454 100644 (file)
@@ -138,7 +138,7 @@ class WebRequest {
                                        );
                                }
 
-                               wfRunHooks( 'WebRequestPathInfoRouter', array( $router ) );
+                               Hooks::run( 'WebRequestPathInfoRouter', array( $router ) );
 
                                $matches = $router->parse( $path );
                        }
@@ -207,9 +207,9 @@ class WebRequest {
         * @return array
         */
        public static function detectProtocol() {
-               if ( ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ) ||
+               if ( ( !empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] !== 'off' ) ||
                        ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) &&
-                       $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) ) {
+                       $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ) ) {
                        return 'https';
                } else {
                        return 'http';
@@ -1118,7 +1118,7 @@ HTML;
                }
 
                # Allow extensions to improve our guess
-               wfRunHooks( 'GetIP', array( &$ip ) );
+               Hooks::run( 'GetIP', array( &$ip ) );
 
                if ( !$ip ) {
                        throw new MWException( "Unable to determine IP." );