diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php
index e797c89760f..1615199de43 100644
--- a/htdocs/comm/action/fiche.php
+++ b/htdocs/comm/action/fiche.php
@@ -616,7 +616,7 @@ if ($action == 'create')
$societe = new Societe($db);
$societe->fetch(GETPOST('socid','int'));
print $societe->getNomUrl(1);
- print '';
+ print '';
}
else
{
diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index ed32fcc9f0d..64da47920c2 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -226,7 +226,7 @@ class FormActions
/**
* Output list of type of event
*
- * @param string $selected Type pre-selected (can be 'manual', 'auto' or 'AC_xxx'
+ * @param string $selected Type pre-selected (can be 'manual', 'auto' or 'AC_xxx')
* @param string $htmlname Nom champ formulaire
* @param string $excludetype Type to exclude
* @param string $onlyautoornot Group list by auto events or not: We keep only the 2 generic lines (AC_OTH and AC_OTH_AUTO)
@@ -235,7 +235,7 @@ class FormActions
*/
function select_type_actions($selected='',$htmlname='actioncode',$excludetype='',$onlyautoornot=0, $hideinfohelp=0)
{
- global $langs,$user,$form;
+ global $langs,$user,$form,$conf;
if (! is_object($form)) $form=new Form($db);
@@ -250,6 +250,7 @@ class FormActions
if ($selected == 'manual') $selected='AC_OTH';
if ($selected == 'auto') $selected='AC_OTH_AUTO';
+ if (empty($selected) && ! empty($conf->global->AGENDA_DEFAULT_TYPE)) $selected=$conf->global->AGENDA_DEFAULT_TYPE;
print $form->selectarray($htmlname, $arraylist, $selected);
if ($user->admin && empty($onlyautoornot) && empty($hideinfohelp)) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
diff --git a/htdocs/core/class/html.formintervention.class.php b/htdocs/core/class/html.formintervention.class.php
index 0c42e1acdbc..2caeb30a6dc 100644
--- a/htdocs/core/class/html.formintervention.class.php
+++ b/htdocs/core/class/html.formintervention.class.php
@@ -64,7 +64,6 @@ class FormIntervention
$sql = 'SELECT f.rowid, f.ref, f.fk_soc, f.fk_statut';
$sql.= ' FROM '.MAIN_DB_PREFIX .'fichinter as f';
$sql.= " WHERE f.entity = ".$conf->entity;
- //if ($contratListId) $sql.= " AND c.rowid IN (".$contratListId.")";
if ($socid != '')
{
if ($socid == '0') $sql.= " AND (f.fk_soc = 0 OR f.fk_soc IS NULL)";
@@ -75,7 +74,7 @@ class FormIntervention
$resql=$db->query($sql);
if ($resql)
{
- $out.='