Merge "Convert article delete to use OOUI"
[lhc/web/wiklou.git] / includes / http / MWHttpRequest.php
index 8d58ce5..88cc510 100644 (file)
@@ -609,19 +609,17 @@ class MWHttpRequest implements LoggerAwareInterface {
                                }
                        }
 
-                       if ( $foundRelativeURI ) {
-                               if ( $domain ) {
-                                       return $domain . $locations[$countLocations - 1];
-                               } else {
-                                       $url = parse_url( $this->url );
-                                       if ( isset( $url['host'] ) ) {
-                                               return $url['scheme'] . '://' . $url['host'] .
-                                                       $locations[$countLocations - 1];
-                                       }
-                               }
-                       } else {
+                       if ( !$foundRelativeURI ) {
                                return $locations[$countLocations - 1];
                        }
+                       if ( $domain ) {
+                               return $domain . $locations[$countLocations - 1];
+                       }
+                       $url = parse_url( $this->url );
+                       if ( isset( $url['host'] ) ) {
+                               return $url['scheme'] . '://' . $url['host'] .
+                                       $locations[$countLocations - 1];
+                       }
                }
 
                return $this->url;