Update resource.class.php

This commit is contained in:
Frédéric FRANCE 2015-11-26 20:33:07 +01:00
parent 1b9039af36
commit e6033369a8

View File

@ -22,7 +22,6 @@
*/
// Put here all includes required by your class file
require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php";
require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php";
@ -403,7 +402,13 @@ class Resource extends CommonObject
}
$sql.= " GROUP BY t.rowid";
$sql.= $this->db->order($sortfield,$sortorder);
if ($limit) $sql.= $this->db->plimit($limit+1,$offset);
$this->num_all = 0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $this->db->query($sql);
$this->num_all = $this->db->num_rows($result);
}
if ($limit) $sql.= $this->db->plimit($limit, $offset);
dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG);
$resql=$this->db->query($sql);