Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion Block/SliderItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ public function getSlider()
*/
public function getBannerImageUrl(\Magestore\Bannerslider\Model\Banner $banner)
{
return $this->_bannersliderHelper->getBaseUrlMedia($banner->getImage());

return $this->_bannersliderHelper->getBaseUrlMedia($banner->getImage(), $this->isSecure());
}

/**
Expand All @@ -305,4 +306,15 @@ public function getFlexsliderHtmlId()
{
return 'magestore-bannerslider-flex-slider-'.$this->getSlider()->getId().$this->_stdlibDateTime->gmtTimestamp();
}

/**
* check if secure connection
*
* @return bool
*/
private function isSecure() {
return
(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
|| $_SERVER['SERVER_PORT'] == 443;
}
}