forked from Wavyzz/dolibarr
FIX #3628
This commit is contained in:
@@ -88,7 +88,7 @@ $extrafields = new ExtraFields($db);
|
|||||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
// Load object
|
// Load object
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not includ_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('ordercard','globalcard'));
|
$hookmanager->initHooks(array('ordercard','globalcard'));
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
// $cancel must be defined
|
// $cancel must be defined
|
||||||
// $id or $ref must be defined (object is loaded in this file with fetch)
|
// $id or $ref must be defined (object is loaded in this file with fetch)
|
||||||
|
|
||||||
if (($id > 0 || ! empty($ref)) && empty($cancel))
|
if (($id > 0 || (! empty($ref) && ! in_array($action, array('create','createtask')))) && empty($cancel))
|
||||||
{
|
{
|
||||||
$ret = $object->fetch($id,$ref);
|
$ret = $object->fetch($id,$ref);
|
||||||
if ($ret > 0)
|
if ($ret > 0)
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ $hideref = (GETPOST('hideref','int') ? GETPOST('hideref','int') : (! empty($co
|
|||||||
$object = new Expedition($db);
|
$object = new Expedition($db);
|
||||||
|
|
||||||
// Load object. Make an object->fetch
|
// Load object. Make an object->fetch
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not includ_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('expeditioncard','globalcard'));
|
$hookmanager->initHooks(array('expeditioncard','globalcard'));
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ $object = new Project($db);
|
|||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
// Load object
|
// Load object
|
||||||
//include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Can use generic include because when creating a project, ref is defined and we dont want error if fetch fails from ref.
|
//include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Can't use generic include because when creating a project, ref is defined and we dont want error if fetch fails from ref.
|
||||||
if ($id > 0 || ! empty($ref))
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$ret = $object->fetch($id,$ref); // If we create project, ref may be defined into POST but record does not yet exists into database
|
$ret = $object->fetch($id,$ref); // If we create project, ref may be defined into POST but record does not yet exists into database
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ $mine = GETPOST('mode')=='mine' ? 1 : 0;
|
|||||||
|
|
||||||
$object = new Project($db);
|
$object = new Project($db);
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not includ_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ $result=restrictedArea($user,'projet',$id,'');
|
|||||||
|
|
||||||
$object = new Project($db);
|
$object = new Project($db);
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not includ_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
if ($id > 0 || ! empty($ref)) {
|
if ($id > 0 || ! empty($ref)) {
|
||||||
$upload_dir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ $projectid=$id; // For backward compatibility
|
|||||||
|
|
||||||
$object = new Project($db);
|
$object = new Project($db);
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not includ_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ $mine = ($mode == 'mine' ? 1 : 0);
|
|||||||
|
|
||||||
$object = new Project($db);
|
$object = new Project($db);
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not includ_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ $mine = $_REQUEST['mode']=='mine' ? 1 : 0;
|
|||||||
|
|
||||||
$object = new Project($db);
|
$object = new Project($db);
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not includ_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
|
|||||||
Reference in New Issue
Block a user