summaryrefslogtreecommitdiffstats
path: root/system/application/models
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2010-07-19 19:19:34 +0200
committerFlorian Pritz <bluewind@xssn.at>2010-07-19 19:19:34 +0200
commitccdaa517885b2a3ce1b399a0346fc1ff8e760f83 (patch)
treeb9d501ef4a00bdf866adc312f131068bd03c3a0a /system/application/models
parent170806775235beb2fd3ace4ca2d673b200c591d7 (diff)
add support for QR code generation
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'system/application/models')
-rw-r--r--system/application/models/file_mod.php5
1 files changed, 5 insertions, 0 deletions
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");
}