diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 64d80dbdbf2..e956f40a3e3 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -242,12 +242,12 @@ class Contact extends CommonObject $sql .= ", poste='".$this->db->escape($this->poste)."'"; $sql .= ", fax='".$this->db->escape($this->fax)."'"; $sql .= ", email='".$this->db->escape($this->email)."'"; - $sql .= ", note_private='".$this->db->escape($this->note_private)."'"; - $sql .= ", note_public='".$this->db->escape($this->note_public)."'"; - $sql .= ", phone = '".$this->db->escape($this->phone_pro)."'"; - $sql .= ", phone_perso = '".$this->db->escape($this->phone_perso)."'"; - $sql .= ", phone_mobile = '".$this->db->escape($this->phone_mobile)."'"; - $sql .= ", jabberid = '".$this->db->escape($this->jabberid)."'"; + $sql .= ", note_private = ".(isset($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null"); + $sql .= ", note_public = ".(isset($this->note_public)?"'".$this->db->escape($this->note_public)."'":"null"); + $sql .= ", phone = ".(isset($this->phone_pro)?"'".$this->db->escape($this->phone_pro)."'":"null"); + $sql .= ", phone_perso = ".(isset($this->phone_perso)?"'".$this->db->escape($this->phone_perso)."'":"null"); + $sql .= ", phone_mobile = ".(isset($this->phone_mobile)?"'".$this->db->escape($this->phone_mobile)."'":"null"); + $sql .= ", jabberid = ".(isset($this->jabberid)?"'".$this->db->escape($this->jabberid)."'":"null"); $sql .= ", priv = '".$this->priv."'"; $sql .= ", fk_user_modif=".($user->id > 0 ? "'".$user->id."'":"NULL"); $sql .= ", default_lang=".($this->default_lang?"'".$this->default_lang."'":"NULL"); diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index f79ff5766b0..794ebda1428 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -919,7 +919,9 @@ abstract class DolibarrModules dol_syslog(get_class($this)."::insert_permissions Add permission to user id=".$obj2->rowid); $tmpuser=new User($this->db); $tmpuser->fetch($obj2->rowid); - $tmpuser->addrights($r_id); + if (!empty($tmpuser->id)) { + $tmpuser->addrights($r_id); + } $i++; } if (! empty($user->admin)) // Reload permission for current user if defined diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 60dbbef1ee5..b2c4884cf3e 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -176,7 +176,9 @@ class Fichinter extends CommonObject // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); - $result=$interface->run_triggers('FICHINTER_CREATE',$this,$user,$langs,$conf); + $tmpuser=new User($this->db); + $tmpuser->fetch($this->author); + $result=$interface->run_triggers('FICHINTER_CREATE',$this,$tmpuser,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/holiday/admin/holiday.php b/htdocs/holiday/admin/holiday.php index e3a20662f5d..174adbdf725 100644 --- a/htdocs/holiday/admin/holiday.php +++ b/htdocs/holiday/admin/holiday.php @@ -286,7 +286,7 @@ print ''."\n"; $var=!$var; print ''."\n"; print ''.$langs->trans('DelayForSubmitCP').''."\n"; -print ' '.$langs->trans('Jours').''."\n"; +print ' '.$langs->trans('DurationDays').''."\n"; print ''."\n"; $var=!$var; @@ -304,13 +304,13 @@ print ''."\n"; $var=!$var; print ''."\n"; print ''.$langs->trans('nbHolidayEveryMonthCP').''."\n"; -print ' '.$langs->trans('Jours').''."\n"; +print ' '.$langs->trans('DurationDays').''."\n"; print ''."\n"; $var=!$var; print ''."\n"; print ''.$langs->trans('nbHolidayDeductedCP').''."\n"; -print ' '.$langs->trans('Jours').''."\n"; +print ' '.$langs->trans('DurationDays').''."\n"; print ''."\n"; print ''."\n"; @@ -367,7 +367,7 @@ if($cp_events == 1) { print ''."\n"; print ''."\n"; - print ' '.$langs->trans('Jours').''."\n"; + print ' '.$langs->trans('DurationDays').''."\n"; print ''."\n"; print ''."\n"; print ''; @@ -400,7 +400,7 @@ print ''; print ''; print ''."\n"; -print ' '.$langs->trans('Jours').''."\n"; +print ' '.$langs->trans('DurationDays').''."\n"; print ''."\n"; print ''."\n"; diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 55971e64375..b790b9154e9 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -124,7 +124,7 @@ class Holiday extends CommonObject // User $sql.= "'".$this->fk_user."',"; $sql.= " '".$this->db->idate($now)."',"; - $sql.= " '".addslashes($this->description)."',"; + $sql.= " '".$this->db->escape($this->description)."',"; $sql.= " '".$this->db->idate($this->date_debut)."',"; $sql.= " '".$this->db->idate($this->date_fin)."',"; $sql.= " ".$this->halfday.","; @@ -473,7 +473,7 @@ class Holiday extends CommonObject // Update request $sql = "UPDATE ".MAIN_DB_PREFIX."holiday SET"; - $sql.= " description= '".addslashes($this->description)."',"; + $sql.= " description= '".$this->db->escape($this->description)."',"; if(!empty($this->date_debut)) { $sql.= " date_debut = '".$this->db->idate($this->date_debut)."',"; @@ -527,7 +527,7 @@ class Holiday extends CommonObject $sql.= " fk_user_cancel = NULL,"; } if(!empty($this->detail_refuse)) { - $sql.= " detail_refuse = '".addslashes($this->detail_refuse)."'"; + $sql.= " detail_refuse = '".$this->db->escape($this->detail_refuse)."'"; } else { $sql.= " detail_refuse = NULL"; } @@ -1394,7 +1394,7 @@ class Holiday extends CommonObject $sql.= ") VALUES ("; - $sql.= " '".addslashes($this->optName)."',"; + $sql.= " '".$this->db->escape($this->optName)."',"; $sql.= " '".$this->optValue."'"; $sql.= ")"; @@ -1441,7 +1441,7 @@ class Holiday extends CommonObject function updateEventCP($rowid, $name, $value) { $sql = "UPDATE ".MAIN_DB_PREFIX."holiday_events SET"; - $sql.= " name = '".addslashes($name)."', value = '".$value."'"; + $sql.= " name = '".$this->db->escape($name)."', value = '".$value."'"; $sql.= " WHERE rowid = '".$rowid."'"; $result = $this->db->query($sql); @@ -1564,7 +1564,7 @@ class Holiday extends CommonObject */ function addLogCP($fk_user_action,$fk_user_update,$type,$new_solde) { - global $conf, $langs, $db; + global $conf, $langs; $error=0; @@ -1586,7 +1586,7 @@ class Holiday extends CommonObject $sql.= " NOW(), "; $sql.= " '".$fk_user_action."',"; $sql.= " '".$fk_user_update."',"; - $sql.= " '".addslashes($type)."',"; + $sql.= " '".$this->db->escape($type)."',"; $sql.= " '".$prev_solde."',"; $sql.= " '".$new_solde."'"; $sql.= ")"; diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 36e93d84271..82b8003a274 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -117,6 +117,7 @@ elseif($action == 'add_event') dol_htmloutput_mesg($message); } +$langs->load('users'); $var=true; $i = 0; diff --git a/htdocs/holiday/fiche.php b/htdocs/holiday/fiche.php index aa3287bc81a..83523ea4557 100644 --- a/htdocs/holiday/fiche.php +++ b/htdocs/holiday/fiche.php @@ -380,7 +380,7 @@ if($action == 'confirm_valid') $newSolde = $soldeActuel - ($nbJour*$cp->getConfCP('nbHolidayDeducted')); // On ajoute la modification dans le LOG - $cp->addLogCP($userID,$cp->fk_user, $langs->trans('Event').': '.$langs->transnoentitiesnoconv("Holidays"),$newSolde); + $cp->addLogCP($user->id,$cp->fk_user, $langs->trans('Event').': '.$langs->transnoentitiesnoconv("Holidays"),$newSolde); // Mise à jour du solde $cp->updateSoldeCP($cp->fk_user,$newSolde); diff --git a/htdocs/holiday/index.php b/htdocs/holiday/index.php index 8343a805081..4e85f261c3c 100644 --- a/htdocs/holiday/index.php +++ b/htdocs/holiday/index.php @@ -262,6 +262,7 @@ print_liste_field_titre($langs->trans("DateDebCP"),$_SERVER["PHP_SELF"],"cp.date print_liste_field_titre($langs->trans("DateFinCP"),$_SERVER["PHP_SELF"],"cp.date_fin","",'','align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Duration")); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"cp.statut","",'','align="center"',$sortfield,$sortorder); +print ''; print "\n"; // FILTRES @@ -320,6 +321,9 @@ print ' '; // STATUT print ''; $holiday->selectStatutCP($search_statut); +print ''; +// ACTION +print ''; print ''; print "\n"; diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index f184cdc201e..fc984971908 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -105,6 +105,8 @@ if($num == '0') { } else { + $langs->load('users'); + while ($holiday = $db->fetch_array($result)) { $user = new User($db); diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index 29c58c4dec7..2ff389925d0 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -39,6 +39,8 @@ if(!$user->rights->holiday->view_log) accessforbidden(); * View */ +$langs->load('users'); + llxHeader(array(),$langs->trans('CPTitreMenu')); diff --git a/htdocs/install/mysql/data/llx_c_forme_juridique.sql b/htdocs/install/mysql/data/llx_c_forme_juridique.sql index 965064d019c..6c242da0cfd 100644 --- a/htdocs/install/mysql/data/llx_c_forme_juridique.sql +++ b/htdocs/install/mysql/data/llx_c_forme_juridique.sql @@ -222,8 +222,8 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (4, '4 INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (4, '404', 'Sociedad Colectiva', 1); INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (4, '405', 'Sociedad Limitada', 1); INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (4, '406', 'Sociedad Anónima', 1); -INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (4, '407', 'Sociedad Comandataria por Acciones', 1); -INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (4, '408', 'Sociedad Comandataria Simple', 1); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (4, '407', 'Sociedad Comanditaria por Acciones', 1); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (4, '408', 'Sociedad Comanditaria Simple', 1); INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (4, '409', 'Sociedad Laboral', 1); INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (4, '410', 'Sociedad Cooperativa', 1); INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (4, '411', 'Sociedad de Garantía Recíproca', 1); diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index e17b5a4d556..e477ec3b6a5 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -3526,6 +3526,10 @@ function migrate_delete_old_files($db,$langs,$conf) DOL_DOCUMENT_ROOT.'/core/menus/smartphone/iphone.lib.php', DOL_DOCUMENT_ROOT.'/core/menus/smartphone/iphone_backoffice.php', DOL_DOCUMENT_ROOT.'/core/menus/smartphone/iphone_frontoffice.php', + DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria_backoffice.php', + DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria_frontoffice.php', + DOL_DOCUMENT_ROOT.'/core/menus/standard/eldy_backoffice.php', + DOL_DOCUMENT_ROOT.'/core/menus/standard/eldy_frontoffice.php', DOL_DOCUMENT_ROOT.'/core/modules/mailings/dolibarr_services_expired.modules.php', DOL_DOCUMENT_ROOT.'/core/modules/mailings/peche.modules.php', DOL_DOCUMENT_ROOT.'/core/modules/mailings/poire.modules.php', diff --git a/htdocs/langs/bg_BG/holiday.lang b/htdocs/langs/bg_BG/holiday.lang index 614539960d5..f47b404400d 100644 --- a/htdocs/langs/bg_BG/holiday.lang +++ b/htdocs/langs/bg_BG/holiday.lang @@ -128,7 +128,6 @@ DeleteEventOptionCP=Изтриване UpdateEventOptionCP=Актуализация ErrorMailNotSend=Възникна грешка при изпращане на електронна поща: NoCPforMonth=Не оставяйте този месец. -Jours=ден nbJours=Брой дни TitleAdminCP=Конфигурация на празници Permission20001=/ Промяна на всички искания празници diff --git a/htdocs/langs/ca_ES/holiday.lang b/htdocs/langs/ca_ES/holiday.lang index 60adaa8faf3..3c51daaa2ed 100644 --- a/htdocs/langs/ca_ES/holiday.lang +++ b/htdocs/langs/ca_ES/holiday.lang @@ -129,7 +129,6 @@ DeleteEventOptionCP=Eliminar UpdateEventOptionCP=Actualitzar ErrorMailNotSend=S'ha produït un error en l'enviament del correu electrònic: NoCPforMonth=Sense vacances aquest mes. -Jours=dies nbJours=Número de dies TitleAdminCP=Configuració de les vacances diff --git a/htdocs/langs/en_US/holiday.lang b/htdocs/langs/en_US/holiday.lang index 5453b2b88e6..dec1ca36aa8 100644 --- a/htdocs/langs/en_US/holiday.lang +++ b/htdocs/langs/en_US/holiday.lang @@ -129,7 +129,6 @@ DeleteEventOptionCP=Delete UpdateEventOptionCP=Update ErrorMailNotSend=An error occurred while sending email: NoCPforMonth=No leave this month. -Jours=days nbJours=Number days TitleAdminCP=Configuration of Holidays diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 15a055de27a..13052863068 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -51,7 +51,7 @@ DisableJavascript=Desactivar las funciones Javascript ConfirmAjax=Utilizar los popups de confirmación Ajax UseSearchToSelectCompany=Utilizar un formulario de búsqueda para buscar terceros (en vez de lista desplegable)

Tenga en cuenta que si tiene un gran número de productos o servicios (>100 000), puede mejorar el rendimiento mediante la constante SOCIETE_DONOTSEARCH_ANYWHERE a 1 en Configuración->Varios. La búsqueda se limitará entonces al inicio de la cadena. ActivityStateToSelectCompany=Agregar un filtro en la búsqueda para mostrar/ocultar los terceros en activo o que hayan dejado de ejercer -UseSearchToSelectContact=Utilizar un formulario de búsqueda (en vez de una lista desplegable).
Tenga en cuenta que si tiene un gran número de contactos (>100 000), puede mejorar el rendimiento mediante la constante CONTACT_DONOTSEARCH_ANYWHERE a 1 en Configuración->Varios. La búsqueda se limitará entonces al inicio de la cadena. +UseSearchToSelectContact=Utilizar un formulario de búsqueda para buscar contactos (en vez de una lista desplegable).
Tenga en cuenta que si tiene un gran número de contactos (>100 000), puede mejorar el rendimiento mediante la constante CONTACT_DONOTSEARCH_ANYWHERE a 1 en Configuración->Varios. La búsqueda se limitará entonces al inicio de la cadena. SearchFilter=Opciones filtros de búsqueda NumberOfKeyToSearch=Nº de caracteres para desencadenar la búsqueda: %s ViewFullDateActions=Ver las fechas de las acciones en su totalidad en la ficha de tercero diff --git a/htdocs/langs/es_ES/holiday.lang b/htdocs/langs/es_ES/holiday.lang index 5c234575d25..520fd4454ae 100644 --- a/htdocs/langs/es_ES/holiday.lang +++ b/htdocs/langs/es_ES/holiday.lang @@ -129,7 +129,6 @@ DeleteEventOptionCP=Eliminar UpdateEventOptionCP=Actualizar ErrorMailNotSend=Se ha producido un error en el envío del e-mail : NoCPforMonth=Sin vacaciones este mes. -Jours=días nbJours=Número de días TitleAdminCP=Configuración de las vacaciones diff --git a/htdocs/langs/fr_FR/holiday.lang b/htdocs/langs/fr_FR/holiday.lang index 938ffaa155d..35a043504eb 100644 --- a/htdocs/langs/fr_FR/holiday.lang +++ b/htdocs/langs/fr_FR/holiday.lang @@ -127,7 +127,6 @@ DeleteEventOptionCP=Supprimer UpdateEventOptionCP=Mettre à jour ErrorMailNotSend=Une erreur est survenue lors de l'envoi du mail : NoCPforMonth=Aucun congé ce mois-ci. -Jours=jours nbJours=Nombre jours TitleAdminCP=Configuration des Congés diff --git a/htdocs/langs/tr_TR/holiday.lang b/htdocs/langs/tr_TR/holiday.lang index d9291737449..b02bea2fe92 100644 --- a/htdocs/langs/tr_TR/holiday.lang +++ b/htdocs/langs/tr_TR/holiday.lang @@ -126,7 +126,6 @@ DeleteEventOptionCP=Sil UpdateEventOptionCP=Güncelle ErrorMailNotSend=Eposta gönderilirken bir hata oluştu: NoCPforMonth=Bu ay hiç izin yok. -Jours=gün nbJours=Gün sayısı TitleAdminCP=Tatillerin Yapılandırması Permission20001=Bütün tatil isteklerini Oku / Değiştir diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index 3b5b2d46ec5..718dea6f6d6 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -278,4 +278,4 @@ $(document).ready(function() { $("#markRate").html(""); }); - \ No newline at end of file + diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php index 6af526492fe..e92192c0d71 100644 --- a/htdocs/margin/customerMargins.php +++ b/htdocs/margin/customerMargins.php @@ -183,6 +183,7 @@ $sql.= " ORDER BY $sortfield $sortorder "; // TODO: calculate total to display then restore pagination //$sql.= $db->plimit($conf->liste_limit +1, $offset); +dol_syslog('margin::customerMargins.php sql='.$sql,LOG_DEBUG); $result = $db->query($sql); if ($result) { @@ -303,4 +304,4 @@ $(document).ready(function() { $("#markRate").html(""); }); - \ No newline at end of file + diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php index 6fc92f94860..55a13e83094 100644 --- a/htdocs/margin/tabs/productMargins.php +++ b/htdocs/margin/tabs/productMargins.php @@ -264,4 +264,4 @@ $(document).ready(function() { $("#marginRate").html(""); $("#markRate").html(""); }); - \ No newline at end of file + diff --git a/scripts/invoices/email_unpaid_invoices_to_customers.php b/scripts/invoices/email_unpaid_invoices_to_customers.php index 0c069d04683..972cbb7d429 100755 --- a/scripts/invoices/email_unpaid_invoices_to_customers.php +++ b/scripts/invoices/email_unpaid_invoices_to_customers.php @@ -174,7 +174,7 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldcustomer) $subject = "[".(empty($conf->global->MAIN_APPLICATION_TITLE)?'Dolibarr':$conf->global->MAIN_APPLICATION_TITLE)."] ".$newlangs->trans("ListOfYourUnpaidInvoices"); $sendto = $oldemail; - $from = $conf->global->MAIN_EMAIL_FROM; + $from = $conf->global->MAIN_MAIL_EMAIL_FROM; $errorsto = $conf->global->MAIN_MAIL_ERRORS_TO; $msgishtml = 0; diff --git a/scripts/invoices/email_unpaid_invoices_to_representatives.php b/scripts/invoices/email_unpaid_invoices_to_representatives.php index 77bd9ee6402..8999d41604c 100755 --- a/scripts/invoices/email_unpaid_invoices_to_representatives.php +++ b/scripts/invoices/email_unpaid_invoices_to_representatives.php @@ -177,7 +177,7 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldsalerepresenta $subject = "[".(empty($conf->global->MAIN_APPLICATION_TITLE)?'Dolibarr':$conf->global->MAIN_APPLICATION_TITLE)."] ".$newlangs->trans("ListOfYourUnpaidInvoices"); $sendto = $oldemail; - $from = $conf->global->MAIN_EMAIL_FROM; + $from = $conf->global->MAIN_MAIL_EMAIL_FROM; $errorsto = $conf->global->MAIN_MAIL_ERRORS_TO; $msgishtml = 0;