Fixed bugs caused by the previous commit
This commit is contained in:
parent
692c2e0aeb
commit
97d483524a
@ -80,7 +80,7 @@ class ProductPage extends Page {
|
||||
'tags' => $tags,
|
||||
'info' => $info);
|
||||
$label = '';
|
||||
if(class_exists('QRcode', false)) {
|
||||
if(class_exists('QRcode')) {
|
||||
$label = replace($fields, $this->fragments['product_label']);
|
||||
}
|
||||
$fields['label'] = $label;
|
||||
|
@ -10,7 +10,7 @@ class QR extends Responder {
|
||||
}
|
||||
|
||||
public function render() {
|
||||
if(class_exists('QRcode', false)) {
|
||||
if(class_exists('QRcode')) {
|
||||
QRcode::svg((string)$this->product->get_serial());
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,14 @@
|
||||
<?php
|
||||
|
||||
set_include_path(get_include_path().PATH_SEPARATOR.'include/');
|
||||
spl_autoload_register(function ($class) {
|
||||
if($class == 'qrcode') {
|
||||
if($class == 'QRcode') {
|
||||
include('./phpqrcode/qrlib.php');
|
||||
return;
|
||||
}
|
||||
include('./include/'.$class.'.php');
|
||||
});
|
||||
require('./config.php');
|
||||
require('functions.php');
|
||||
require('./include/functions.php');
|
||||
|
||||
header('Content-Type: text/html; charset=UTF-8');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user