summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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");
}