Fix warnings
This commit is contained in:
parent
4a61c9687f
commit
d7d0ebe5d2
@ -61,20 +61,15 @@ abstract class ActionsAdherentCardCommon
|
||||
*/
|
||||
public function getObject($id)
|
||||
{
|
||||
//$ret = $this->getInstanceDao();
|
||||
$object = new Adherent($this->db);
|
||||
|
||||
/*if (is_object($this->object) && method_exists($this->object,'fetch'))
|
||||
{
|
||||
if (!empty($id)) $this->object->fetch($id);
|
||||
}
|
||||
else
|
||||
{*/
|
||||
$object = new Adherent($this->db);
|
||||
if (!empty($id)) {
|
||||
$object->fetch($id);
|
||||
}
|
||||
$this->object = $object;
|
||||
//}
|
||||
|
||||
$this->object = $object;
|
||||
|
||||
return $object;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
@ -83,7 +78,7 @@ abstract class ActionsAdherentCardCommon
|
||||
*
|
||||
* @param string $action Type of action
|
||||
* @param int $id Id
|
||||
* @return string HTML output
|
||||
* @return void
|
||||
*/
|
||||
public function assign_values(&$action, $id)
|
||||
{
|
||||
|
||||
@ -84,7 +84,6 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
||||
public function assign_values(&$action, $id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $limit, $offset, $sortfield, $sortorder;
|
||||
global $conf, $db, $langs, $user;
|
||||
global $form;
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ abstract class ActionsContactCardCommon
|
||||
*
|
||||
* @param string $action Type of action
|
||||
* @param int $id Id
|
||||
* @return string HTML output
|
||||
* @return void
|
||||
*/
|
||||
public function assign_values(&$action, $id)
|
||||
{
|
||||
|
||||
@ -83,7 +83,6 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
|
||||
public function assign_values(&$action, $id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $limit, $offset, $sortfield, $sortorder;
|
||||
global $conf, $db, $langs, $user;
|
||||
global $form;
|
||||
|
||||
|
||||
@ -303,9 +303,11 @@ class Delivery extends CommonObject
|
||||
$result = $line->insertExtraFields();
|
||||
}
|
||||
|
||||
if ($error == 0) {
|
||||
if (!$error) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -519,8 +521,10 @@ class Delivery extends CommonObject
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
} else {
|
||||
$this->error = "Non autorise";
|
||||
$this->error = "NotAllowed";
|
||||
dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
@ -639,7 +643,7 @@ class Delivery extends CommonObject
|
||||
* Delete line
|
||||
*
|
||||
* @param int $lineid Line id
|
||||
* @return integer|null
|
||||
* @return integer <0 if KO, 0 if nothing done, >0 if OK
|
||||
*/
|
||||
public function deleteline($lineid)
|
||||
{
|
||||
@ -652,9 +656,11 @@ class Delivery extends CommonObject
|
||||
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -77,7 +77,6 @@ class ActionsCardProduct
|
||||
public function assign_values(&$action, $id = 0, $ref = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $limit, $offset, $sortfield, $sortorder;
|
||||
global $conf, $langs, $user, $mysoc, $canvas;
|
||||
global $form, $formproduct;
|
||||
|
||||
|
||||
@ -81,9 +81,8 @@ class ActionsCardService
|
||||
public function assign_values(&$action, $id = 0, $ref = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $limit, $offset, $sortfield, $sortorder;
|
||||
global $conf, $langs, $user, $mysoc, $canvas;
|
||||
global $form, $formproduct;
|
||||
global $form;
|
||||
|
||||
$tmpobject = new Product($this->db);
|
||||
if (!empty($id) || !empty($ref)) {
|
||||
|
||||
@ -88,7 +88,7 @@ class ActionsCardCompany extends ActionsCardCommon
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs, $user, $mysoc;
|
||||
global $form, $formadmin, $formcompany;
|
||||
global $form, $formcompany;
|
||||
|
||||
$ret = $this->getObject($id, $ref);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user