Refactor more URL related functions

This commit is contained in:
Kijin Sung 2016-01-20 15:53:42 +09:00
parent a8094fe766
commit 08560f84be
5 changed files with 9 additions and 15 deletions

View file

@ -63,8 +63,7 @@ class image_link extends EditorHandler
if(substr($src, 0,2)=='./') $src = Context::getRequestUri().substr($src, 2);
else if(substr($src , 0, 1)=='/')
{
if($_SERVER['HTTPS']=='on') $http_src = 'https://';
else $http_src = 'http://';
$http_src = RX_SSL ? 'https://' : 'http://';
$src = $http_src.$_SERVER['HTTP_HOST'].$src;
}
else if(!strpos($temp_src[0],':') && $src) $src = Context::getRequestUri().$src;