From ccdaa517885b2a3ce1b399a0346fc1ff8e760f83 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 19 Jul 2010 19:19:34 +0200 Subject: add support for QR code generation Signed-off-by: Florian Pritz --- system/application/models/file_mod.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'system') diff --git a/system/application/models/file_mod.php b/system/application/models/file_mod.php index 2c86aa41a..76f4ba228 100644 --- a/system/application/models/file_mod.php +++ b/system/application/models/file_mod.php @@ -197,6 +197,11 @@ class File_mod extends Model { } else { if ($mode == 'plain') { header("Content-Type: text/plain\n"); + } elseif ($mode == "qr") { + header("Content-disposition: inline; filename=\"qr.png\"\n"); + header("Content-Type: image/png\n"); + passthru('/usr/bin/qrencode -s 10 -o - '.escapeshellarg(site_url($id).'/')); + exit(); } else { header("Content-Type: ".$type."\n"); } -- cgit v1.2.3-24-g4f1b