FIX : Fetch function will fetch comments

This commit is contained in:
ATM-Nicolas 2018-04-24 09:17:03 +02:00
parent fdb3a11f34
commit 3d179fb7d3

View File

@ -194,7 +194,7 @@ class Task extends CommonObject
*/
function fetch($id, $ref='', $loadparentdata=0)
{
global $langs;
global $langs, $conf;
$sql = "SELECT";
$sql.= " t.rowid,";
@ -267,7 +267,11 @@ class Task extends CommonObject
}
// Retreive all extrafield data
$this->fetch_optionals();
$this->fetch_optionals();
if(! empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK)) {
$this->fetchComments();
}
}
$this->db->free($resql);