diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-06-09 17:32:33 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-06-09 22:07:40 +0200 |
commit | 6458123e1276147095f296522a61823676006f3f (patch) | |
tree | 6e3d7c613302310b892df08900de2166c97ed5fd /application/controllers/file.php | |
parent | 8c572f55b17b86cbfa56f18f0491e05092f755b1 (diff) |
Use PHP library for QR codes
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers/file.php')
-rw-r--r-- | application/controllers/file.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php index 56928015f..7c49988bf 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -131,7 +131,11 @@ class File extends MY_Controller { handle_etag($etag); header("Content-disposition: inline; filename=\"".$id."_qr.png\"\n"); header("Content-Type: image/png\n"); - echo (new \libraries\ProcRunner(array('qrencode', '-s', '10', '-o', '-', site_url($id).'/')))->execSafe()['stdout']; + $qr = new \Endroid\QrCode\QrCode(); + $qr->setText(site_url($id).'/') + ->setSize(350) + ->setErrorCorrection('low') + ->render(); exit(); case "info": |