Skip to content

Commit

Permalink
Merge branch 'master' into kill-test-file
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrunwald committed Jun 7, 2018
2 parents b36be55 + cf943a3 commit 336f5bb
Show file tree
Hide file tree
Showing 12 changed files with 116 additions and 56 deletions.
5 changes: 3 additions & 2 deletions inc/Classes/Auth.php
@@ -1,6 +1,7 @@
<?php

namespace LanSuite;
use LanSuite\AzDGCrypt;

/**
* Class auth
Expand Down Expand Up @@ -710,7 +711,7 @@ private function cookiedata_pack()

// Crypt only via Config. See Construktor
if ($this->cookie_crypt) {
$crypt= new \LanSuite\AzDGCrypt(md5($this->cookie_crypt_pw));
$crypt= new AzDGCrypt(md5($this->cookie_crypt_pw));
$cookie = $crypt->crypt($cookie);
}

Expand All @@ -727,7 +728,7 @@ private function cookiedata_unpack($cookie)
{
// Crypt only via Config. See Construktor
if ($this->cookie_crypt) {
$crypt= new \LanSuite\AzDGCrypt(md5($this->cookie_crypt_pw));
$crypt= new AzDGCrypt(md5($this->cookie_crypt_pw));
$cookie = $crypt->decrypt($cookie);
}

Expand Down
12 changes: 6 additions & 6 deletions inc/Classes/Barcode.php
Expand Up @@ -117,7 +117,7 @@ public function setNarrow2Wide($n2w)
public function error($asimg = false)
{
if (empty($this->_error)) {
return "";
return '';
}
if (!$asimg) {
return $this->_error;
Expand All @@ -130,6 +130,7 @@ public function error($asimg = false)
@imagettftext($im, 10, 0, 5, 50, $color, $this->_font, wordwrap($this->_error, 40, "\n", 1));
@imagepng($im);
@imagedestroy($im);
return '';
}

public function genBarCode($barnumber, $format = "gif", $file = "")
Expand Down Expand Up @@ -183,6 +184,8 @@ public function genBarCode($barnumber, $format = "gif", $file = "")
} elseif ($this->_encode=="CODE93") {
$this->_c93Barcode($barnumber, $this->_scale, $file);
}

return true;
}

/// Start function for code93
Expand Down Expand Up @@ -914,8 +917,6 @@ public function _postBarcode($barnumber, $scale = 1, $file = "")
$xpos+=2*$scale;
}



if ($this->_format=="png") {
if (!empty($file)) {
@imagepng($im, $file.".".$this->_format);
Expand All @@ -940,7 +941,8 @@ public function _postBarcode($barnumber, $scale = 1, $file = "")
}
}

@imagedestroy($im);
@imagedestroy($im);
return true;
}
// End Function for POSTNET

Expand Down Expand Up @@ -1260,8 +1262,6 @@ public function _upceEncode($barnumber, $encbit, $checkdigit)
}

$mfcStr="";
$prodStr="";
$checkdigit;
$encTable[$checkdigit];

for ($i=0; $i<strlen($barnumber); $i++) {
Expand Down
4 changes: 2 additions & 2 deletions inc/Classes/BarcodeSystem.php
Expand Up @@ -20,12 +20,12 @@
class BarcodeSystem
{
private $class_barcode;

public function __construct()
{
global $cfg, $db;

$this->class_barcode = new \LanSuite\Barcode($cfg['sys_barcode_typ']);
$this->class_barcode = new Barcode($cfg['sys_barcode_typ']);

$this->class_barcode->setHeight(50);
$this->class_barcode->setScale(1);
Expand Down
2 changes: 2 additions & 0 deletions inc/Classes/DB.php
Expand Up @@ -94,6 +94,8 @@ private function escape($match)
} elseif ($match[0] == '%plain%') {
return $CurrentArg;
}

return '';
}

/**
Expand Down
4 changes: 4 additions & 0 deletions inc/Classes/Debug.php
Expand Up @@ -144,6 +144,8 @@ private function timer_show()
if ($this->mode > 0) {
return $this->timer_out;
}

return '';
}

/**
Expand Down Expand Up @@ -185,6 +187,8 @@ private function query_fetchlist()

return $sql_query_debug;
}

return '';
}

/**
Expand Down
48 changes: 34 additions & 14 deletions inc/Classes/Display.php
Expand Up @@ -71,6 +71,8 @@ public function __construct()
* @param string $name
* @param string $mod
* @return void
* @throws \Exception
* @throws \SmartyException
*/
public function AddSmartyTpl($name, $mod = '')
{
Expand All @@ -88,6 +90,8 @@ public function AddSmartyTpl($name, $mod = '')
*
* @param $content
* @return void
* @throws \Exception
* @throws \SmartyException
*/
public function AddContentLine($content)
{
Expand All @@ -106,10 +110,12 @@ public function AddContentLine($content)
/**
* Writes the headline of a page
*
* @param string $caption
* @param string $text
* @param string $helplet_id
* @param string $caption
* @param string $text
* @param string $helplet_id
* @return void
* @throws \Exception
* @throws \SmartyException
*/
public function NewContent($caption, $text = null, $helplet_id = 'help')
{
Expand Down Expand Up @@ -267,6 +273,8 @@ public function StopHiddenBox()
* @param string $parm
* @param string $class
* @return void
* @throws \Exception
* @throws \SmartyException
*/
public function AddSingleRow($text, $parm = null, $class = '')
{
Expand All @@ -289,6 +297,8 @@ public function AddSingleRow($text, $parm = null, $class = '')
* @param string $value
* @param string $id
* @return void
* @throws \Exception
* @throws \SmartyException
*/
public function AddDoubleRow($key, $value, $id = null)
{
Expand Down Expand Up @@ -483,6 +493,8 @@ public function AddPasswordRow($name, $key, $value, $errortext, $size = null, $o
/**
* @param array $table
* @return void
* @throws \Exception
* @throws \SmartyException
*/
public function AddTableRow($table)
{
Expand Down Expand Up @@ -610,6 +622,8 @@ public function AddTextAreaRow($name, $key, $value, $errortext, $cols = null, $r
* @param boolean $optional
* @param string $maxchar
* @return void
* @throws \Exception
* @throws \SmartyException
*/
public function AddTextAreaPlusRow($name, $key, $value, $errortext, $cols = null, $rows = null, $optional = null, $maxchar = null)
{
Expand Down Expand Up @@ -831,18 +845,20 @@ public function AddBarcodeForm($key, $value, $action, $method = "post", $errorte
}

/**
* @param string $name
* @param string $key
* @param int $time
* @param string $errortext
* @param array $values
* @param array $disableds
* @param int $start_year
* @param int $end_year
* @param int $hidetime 0 = All visible / 1 = Hide Time / 2 = Hide Date
* @param boolean $optional
* @param string $additional
* @param string $name
* @param string $key
* @param int $time
* @param string $errortext
* @param array $values
* @param array $disableds
* @param int $start_year
* @param int $end_year
* @param int $hidetime 0 = All visible / 1 = Hide Time / 2 = Hide Date
* @param boolean $optional
* @param string $additional
* @return void
* @throws \Exception
* @throws \SmartyException
*/
public function AddDateTimeRow($name, $key, $time, $errortext, $values = null, $disableds = null, $start_year = null, $end_year = null, $hidetime = null, $optional = null, $additional = null)
{
Expand Down Expand Up @@ -1202,6 +1218,8 @@ public function FetchSpanButton($title, $link, $hint = null, $target = null)
* @param string $target
* @param string $align
* @return string
* @throws \Exception
* @throws \SmartyException
*/
public function FetchIcon($picname, $link, $hint = null, $target = null, $align = 'left')
{
Expand Down Expand Up @@ -1270,6 +1288,8 @@ public function FetchIcon($picname, $link, $hint = null, $target = null, $align
* @param int $userid
* @param string $username
* @return string
* @throws \Exception
* @throws \SmartyException
*/
public function FetchUserIcon($userid, $username = '')
{
Expand Down
2 changes: 2 additions & 0 deletions inc/Classes/Framework.php
Expand Up @@ -310,6 +310,8 @@ public function AddToPageTitle($add)
* Display/output all HTML new version
*
* @return void
* @throws \Exception
* @throws \SmartyException
*/
public function html_out()
{
Expand Down

0 comments on commit 336f5bb

Please sign in to comment.