Permalink
Browse files

Merge pull request #5 from pachay/master

fix redeclare qrstr error on multiple QR codes in one pag
  • Loading branch information...
2 parents f6bcf33 + de1178d commit bc6a9ae131e2c492b81fd97c40c3d6770c7ccb21 @phiamo committed Sep 11, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Model/BarcodeService.php
View
@@ -28,7 +28,7 @@ public function saveAs($type, $text, $file){
@unlink($file);
switch ($type){
case $type == 'qr':
- include __DIR__.DIRECTORY_SEPARATOR."..".DIRECTORY_SEPARATOR."Resources".DIRECTORY_SEPARATOR."phpqrcode".DIRECTORY_SEPARATOR."qrlib.php";
+ include_once __DIR__.DIRECTORY_SEPARATOR."..".DIRECTORY_SEPARATOR."Resources".DIRECTORY_SEPARATOR."phpqrcode".DIRECTORY_SEPARATOR."qrlib.php";
\QRcode::png($text, $file);
break;
case is_numeric($type):
@@ -85,4 +85,4 @@ protected function getAbsoluteBarcodeDir($type){
protected function getAbsolutePath(){
return $this->webroot.DIRECTORY_SEPARATOR.$this->webdir;
}
-}
+}

0 comments on commit bc6a9ae

Please sign in to comment.