Merge pull request #13893 from ptibogxiv/patch-340

Fix datapolicycron
This commit is contained in:
Laurent Destailleur 2020-05-15 14:04:16 +02:00 committed by GitHub
commit c7b1a43529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
{