Fix datapolicycron

This commit is contained in:
ptibogxiv 2020-05-15 01:18:53 +02:00 committed by GitHub
parent 92b245ae93
commit cb98ec4d23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -461,7 +461,7 @@ class DataPolicyCron
)
),
);
$this->db->begin();
foreach ($arrayofparameters as $key => $params)
@ -470,15 +470,15 @@ class DataPolicyCron
{
$sql = sprintf($params['sql'], (int) $conf->entity, (int) $conf->global->$key, (int) $conf->global->$key);
$resql = $db->query($sql);
$resql = $this->db->query($sql);
if ($resql && $db->num_rows($resql) > 0)
if ($resql && $this->db->num_rows($resql) > 0)
{
$num = $db->num_rows($resql);
$num = $this->db->num_rows($resql);
$i = 0;
require_once $params['file'];
$object = new $params['class']($db);
$object = new $params['class']($this->db);
while ($i < $num && ! $error)
{