';
diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php
index 2744946e215..ed0e0725bed 100644
--- a/htdocs/core/lib/files.lib.php
+++ b/htdocs/core/lib/files.lib.php
@@ -1091,21 +1091,19 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio
}
} elseif ($link) {
- if (dol_mkdir($upload_dir) >= 0) {
- require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
- $linkObject = new Link($db);
- $linkObject->entity = $conf->entity;
- $linkObject->url = $link;
- $linkObject->objecttype = GETPOST('objecttype', 'alpha');
- $linkObject->objectid = GETPOST('objectid', 'int');
- $linkObject->label = GETPOST('label', 'alpha');
- $res = $linkObject->create($user);
- $langs->load('link');
- if ($res > 0) {
- setEventMessages($langs->trans("LinkComplete"), null, 'mesgs');
- } else {
- setEventMessages($langs->trans("ErrorFileNotLinked"), null, 'errors');
- }
+ require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
+ $linkObject = new Link($db);
+ $linkObject->entity = $conf->entity;
+ $linkObject->url = $link;
+ $linkObject->objecttype = GETPOST('objecttype', 'alpha');
+ $linkObject->objectid = GETPOST('objectid', 'int');
+ $linkObject->label = GETPOST('label', 'alpha');
+ $res = $linkObject->create($user);
+ $langs->load('link');
+ if ($res > 0) {
+ setEventMessages($langs->trans("LinkComplete"), null, 'mesgs');
+ } else {
+ setEventMessages($langs->trans("ErrorFileNotLinked"), null, 'errors');
}
}
else
diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php
index ebc486fec7e..060155d6507 100644
--- a/htdocs/projet/tasks/contact.php
+++ b/htdocs/projet/tasks/contact.php
@@ -212,7 +212,7 @@ if ($id > 0 || ! empty($ref))
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
}
- dol_banner_tab($projectstatic, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+ dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
print '
';
print '
';
diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php
index 0108f754293..d985454119d 100644
--- a/htdocs/projet/tasks/document.php
+++ b/htdocs/projet/tasks/document.php
@@ -155,7 +155,7 @@ if ($object->id > 0)
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
}
- dol_banner_tab($projectstatic, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+ dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
print '
';
print '
';
diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php
index 0c4ab4b707f..f595f43bc2b 100644
--- a/htdocs/projet/tasks/note.php
+++ b/htdocs/projet/tasks/note.php
@@ -134,7 +134,7 @@ if ($object->id > 0)
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
}
- dol_banner_tab($projectstatic, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+ dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
print '
';
print '
';
diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php
index 3c6f9bb7e6e..cc0eb0fed6f 100644
--- a/htdocs/projet/tasks/task.php
+++ b/htdocs/projet/tasks/task.php
@@ -37,8 +37,8 @@ $langs->load("projects");
$langs->load("companies");
$id=GETPOST('id','int');
-$ref=GETPOST("ref",'alpha',1);
-$taskref=GETPOST("taskref",'alpha');
+$ref=GETPOST("ref",'alpha',1); // task ref
+$taskref=GETPOST("taskref",'alpha'); // task ref
$action=GETPOST('action','alpha');
$confirm=GETPOST('confirm','alpha');
$withproject=GETPOST('withproject','int');
@@ -246,7 +246,7 @@ if ($id > 0 || ! empty($ref))
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
}
- dol_banner_tab($projectstatic, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+ dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
print '
';
print '
';
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 49d57ae946e..6cb52588a89 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -324,7 +324,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
}
- dol_banner_tab($projectstatic, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+ dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
print '