Fix warnings

This commit is contained in:
Laurent Destailleur 2020-12-16 11:33:31 +01:00
parent c6f83aaed7
commit 5facd49a6c
3 changed files with 6 additions and 6 deletions

View File

@ -512,13 +512,13 @@ class ChargeSociales extends CommonObject
* Return a link to the object card (with optionaly the picto) * Return a link to the object card (with optionaly the picto)
* *
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
* @param int $maxlen Max length of label * @param string $option On what the link point to ('nolink', ...)
* @param int $notooltip 1=Disable tooltip * @param int $notooltip 1=Disable tooltip
* @param int $short 1=Return just URL * @param int $short 1=Return just URL
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string String with link * @return string String with link
*/ */
public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $short = 0, $save_lastsearch_value = -1) public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $short = 0, $save_lastsearch_value = -1)
{ {
global $langs, $conf, $user, $form; global $langs, $conf, $user, $form;
@ -569,7 +569,7 @@ class ChargeSociales extends CommonObject
$result .= $linkstart; $result .= $linkstart;
if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
if ($withpicto != 2) $result .= ($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref); if ($withpicto != 2) $result .= $this->ref;
$result .= $linkend; $result .= $linkend;
return $result; return $result;

View File

@ -166,8 +166,7 @@ class Entrepot extends CommonObject
$this->db = $db; $this->db = $db;
$this->statuts[self::STATUS_CLOSED] = 'Closed2'; $this->statuts[self::STATUS_CLOSED] = 'Closed2';
if ($conf->global->ENTREPOT_EXTRA_STATUS) if (!empty($conf->global->ENTREPOT_EXTRA_STATUS)) {
{
$this->statuts[self::STATUS_OPEN_ALL] = 'OpenAll'; $this->statuts[self::STATUS_OPEN_ALL] = 'OpenAll';
$this->statuts[self::STATUS_OPEN_INTERNAL] = 'OpenInternal'; $this->statuts[self::STATUS_OPEN_INTERNAL] = 'OpenInternal';
} else { } else {

View File

@ -219,7 +219,8 @@ class EntrepotTest extends PHPUnit\Framework\TestCase
$langs=$this->savlangs; $langs=$this->savlangs;
$db=$this->savdb; $db=$this->savdb;
//$this->assertLessThan(1, 0); $result = $localobject->get_full_arbo();
$this->assertEquals('WAREHOUSE SPECIMEN', $result);
return $localobject->id; return $localobject->id;
} }