Code Duplication    Length = 3-3 lines in 2 locations

control/Director.php 2 locations

@@ 638-640 (lines=3) @@
635
				return "";
636
		}
637
638
			if(substr($urlWithoutProtocol,0,strlen($baseDomain)) == $baseDomain) {
639
				return substr($urlWithoutProtocol,strlen($baseDomain));
640
			}
641
		}
642
643
		// test for base folder, e.g. /var/www
@@ 654-656 (lines=3) @@
651
		}
652
653
		// Test for relative base url, e.g mywebsite/ if the full url is localhost/myswebsite
654
		if(substr($url,0,strlen($baseDomain)) == $baseDomain) {
655
			return substr($url, strlen($baseDomain));
656
		}
657
658
		// Nothing matched, fall back to returning the original URL
659
		return $url;