diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index c8ba5b10505..3b071f57fa8 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -45,6 +45,34 @@ $action = GETPOST('action', 'alpha'); * Actions */ + +if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg)) +{ + $code=$reg[1]; + $value=GETPOST($code, 'alpha'); + if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) + { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + +if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg)) +{ + $code=$reg[1]; + if (dolibarr_del_const($db, $code, 0) > 0) + { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + if ($action == 'add_currency') { $error=0; diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index f7ec3beccc4..c774c9f83c6 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -33,6 +33,7 @@ // $permtoread, $permtocreate and $permtodelete may be defined // $uploaddir may be defined (example to $conf->projet->dir_output."/";) // $toselect may be defined +// $diroutputmassaction may be defined // Protection @@ -1268,6 +1269,8 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) $parameters['toselect']=$toselect; $parameters['uploaddir']=$uploaddir; +$parameters['massaction']=$massaction; +$parameters['diroutputmassaction']=$diroutputmassaction; $reshook=$hookmanager->executeHooks('doMassActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index f100e8629e7..5d2ed5126af 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -247,8 +247,8 @@ class modProjet extends DolibarrModules $keyforselect='projet'; $keyforelement='project'; $keyforaliasextra='extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; // Add fields for tasks - $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('pt.rowid'=>'RefTask','pt.label'=>'LabelTask','pt.dateo'=>"TaskDateStart",'pt.datee'=>"TaskDateEnd",'pt.duration_effective'=>"DurationEffective",'pt.planned_workload'=>"PlannedWorkload",'pt.progress'=>"Progress",'pt.description'=>"TaskDescription")); - $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('pt.rowid'=>'projecttask','pt.label'=>'projecttask','pt.dateo'=>"projecttask",'pt.datee'=>"projecttask",'pt.duration_effective'=>"projecttask",'pt.planned_workload'=>"projecttask",'pt.progress'=>"projecttask",'pt.description'=>"projecttask")); + $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('pt.rowid'=>'TaskId', 'pt.ref'=>'RefTask', 'pt.label'=>'LabelTask','pt.dateo'=>"TaskDateStart",'pt.datee'=>"TaskDateEnd",'pt.duration_effective'=>"DurationEffective",'pt.planned_workload'=>"PlannedWorkload",'pt.progress'=>"Progress",'pt.description'=>"TaskDescription")); + $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('pt.rowid'=>'projecttask', 'pt.ref'=>'projecttask', 'pt.label'=>'projecttask','pt.dateo'=>"projecttask",'pt.datee'=>"projecttask",'pt.duration_effective'=>"projecttask",'pt.planned_workload'=>"projecttask",'pt.progress'=>"projecttask",'pt.description'=>"projecttask")); // Add extra fields for task $keyforselect='projet_task'; $keyforelement='projecttask'; $keyforaliasextra='extra2'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';