Skip to content

Commit

Permalink
Improvement Medai Helper
Browse files Browse the repository at this point in the history
  • Loading branch information
nilov committed Mar 24, 2016
1 parent cded302 commit e790b92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Helper/MediaHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ public function getAbsoluteUri($uri)
return $uri;
}

$hosts = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : '';
$isHosts = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? true : false;
$httpHost = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
$currentUri = sprintf('http%s://%s/', $hosts ? 's' : '', $httpHost);
$currentUri = sprintf('http%s://%s/', $isHosts ? 's' : '', $httpHost);

// protocol relative URL
if (0 === strpos($uri, '//')) {
Expand Down

0 comments on commit e790b92

Please sign in to comment.