Better separation between function to write a barcode on file and function to output a barcode on the fly.
This commit is contained in:
parent
8855f5dcf2
commit
ec7cd0bd04
@ -178,10 +178,10 @@ if ($resql)
|
||||
|
||||
if ($module->encodingIsSupported($obj->encoding))
|
||||
{
|
||||
// Build barcode on disk
|
||||
// Build barcode on disk (not used, this is done to make debug easier)
|
||||
$result=$module->writeBarCode($obj->example,$obj->encoding,'Y');
|
||||
|
||||
// Output files with barcode generators
|
||||
// Generate on the fly and output barcode with generator
|
||||
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($obj->coder).'&code='.urlencode($obj->example).'&encoding='.urlencode($obj->encoding);
|
||||
//print $url;
|
||||
print '<img src="'.$url.'" title="'.$obj->example.'" border="0">';
|
||||
|
||||
@ -85,12 +85,12 @@ class modPhpbarcode extends ModeleBarCode
|
||||
return $supported;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Return an image file on output
|
||||
* \param $code Valeur numérique a coder
|
||||
* \param $encoding Mode de codage
|
||||
* \param $readable Code lisible
|
||||
*/
|
||||
/**
|
||||
* \brief Return an image file on the fly (no need to write on disk)
|
||||
* \param $code Value to encode
|
||||
* \param $encoding Mode of encoding
|
||||
* \param $readable Code can be read
|
||||
*/
|
||||
function buildBarCode($code,$encoding,$readable='Y')
|
||||
{
|
||||
global $_GET,$_ENV,$_SERVER;
|
||||
@ -117,10 +117,10 @@ class modPhpbarcode extends ModeleBarCode
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Save an image file on disk
|
||||
* \param $code Valeur numérique a coder
|
||||
* \param $encoding Mode de codage
|
||||
* \param $readable Code lisible
|
||||
* \brief Save an image file on disk (with no output)
|
||||
* \param $code Value to encode
|
||||
* \param $encoding Mode of encoding
|
||||
* \param $readable Code can be read
|
||||
*/
|
||||
function writeBarCode($code,$encoding,$readable='Y')
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user