Fix: missing action type for hookmanager
This commit is contained in:
parent
2ecb9262e7
commit
54d4661769
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -318,7 +318,7 @@ class Adherent extends CommonObject
|
||||
$this->ref=$id;
|
||||
|
||||
// Update minor fields
|
||||
$result=$this->update($user,1,1); // nosync is 1 to avoid update data of user
|
||||
$result=$this->update($user,1,1,0,0,'add'); // nosync is 1 to avoid update data of user
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->db->rollback();
|
||||
@ -390,9 +390,10 @@ class Adherent extends CommonObject
|
||||
* @param int $nosyncuser 0=Synchronize linked user (standard info), 1=Do not synchronize linked user
|
||||
* @param int $nosyncuserpass 0=Synchronize linked user (password), 1=Do not synchronize linked user
|
||||
* @param int $nosyncthirdparty 0=Synchronize linked thirdparty (standard info), 1=Do not synchronize linked thirdparty
|
||||
* @param string $action Current action for hookmanager
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdparty=0)
|
||||
function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdparty=0,$action='update')
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
|
||||
@ -148,7 +148,7 @@ class Contact extends CommonObject
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$result=$this->update($this->id, $user, 1);
|
||||
$result=$this->update($this->id, $user, 1, 'add');
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
@ -203,10 +203,11 @@ class Contact extends CommonObject
|
||||
*
|
||||
* @param int $id Id of contact/address to update
|
||||
* @param User $user Objet user making change
|
||||
* @param int $notrigger 0=no, 1=yesi
|
||||
* @param int $notrigger 0=no, 1=yes
|
||||
* @param string $action Current action for hookmanager
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function update($id, $user=0, $notrigger=0)
|
||||
function update($id, $user=0, $notrigger=0, $action='update')
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
|
||||
@ -326,7 +326,7 @@ class Product extends CommonObject
|
||||
$result = $this->_log_price($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
if ($this->update($id, $user, true) > 0)
|
||||
if ($this->update($id, $user, true, 'add') > 0)
|
||||
{
|
||||
// FIXME: not use here
|
||||
/*
|
||||
@ -404,9 +404,10 @@ class Product extends CommonObject
|
||||
* @param int $id Id of product
|
||||
* @param User $user Object user making update
|
||||
* @param int $notrigger Disable triggers
|
||||
* @param string $action Current action for hookmanager
|
||||
* @return int 1 if OK, -1 if ref already exists, -2 if other error
|
||||
*/
|
||||
function update($id, $user, $notrigger=false)
|
||||
function update($id, $user, $notrigger=false, $action='update')
|
||||
{
|
||||
global $langs, $conf;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user