';
$titleassigntask = $langs->transnoentities("AssignTaskToMe");
if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs));
print '
';
+print img_picto('', 'projecttask');
$formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.$langs->trans("ChooseANotYetAssignedTask").' --', 1, 0, 0, '', '', 'all', $usertoprocess);
print '
';
print ' ';
@@ -555,22 +556,22 @@ if (! empty($conf->categorie->enabled))
// If the user can view user other than himself
$moreforfilter .= '
';
-$moreforfilter .= '
'.$langs->trans('User').'
';
+$moreforfilter .= '
';
$includeonly = 'hierarchyme';
if (empty($user->rights->user->user->lire)) $includeonly = array($user->id);
-$moreforfilter .= $form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->rights->user->user->lire ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
+$moreforfilter .= img_picto($langs->trans('User'), 'user').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->rights->user->user->lire ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
$moreforfilter .= '
';
if (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT))
{
$moreforfilter .= '
';
- $moreforfilter .= '
'.$langs->trans('Project').'
';
- $moreforfilter .= '
';
+ $moreforfilter .= '
';
+ $moreforfilter .= img_picto($langs->trans('Project'), 'project').'
';
$moreforfilter .= '
';
$moreforfilter .= '
';
- $moreforfilter .= '
'.$langs->trans('ThirdParty').'
';
- $moreforfilter .= '
';
+ $moreforfilter .= '
';
+ $moreforfilter .= img_picto($langs->trans('ThirdParty'), 'company').'
';
$moreforfilter .= '
';
}
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 653083bed04..364cb30633a 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -174,7 +174,8 @@ if (empty($reshook))
if (!$error && $result > 0)
{
// Add myself as project leader
- $result = $object->add_contact($user->id, 'PROJECTLEADER', 'internal');
+ $typeofcontact = 'PROJECTLEADER'; // TODO If use rename this code in dictionary, the add_contact will generate an error.
+ $result = $object->add_contact($user->id, $typeofcontact, 'internal');
if ($result < 0)
{
$langs->load("errors");
diff --git a/htdocs/projet/graph_opportunities.inc.php b/htdocs/projet/graph_opportunities.inc.php
index 9588951307a..66b04527772 100644
--- a/htdocs/projet/graph_opportunities.inc.php
+++ b/htdocs/projet/graph_opportunities.inc.php
@@ -69,7 +69,7 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
$listofstatus = array_keys($listofoppstatus);
// Complete with values found into database and not into the dictionary
foreach ($valsamount as $key => $val) {
- if (!in_array($key, $listofstatus)) {
+ if (!in_array($key, $listofstatus) && $key) {
$listofstatus[] = $key;
}
}
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index cb92be401c1..5cca624d11f 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -1046,13 +1046,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
$title = $langs->trans("ListTaskTimeUserProject");
- print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $linktocreatetime, '', $limit, 0, 0, 1);
+ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1);
} else {
print ''."\n";
$title = $langs->trans("ListTaskTimeForTask");
- print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $linktocreatetime, '', $limit, 0, 0, 1);
+ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1);
}
$i = 0;
@@ -1120,7 +1120,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
else $userid = $contactsofproject[0];
if ($projectstatic->public) $contactsofproject = array();
- print $form->select_dolusers((GETPOST('userid', 'int') ? GETPOST('userid', 'int') : $userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'maxwidth200');
+ print $form->select_dolusers((GETPOST('userid', 'int') ? GETPOST('userid', 'int') : $userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'maxwidth250');
} else {
if ($nboftasks) {
print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime');
@@ -1204,7 +1204,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
if (!empty($arrayfields['t.task_label']['checked'])) print '
| ';
}
// Author
- if (!empty($arrayfields['author']['checked'])) print '
'.$form->select_dolusers(($search_user > 0 ? $search_user : -1), 'search_user', 1, null, 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth150').' | ';
+ if (!empty($arrayfields['author']['checked'])) print '
'.$form->select_dolusers(($search_user > 0 ? $search_user : -1), 'search_user', 1, null, 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250').' | ';
// Note
if (!empty($arrayfields['t.note']['checked'])) print '
| ';
// Duration
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index ec748d95e94..d7ae96cde94 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -818,7 +818,7 @@ if (!empty($arrayfields['country.code_iso']['checked']))
if (!empty($arrayfields['typent.code']['checked']))
{
print '
';
- print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), 'maxwidth75', 1);
+ print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), 'maxwidth75', 1);
print ' | ';
}
// Staff
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index d2277cadf68..1aac46933f2 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -1420,10 +1420,10 @@ class User extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."user";
$sql .= " SET fk_socpeople=".$contact->id;
$sql .= ", civility='".$this->db->escape($contact->civility_code)."'";
- if ($contact->socid) {
+ if ($contact->socid > 0) {
$sql .= ", fk_soc=".$contact->socid;
}
- $sql .= " WHERE rowid=".$this->id;
+ $sql .= " WHERE rowid=".((int) $this->id);
$resql = $this->db->query($sql);
diff --git a/scripts/emailings/reset-invalid-emails.php b/scripts/emailings/reset-invalid-emails.php
index bc35f0f4240..8730d66b96d 100755
--- a/scripts/emailings/reset-invalid-emails.php
+++ b/scripts/emailings/reset-invalid-emails.php
@@ -62,7 +62,7 @@ $user = new User($db);
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
-if (!in_array($type, array('thirdparties', 'contacts', 'users', 'members'))) {
+if (!in_array($type, array('all', 'thirdparties', 'contacts', 'users', 'members'))) {
print "Bad value for parameter type.\n";
exit(-1);
}