Commit d48c5d18 authored by Taylor Otwell's avatar Taylor Otwell

Added comments to URL class.

parent 7f465f30
......@@ -21,8 +21,10 @@ class URL {
$base = Config::get('application.url').'/'.Config::get('application.index');
// If the URL is to an asset such as an image, we do not need to go through the front controller.
$base = ($asset) ? str_replace('/'.Config::get('application.index'), '', $base) : $base;
// If the resource should be accessed over HTTPS, change the protocol in the URL.
$base = ($https and strpos($base, 'http://') === 0) ? 'https://'.substr($base, 7) : $base;
return $base.'/'.ltrim($url, '/');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment