Oprava carovejch kodu
[mirrors/SokoMan.git] / lib / Barcode.class.php
index b4231e660bffe34e80671feb01882ae788c7cf9d..f65df4f0e8fc5948f82e87d8315fc54d4f5276a1 100755 (executable)
@@ -51,7 +51,11 @@ class Barcode {
        }
 
        static function download_barcode($string='EXAMPLE', $convert='png', $enctype='code128b') {
-               if(self::test()) header('Content-Type: image/png'); else die();
+               if(self::test()) {
+                       header('Content-Type: image/png');
+                       header('Cache-Control: max-age=604800, public'); //1week caching
+               }       else die();
+               error_reporting(0); //TODO: enable errors again
                die(self::cached_barcode($string,$convert,$enctype));
        }
 }
This page took 0.092741 seconds and 4 git commands to generate.