I tried it and it works perfectly, the pagination and the count of the results.
Thank you.
PS. I searched the files for this
grep -ir "_loadUserTable()"
and the result were:
oc-includes/osclass/model/Search.php: $this->_loadUserTable(); // private function _fromUser()
oc-includes/osclass/model/Search.php: $this->_loadUserTable(); // public function notFromUser($id)
oc-includes/osclass/model/Search.php: private function _loadUserTable()
So the only places it gets called are:
private function _fromUser()
{
$this->_loadUserTable();
$this->dao->where(sprintf('%st_user.pk_i_id = %st_item.fk_i_user_id',DB_TABLE_PREFIX,DB_TABLE_PREFIX));
if(is_array($this->user_ids)) {
$this->dao->where(" ( ".implode(" || ", $this->user_ids)." ) ");
} else {
$this->dao->where(sprintf("%st_item.fk_i_user_id = %d ", DB_TABLE_PREFIX, $this->user_ids));
}
}
public function notFromUser($id)
{
$this->_loadUserTable();
$this->dao->where(sprintf("((%st_user.pk_i_id = %st_item.fk_i_user_id AND %st_item.fk_i_user_id != %d) || %st_item.fk_i_user_id IS NULL) ",
DB_TABLE_PREFIX,
DB_TABLE_PREFIX,
DB_TABLE_PREFIX,
$id,
DB_TABLE_PREFIX));
}
So is there a problem if that table gets loaded each time?