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