--- /tmp/dsg/dolibarr/htdocs/core/modules/barcode/doc/github_19.0.3_phpbarcode.modules.php +++ /tmp/dsg/dolibarr/htdocs/core/modules/barcode/doc/client_phpbarcode.modules.php @@ -23 +23 @@ - * \brief File with class to generate barcode images using php internal lib barcode generator + * \brief File with class to generate barcode images using php barcode generator @@ -36,3 +36,3 @@ - * Dolibarr version of the loaded document - * @var string - */ + * Dolibarr version of the loaded document + * @var string + */ @@ -61,2 +61 @@ - * @param Translate $langs Lang object to use for output - * @return string Descriptive text + * @return string Texte descripif @@ -64 +63 @@ - public function info($langs) + public function info() @@ -78,2 +77 @@ - * @param Object $object Object we need next value for - * @return boolean false if KO (there is a conflict), true if OK + * @return boolean false if conflict, true if ok @@ -81 +79 @@ - public function canBeActivated($object) + public function canBeActivated() @@ -98 +96 @@ - //print 'genbarcode_loc='.$genbarcode_loc.' encoding='.$encoding;exit; + //print 'genbarcode_loc='.$genbarcode_loc.' encoding='.$encoding;exit; @@ -101,9 +99,2 @@ - if ($encoding == 'EAN13') { - $supported = 1; - } - if ($encoding == 'ISBN') { - $supported = 1; - } - if ($encoding == 'UPC') { - $supported = 1; - } + if ($encoding == 'EAN13') $supported = 1; + if ($encoding == 'ISBN') $supported = 1; @@ -113,9 +104,4 @@ - if ($encoding == 'EAN8') { - $supported = 1; - } - if ($encoding == 'C39') { - $supported = 1; - } - if ($encoding == 'C128') { - $supported = 1; - } + if ($encoding == 'EAN8') $supported = 1; + if ($encoding == 'UPC') $supported = 1; + if ($encoding == 'C39') $supported = 1; + if ($encoding == 'C128') $supported = 1; @@ -126 +112 @@ - /** + /** @@ -131 +117 @@ - * @param string $readable Code can be read (What is this ? is this used ?) + * @param string $readable Code can be read @@ -134,3 +120,3 @@ - * @return int Return integer <0 if KO, >0 if OK - */ - public function buildBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) + * @return int <0 if KO, >0 if OK + */ + public function buildBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) @@ -142,3 +128 @@ - if (!$this->encodingIsSupported($encoding)) { - return -1; - } + if (!$this->encodingIsSupported($encoding)) return -1; @@ -146,6 +130,2 @@ - if ($encoding == 'EAN8' || $encoding == 'EAN13') { - $encoding = 'EAN'; - } - if ($encoding == 'C39' || $encoding == 'C128') { - $encoding = substr($encoding, 1); - } + if ($encoding == 'EAN8' || $encoding == 'EAN13') $encoding = 'EAN'; + if ($encoding == 'C39' || $encoding == 'C128') $encoding = substr($encoding, 1); @@ -161,3 +141 @@ - if ($code) { - $result = barcode_print($code, $encoding, $scale, $mode); - } + if ($code) $result = barcode_print($code, $encoding, $scale, $mode); @@ -165 +143,2 @@ - if (!is_array($result)) { + if (!is_array($result)) + { @@ -167,3 +146 @@ - if (empty($nooutputiferror)) { - print dol_escape_htmltag($this->error); - } + if (empty($nooutputiferror)) print $this->error; @@ -184 +161 @@ - * @return int Return integer <0 if KO, >0 if OK + * @return int <0 if KO, >0 if OK @@ -188 +165 @@ - global $conf, $filebarcode, $langs; + global $conf, $filebarcode; @@ -191,5 +167,0 @@ - if (!is_writable($conf->barcode->dir_temp)) { - $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->barcode->dir_temp); - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); - return -1; - } @@ -197 +169 @@ - $file = $conf->barcode->dir_temp . '/barcode_' . $code . '_' . $encoding . '.png'; + $file = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png'; --- /tmp/dsg/dolibarr/htdocs/core/modules/barcode/doc/github_19.0.3_tcpdfbarcode.modules.php +++ /tmp/dsg/dolibarr/htdocs/core/modules/barcode/doc/client_tcpdfbarcode.modules.php @@ -35,3 +35,3 @@ - * Dolibarr version of the loaded document - * @var string - */ + * Dolibarr version of the loaded document + * @var string + */ @@ -50,5 +50,6 @@ - * @param Translate $langs Lang object to use for output - * @return string Descriptive text - */ - public function info($langs) - { + * @return string Text with description + */ + public function info() + { + global $langs; + @@ -72,5 +73,6 @@ - * @param Object $object Object we need next value for - * @return boolean false if KO (there is a conflict), true if OK - */ - public function canBeActivated($object) - { + * @return boolean false if conflict, true if ok + */ + public function canBeActivated() + { + global $langs; + @@ -101 +103 @@ - * @param string $readable Code can be read (What is this ? is this used ?) + * @param string $readable Code can be read @@ -104 +106 @@ - * @return int Return integer <0 if KO, >0 if OK + * @return int <0 if KO, >0 if OK @@ -111,3 +113 @@ - if (empty($tcpdfEncoding)) { - return -1; - } + if (empty($tcpdfEncoding)) return -1; @@ -152 +152 @@ - * @return int Return integer <0 if KO, >0 if OK + * @return int <0 if KO, >0 if OK @@ -156 +156 @@ - global $conf, $langs, $_GET; + global $conf, $_GET; @@ -159,7 +159 @@ - if (!is_writable($conf->barcode->dir_temp)) { - $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->barcode->dir_temp); - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); - return -1; - } - - $file = $conf->barcode->dir_temp . '/barcode_' . $code . '_' . $encoding . '.png'; + $file = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png'; @@ -168,3 +162 @@ - if (empty($tcpdfEncoding)) { - return -1; - } + if (empty($tcpdfEncoding)) return -1;