summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/controllers/file.php6
-rw-r--r--application/libraries/Customautoloader.php3
m---------application/third_party/QrCode0
3 files changed, 8 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":
diff --git a/application/libraries/Customautoloader.php b/application/libraries/Customautoloader.php
index 6a616ba7f..426364ee3 100644
--- a/application/libraries/Customautoloader.php
+++ b/application/libraries/Customautoloader.php
@@ -17,6 +17,9 @@ class CustomAutoloader{
public function loader($className)
{
$namespaces = array(
+ 'Endroid\QrCode' => [
+ ["path" => APPPATH."/third_party/QrCode/src/"],
+ ],
'' => [
["path" => APPPATH],
["path" => APPPATH."/third_party/mockery/library/"]
diff --git a/application/third_party/QrCode b/application/third_party/QrCode
new file mode 160000
+Subproject 4638f11b6944cccce997db7fa7508b5a7ad1a61