PSR-2. I'm not a huge fan, but ugly consistency beats no consistency...

This commit is contained in:
Shish
2019-05-28 17:59:38 +01:00
parent 5ec3e89884
commit 34b05cca7c
295 changed files with 27094 additions and 24632 deletions

View File

@ -7,9 +7,10 @@
* Further modified by Shish to remove the 7MB local QR generator
* and replace it with a link to google chart APIs
*/
class QRImage extends Extension {
public function onDisplayingImage(DisplayingImageEvent $event) {
$this->theme->links_block(make_http(make_link('image/'.$event->image->id.'.jpg')));
}
class QRImage extends Extension
{
public function onDisplayingImage(DisplayingImageEvent $event)
{
$this->theme->links_block(make_http(make_link('image/'.$event->image->id.'.jpg')));
}
}

View File

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