Merge pull request #907 from FHenry/3.3
[ bug #865 ] Dolibarr navigation array in project/task do not work
This commit is contained in:
commit
f8b133dad4
@ -35,6 +35,7 @@ class Project extends CommonObject
|
||||
public $table_element = 'projet'; //!< Name of table without prefix where object is stored
|
||||
public $table_element_line = 'projet_task';
|
||||
public $fk_element = 'fk_projet';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
var $id;
|
||||
var $ref;
|
||||
@ -51,6 +52,7 @@ class Project extends CommonObject
|
||||
var $statuts_short;
|
||||
var $statuts;
|
||||
var $oldcopy;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@ -43,12 +43,6 @@ if ($id == '' && $ref == '' && ($action != "create" && $action != "add" && $acti
|
||||
$mine = GETPOST('mode')=='mine' ? 1 : 0;
|
||||
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
|
||||
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
if ($user->societe_id > 0) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'projet', $id);
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||
$hookmanager=new HookManager($db);
|
||||
@ -61,6 +55,11 @@ if ($object->id > 0)
|
||||
$object->fetch_thirdparty();
|
||||
}
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
if ($user->societe_id > 0) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'projet', $object->id);
|
||||
|
||||
$date_start=dol_mktime(0,0,0,GETPOST('projectmonth','int'),GETPOST('projectday','int'),GETPOST('projectyear','int'));
|
||||
$date_end=dol_mktime(0,0,0,GETPOST('projectendmonth','int'),GETPOST('projectendday','int'),GETPOST('projectendyear','int'));;
|
||||
|
||||
@ -720,10 +719,13 @@ else
|
||||
|
||||
print '</td><td valign="top" width="50%">';
|
||||
|
||||
// List of actions on element
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||
$formactions=new FormActions($db);
|
||||
$somethingshown=$formactions->showactions($object,'project',$socid);
|
||||
if (!empty($object->id))
|
||||
{
|
||||
// List of actions on element
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||
$formactions=new FormActions($db);
|
||||
$somethingshown=$formactions->showactions($object,'project',$socid);
|
||||
}
|
||||
|
||||
print '</td></tr></table>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user