Code Duplication    Length = 3-3 lines in 2 locations

control/Director.php 2 locations

@@ 735-737 (lines=3) @@
732
				return "";
733
			}
734
735
			if (substr($urlWithoutProtocol, 0, strlen($baseDomain)) == $baseDomain) {
736
				return substr($urlWithoutProtocol, strlen($baseDomain));
737
			}
738
		}
739
740
		// test for base folder, e.g. /var/www
@@ 751-753 (lines=3) @@
748
		}
749
750
		// Test for relative base url, e.g mywebsite/ if the full url is localhost/myswebsite
751
		if (substr($url, 0, strlen($baseDomain)) == $baseDomain) {
752
			return substr($url, strlen($baseDomain));
753
		}
754
755
		// Nothing matched, fall back to returning the original URL
756
		return $url;