Code Duplication    Length = 3-3 lines in 4 locations

control/Director.php 3 locations

@@ 271-273 (lines=3) @@
268
			Config::unnest();
269
		};
270
271
		if (strpos($url, '#') !== false) {
272
			$url = substr($url, 0, strpos($url, '#'));
273
		}
274
275
		// Handle absolute URLs
276
		if (parse_url($url, PHP_URL_HOST)) {
@@ 691-693 (lines=3) @@
688
	 */
689
	public static function is_absolute_url($url) {
690
		// Strip off the query and fragment parts of the URL before checking
691
		if(($queryPosition = strpos($url, '?')) !== false) {
692
			$url = substr($url, 0, $queryPosition-1);
693
		}
694
		if(($hashPosition = strpos($url, '#')) !== false) {
695
			$url = substr($url, 0, $hashPosition-1);
696
		}
@@ 694-696 (lines=3) @@
691
		if(($queryPosition = strpos($url, '?')) !== false) {
692
			$url = substr($url, 0, $queryPosition-1);
693
		}
694
		if(($hashPosition = strpos($url, '#')) !== false) {
695
			$url = substr($url, 0, $hashPosition-1);
696
		}
697
		$colonPosition = strpos($url, ':');
698
		$slashPosition = strpos($url, '/');
699
		return (

control/HTTPRequest.php 1 location

@@ 328-330 (lines=3) @@
325
				$url .= '?' . http_build_query($vars);
326
			}
327
		}
328
		else if(strpos($url, "?") !== false) {
329
			$url = substr($url, 0, strpos($url, "?"));
330
		}
331
332
		return $url;
333
	}