2
0
forked from Wavyzz/dolibarr
This commit is contained in:
Laurent Destailleur
2015-10-01 16:50:18 +02:00
parent e76124add5
commit 60c0338d64
9 changed files with 9 additions and 9 deletions

View File

@@ -88,7 +88,7 @@ $extrafields = new ExtraFields($db);
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
// 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
$hookmanager->initHooks(array('ordercard','globalcard'));

View File

@@ -28,7 +28,7 @@
// $cancel must be defined
// $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);
if ($ret > 0)

View File

@@ -77,7 +77,7 @@ $hideref = (GETPOST('hideref','int') ? GETPOST('hideref','int') : (! empty($co
$object = new Expedition($db);
// 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
$hookmanager->initHooks(array('expeditioncard','globalcard'));

View File

@@ -55,7 +55,7 @@ $object = new Project($db);
$extrafields = new ExtraFields($db);
// 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))
{
$ret = $object->fetch($id,$ref); // If we create project, ref may be defined into POST but record does not yet exists into database

View File

@@ -42,7 +42,7 @@ $mine = GETPOST('mode')=='mine' ? 1 : 0;
$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
$socid=0;

View File

@@ -47,7 +47,7 @@ $result=restrictedArea($user,'projet',$id,'');
$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)) {
$upload_dir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->ref);

View File

@@ -87,7 +87,7 @@ $projectid=$id; // For backward compatibility
$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
$socid=0;

View File

@@ -39,7 +39,7 @@ $mine = ($mode == 'mine' ? 1 : 0);
$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
$socid=0;

View File

@@ -37,7 +37,7 @@ $mine = $_REQUEST['mode']=='mine' ? 1 : 0;
$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
$socid=0;