make make_http not break with '' as an argument
This commit is contained in:
parent
a1589ee722
commit
ccaeca19eb
@ -196,7 +196,7 @@ function make_link($page=null, $query=null) {
|
|||||||
*/
|
*/
|
||||||
function make_http($link) {
|
function make_http($link) {
|
||||||
if(strpos($link, "ttp://") > 0) return $link;
|
if(strpos($link, "ttp://") > 0) return $link;
|
||||||
if($link[0] != '/') $link = get_base_href().'/'.$link;
|
if(strlen($link) > 0 && $link[0] != '/') $link = get_base_href().'/'.$link;
|
||||||
$link = "http://".$_SERVER["HTTP_HOST"].$link;
|
$link = "http://".$_SERVER["HTTP_HOST"].$link;
|
||||||
$link = str_replace("/./", "/", $link);
|
$link = str_replace("/./", "/", $link);
|
||||||
return $link;
|
return $link;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user