Fixing style errors.
This commit is contained in:
parent
debef2fb6d
commit
e4022e25e9
@ -39,45 +39,44 @@ class PartnershipUtils
|
|||||||
var $errors=array(); //!< To return several error codes (or messages)
|
var $errors=array(); //!< To return several error codes (or messages)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDb $db Database handler
|
* @param DoliDb $db Database handler
|
||||||
*/
|
*/
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action executed by scheduler to cancel status of partnership when subscription is expired + x days. (Max number of cancel per call = $conf->global->PARTNERSHIP_MAX_CANCEL_PER_CALL)
|
* Action executed by scheduler to cancel status of partnership when subscription is expired + x days. (Max number of cancel per call = $conf->global->PARTNERSHIP_MAX_CANCEL_PER_CALL)
|
||||||
*
|
*
|
||||||
* CAN BE A CRON TASK
|
* CAN BE A CRON TASK
|
||||||
*
|
*
|
||||||
* @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK)
|
* @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK)
|
||||||
*/
|
*/
|
||||||
public function doCancelStatusOfPartnership()
|
public function doCancelStatusOfPartnership()
|
||||||
{
|
{
|
||||||
global $conf, $langs, $user;
|
global $conf, $langs, $user;
|
||||||
|
|
||||||
$langs->load("agenda");
|
$langs->load("agenda");
|
||||||
|
|
||||||
$MAXPERCALL = (empty($conf->global->PARTNERSHIP_MAX_CANCEL_PER_CALL) ? 100 : $conf->global->PARTNERSHIP_MAX_CANCEL_PER_CALL); // Limit to 100 per call
|
$MAXPERCALL = (empty($conf->global->PARTNERSHIP_MAX_CANCEL_PER_CALL) ? 100 : $conf->global->PARTNERSHIP_MAX_CANCEL_PER_CALL); // Limit to 100 per call
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$this->output = '';
|
$this->output = '';
|
||||||
$this->error='';
|
$this->error='';
|
||||||
|
|
||||||
|
|
||||||
dol_syslog(__METHOD__." we cancel status of partnership ", LOG_DEBUG);
|
dol_syslog(__METHOD__." we cancel status of partnership ", LOG_DEBUG);
|
||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
// En cours de traitement ...
|
// En cours de traitement ...
|
||||||
|
|
||||||
return ($error ? 1: 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
return ($error ? 1: 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user