Skip to content

Commit

Permalink
FIX a task without project inclusion call a non included object Link
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis Algoud committed Jun 16, 2016
1 parent 49d515b commit 25fe110
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions htdocs/core/lib/project.lib.php
Expand Up @@ -162,6 +162,7 @@ function task_prepare_head($object)
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/document.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
$filesdir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->project->ref) . '/' .dol_sanitizeFileName($object->ref);
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
include_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
$nbFiles = count(dol_dir_list($filesdir,'files',0,'','(\.meta|_preview\.png)$'));
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][1] = $langs->trans('Documents');
Expand Down

0 comments on commit 25fe110

Please sign in to comment.