Browse Source

Merge c35d784c7934eafb397b712d9d71d5b87b4e114f into df4d37bf13dd0de5d1aff933005dfd4616ee9167

Mathieu Rochette 12 years ago
parent
commit
fcba65d3b0
1 changed files with 1 additions and 9 deletions
  1. 1 9
      lib/pico.php

+ 1 - 9
lib/pico.php

@@ -103,16 +103,8 @@ class Pico {
 		$script_url  = (isset($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : '';
 		if($request_url != $script_url) $url = trim(preg_replace('/'. str_replace('/', '\/', str_replace('index.php', '', $script_url)) .'/', '', $request_url, 1), '/');
 
-		$protocol = $this->get_protocol();
-		return rtrim(str_replace($url, '', $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']), '/');
+		return rtrim(str_replace($url, '', "//" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']), '/');
 	}
-
-	function get_protocol()
-	{
-		preg_match("|^HTTP[S]?|is",$_SERVER['SERVER_PROTOCOL'],$m);
-		return strtolower($m[0]);
-	}
-
 }
 
 ?>