diff options
Diffstat (limited to 'system/application/models/file_mod.php')
-rw-r--r-- | system/application/models/file_mod.php | 5 |
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"); } |