From 0ff0d18351b061522a112929b1d8168e07a83cee Mon Sep 17 00:00:00 2001 From: Splaer Date: Wed, 25 Feb 2015 15:52:24 -0500 Subject: [PATCH] Functionality back to url view for the time being until other code is implemented --- app/controllers/admin/AssetsController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index c99c77d945..1b797a4538 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -26,7 +26,7 @@ use Mail; class AssetsController extends AdminController { - protected $qrCodeDimensions = array( 'height' => 4, 'width' => 4); + protected $qrCodeDimensions = array( 'height' => 3.5, 'width' => 3.5); /** * Show a list of all the assets. @@ -577,9 +577,9 @@ class AssetsController extends AdminController if ($settings->qr_code == '1') { $asset = Asset::find($assetId); - if (isset($asset->asset_tag)) { + if (isset($asset->id,$asset->asset_tag)) { - $content = DNS2D::getBarcodePNG($asset->asset_tag, "QRCODE", + $content = DNS2D::getBarcodePNG(route('view/hardware', $asset->id), "QRCODE", $this->qrCodeDimensions['height'],$this->qrCodeDimensions['width']); $img = imagecreatefromstring(base64_decode($content));