Let the client choose the protocol for QR images (see #477)

This commit is contained in:
Shish 2018-11-05 17:52:21 +00:00
parent 96ed39c9e5
commit 55e0e32395

View file

@ -6,10 +6,8 @@ class QRImageTheme extends Themelet {
public function links_block($link) {
global $page;
$protocol = is_https_enabled() ? "https://" : "http://";
$page->add_block( new Block(
"QR Code","<img alt='QR Code' src='{$protocol}chart.apis.google.com/chart?chs=150x150&amp;cht=qr&amp;chl={$link}' />","left",50));
"QR Code","<img alt='QR Code' src='//chart.apis.google.com/chart?chs=150x150&amp;cht=qr&amp;chl={$link}' />","left",50));
}
}