diff --git a/dev/initdata/mysqldump_dolibarr_3.3.0.sql b/dev/initdata/mysqldump_dolibarr_3.3.0.sql index 9cc783e1b80..83f224ddd99 100644 --- a/dev/initdata/mysqldump_dolibarr_3.3.0.sql +++ b/dev/initdata/mysqldump_dolibarr_3.3.0.sql @@ -34,7 +34,7 @@ CREATE TABLE `llx_accountingaccount` ( PRIMARY KEY (`rowid`), KEY `idx_accountingaccount_fk_pcg_version` (`fk_pcg_version`), CONSTRAINT `fk_accountingaccount_fk_pcg_version` FOREIGN KEY (`fk_pcg_version`) REFERENCES `llx_accountingsystem` (`pcg_version`) -) ENGINE=InnoDB AUTO_INCREMENT=439 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=439 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -86,7 +86,7 @@ CREATE TABLE `llx_accountingsystem` ( `active` smallint(6) DEFAULT '0', PRIMARY KEY (`rowid`), KEY `idx_accountingsystem_pcg_version` (`pcg_version`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1075,7 +1075,7 @@ CREATE TABLE `llx_c_currencies` ( `unicode` varchar(32) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`code_iso`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2975,7 +2975,7 @@ CREATE TABLE `llx_element_tag` ( `element` varchar(64) NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_element_tag` (`entity`,`lang`,`tag`,`fk_element`,`element`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3796,7 +3796,7 @@ CREATE TABLE `llx_holiday` ( KEY `idx_holiday_fk_user` (`fk_user`), KEY `idx_holiday_date_debut` (`date_debut`), KEY `idx_holiday_date_fin` (`date_fin`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3821,7 +3821,7 @@ CREATE TABLE `llx_holiday_config` ( `value` text, PRIMARY KEY (`rowid`), UNIQUE KEY `name` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3848,7 +3848,7 @@ CREATE TABLE `llx_holiday_events` ( `value` text NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_holiday_name` (`name`,`entity`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3876,7 +3876,7 @@ CREATE TABLE `llx_holiday_logs` ( `prev_solde` varchar(255) NOT NULL, `new_solde` varchar(255) NOT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3899,7 +3899,7 @@ CREATE TABLE `llx_holiday_users` ( `fk_user` int(11) NOT NULL, `nb_holiday` double NOT NULL DEFAULT '0', PRIMARY KEY (`fk_user`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4919,7 +4919,7 @@ CREATE TABLE `llx_product_price_by_qty` ( UNIQUE KEY `uk_product_price_by_qty_level` (`fk_product_price`,`qty_min`), KEY `idx_product_price_by_qty_fk_product_price` (`fk_product_price`), CONSTRAINT `fk_product_price_by_qty_fk_product_price` FOREIGN KEY (`fk_product_price`) REFERENCES `llx_product_price` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5250,7 +5250,7 @@ CREATE TABLE `llx_publi_c_contact_list` ( `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_contact_list_code` (`code`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5279,7 +5279,7 @@ CREATE TABLE `llx_publi_c_dnd_list` ( `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_dnd_list_code` (`code`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5308,7 +5308,7 @@ CREATE TABLE `llx_publi_c_method_list` ( `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_method_list_code` (`code`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5760,7 +5760,7 @@ CREATE TABLE `llx_socpeople_extrafields` ( `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_socpeople_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6060,7 +6060,7 @@ CREATE TABLE `llx_user_extrafields` ( `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_user_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- diff --git a/dev/initdata/mysqldump_dolibarr_3.4.0.sql b/dev/initdata/mysqldump_dolibarr_3.4.0.sql index eaa2c8f1a89..1fa3bfe8791 100644 --- a/dev/initdata/mysqldump_dolibarr_3.4.0.sql +++ b/dev/initdata/mysqldump_dolibarr_3.4.0.sql @@ -30,7 +30,7 @@ CREATE TABLE `llx_accounting_system` ( `active` smallint(6) DEFAULT '0', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_accounting_system_pcg_version` (`pcg_version`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -62,7 +62,7 @@ CREATE TABLE `llx_accountingaccount` ( PRIMARY KEY (`rowid`), KEY `idx_accountingaccount_fk_pcg_version` (`fk_pcg_version`), CONSTRAINT `fk_accountingaccount_fk_pcg_version` FOREIGN KEY (`fk_pcg_version`) REFERENCES `llx_accounting_system` (`pcg_version`) -) ENGINE=InnoDB AUTO_INCREMENT=439 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=439 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -198,7 +198,7 @@ CREATE TABLE `llx_actioncomm_extrafields` ( `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_actioncomm_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -402,7 +402,7 @@ CREATE TABLE `llx_adherent_type_extrafields` ( `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_adherent_type_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -826,7 +826,7 @@ CREATE TABLE `llx_c_action_trigger` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_action_trigger_code` (`code`), KEY `idx_action_trigger_rang` (`rang`) -) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -996,7 +996,7 @@ CREATE TABLE `llx_c_currencies` ( `unicode` varchar(32) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`code_iso`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1470,7 +1470,7 @@ CREATE TABLE `llx_c_revenuestamp` ( `accountancy_code_sell` varchar(15) DEFAULT NULL, `accountancy_code_buy` varchar(15) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=105 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=105 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2583,7 +2583,7 @@ CREATE TABLE `llx_cronjob` ( `fk_user_mod` int(11) DEFAULT NULL, `note` text, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2704,7 +2704,7 @@ CREATE TABLE `llx_dolicloud_emailstemplates` ( `content` text NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_dolicloud_emailstemplates` (`emailtype`,`lang`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3006,7 +3006,7 @@ CREATE TABLE `llx_element_tag` ( `element` varchar(64) NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_element_tag` (`entity`,`lang`,`tag`,`fk_element`,`element`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3418,7 +3418,7 @@ CREATE TABLE `llx_facture_extrafields` ( `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_facture_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3864,7 +3864,7 @@ CREATE TABLE `llx_holiday` ( KEY `idx_holiday_fk_user` (`fk_user`), KEY `idx_holiday_date_debut` (`date_debut`), KEY `idx_holiday_date_fin` (`date_fin`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3890,7 +3890,7 @@ CREATE TABLE `llx_holiday_config` ( `value` text, PRIMARY KEY (`rowid`), UNIQUE KEY `name` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3917,7 +3917,7 @@ CREATE TABLE `llx_holiday_events` ( `value` text NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_holiday_name` (`name`,`entity`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3945,7 +3945,7 @@ CREATE TABLE `llx_holiday_logs` ( `prev_solde` varchar(255) NOT NULL, `new_solde` varchar(255) NOT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=145 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=145 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3969,7 +3969,7 @@ CREATE TABLE `llx_holiday_users` ( `fk_user` int(11) NOT NULL, `nb_holiday` double NOT NULL DEFAULT '0', PRIMARY KEY (`fk_user`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4269,7 +4269,7 @@ CREATE TABLE `llx_milestone` ( UNIQUE KEY `uk_milestone_fk_element` (`fk_element`,`elementtype`), KEY `idx_milestone_fk_user_modif` (`fk_user_modif`), CONSTRAINT `fk_milestone_fk_user_modif` FOREIGN KEY (`fk_user_modif`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4391,7 +4391,7 @@ CREATE TABLE `llx_opensurvey_comments` ( `comment` text NOT NULL, `usercomment` text, PRIMARY KEY (`id_comment`) -) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4425,7 +4425,7 @@ CREATE TABLE `llx_opensurvey_sondage` ( `origin` varchar(64) DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id_sondage`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4448,7 +4448,7 @@ DROP TABLE IF EXISTS `llx_opensurvey_sujet_studs`; CREATE TABLE `llx_opensurvey_sujet_studs` ( `id_sondage` char(16) NOT NULL, `sujet` text -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4477,7 +4477,7 @@ CREATE TABLE `llx_opensurvey_user_studs` ( KEY `idx_id_users` (`id_users`), KEY `idx_nom` (`nom`), KEY `idx_id_sondage` (`id_sondage`) -) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4679,7 +4679,7 @@ CREATE TABLE `llx_pos_cash` ( `datea` datetime DEFAULT NULL, `is_closed` tinyint(4) DEFAULT '0', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4714,7 +4714,7 @@ CREATE TABLE `llx_pos_control_cash` ( `amount_next_day` double(24,8) DEFAULT NULL, `comment` text, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4739,7 +4739,7 @@ CREATE TABLE `llx_pos_facture` ( `fk_facture` int(11) NOT NULL, `fk_control_cash` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4769,7 +4769,7 @@ CREATE TABLE `llx_pos_moviments` ( `type` tinyint(4) DEFAULT NULL, `comment` text, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4794,7 +4794,7 @@ CREATE TABLE `llx_pos_paiement_ticket` ( `fk_ticket` int(11) DEFAULT NULL, `amount` double(24,8) DEFAULT '0.00000000', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4852,7 +4852,7 @@ CREATE TABLE `llx_pos_ticket` ( KEY `idx_ticket_fk_ticket_source` (`fk_ticket_source`), CONSTRAINT `fk_ticket_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), CONSTRAINT `fk_ticket_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4903,7 +4903,7 @@ CREATE TABLE `llx_pos_ticketdet` ( UNIQUE KEY `uk_fk_remise_except` (`fk_remise_except`,`fk_ticket`), KEY `idx_ticketdet_fk_ticket` (`fk_ticket`), KEY `idx_ticketdet_fk_product` (`fk_product`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5365,7 +5365,7 @@ CREATE TABLE `llx_product_price_by_qty` ( UNIQUE KEY `uk_product_price_by_qty_level` (`fk_product_price`,`qty_min`), KEY `idx_product_price_by_qty_fk_product_price` (`fk_product_price`), CONSTRAINT `fk_product_price_by_qty_fk_product_price` FOREIGN KEY (`fk_product_price`) REFERENCES `llx_product_price` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5639,7 +5639,7 @@ CREATE TABLE `llx_propal_extrafields` ( `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_propal_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6146,7 +6146,7 @@ CREATE TABLE `llx_socpeople_extrafields` ( `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_socpeople_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6226,7 +6226,7 @@ CREATE TABLE `llx_submitew_message` ( `joined_file3` varchar(255) DEFAULT NULL, `joined_file4` varchar(255) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6498,7 +6498,7 @@ CREATE TABLE `llx_user_extrafields` ( `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_user_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6665,7 +6665,7 @@ CREATE TABLE `llx_ventilation_achat` ( `ventilation` varchar(255) DEFAULT NULL, `qty` double DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- diff --git a/htdocs/adherents/admin/mailman.php b/htdocs/adherents/admin/mailman.php index 29b2099ccfc..9e0b859db67 100644 --- a/htdocs/adherents/admin/mailman.php +++ b/htdocs/adherents/admin/mailman.php @@ -51,14 +51,17 @@ $testunsubscribeemail = GETPOST("testunsubscribeemail"); // Action mise a jour ou ajout d'une constante if ($action == 'update' || $action == 'add') { - $constname=GETPOST("constname"); - $constvalue=GETPOST("constvalue"); - $consttype=GETPOST("consttype"); - $constnote=GETPOST("constnote"); - $res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity); - - if (! $res > 0) $error++; - + foreach($_POST['constname'] as $key => $val) + { + $constname=$_POST["constname"][$key]; + $constvalue=$_POST["constvalue"][$key]; + $consttype=$_POST["consttype"][$key]; + $constnote=$_POST["constnote"][$key]; + $res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity); + + if (! $res > 0) $error++; + } + if (! $error) { $mesg = '
'.$langs->trans("SetupSaved").'
'; @@ -159,9 +162,6 @@ dol_fiche_head($head, 'mailman', $langs->trans("Setup"), 0, 'user'); dol_htmloutput_mesg($mesg); -/* - * Mailman - */ $var=!$var; if (! empty($conf->global->ADHERENT_USE_MAILMAN)) { @@ -180,6 +180,8 @@ if (! empty($conf->global->ADHERENT_USE_MAILMAN)) print_fiche_titre($langs->trans('MailmanTitle'), $lien,''); + print '
'; + // JQuery activity print ''; - form_constantes($constantes); + form_constantes($constantes,1); print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'
'; print '%LISTE%, %MAILMAN_ADMINPW%, %EMAIL%
'; @@ -217,12 +219,12 @@ if (! empty($conf->global->ADHERENT_USE_MAILMAN)) print '
'; print ''; print $langs->trans("TestSubscribe").'
'; - print $langs->trans("EMail").'
'; + print $langs->trans("EMail").'
'; print '
'; print '
'; print ''; print $langs->trans("TestUnSubscribe").'
'; - print $langs->trans("EMail").'
'; + print $langs->trans("EMail").'
'; print '
'; } diff --git a/htdocs/adherents/admin/spip.php b/htdocs/adherents/admin/spip.php index abc795bcce2..9bbb95c2697 100644 --- a/htdocs/adherents/admin/spip.php +++ b/htdocs/adherents/admin/spip.php @@ -139,6 +139,7 @@ if (! empty($conf->global->ADHERENT_USE_SPIP)) ); print_fiche_titre($langs->trans('SPIPTitle'), $lien, ''); + print '
'; form_constantes($constantes); print '
'; } diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 52f2c3fb13e..05833bbce10 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -931,9 +931,10 @@ else $adht->fetch($object->typeid); // We set country_id, and country_code, country of the chosen country - if (isset($_POST["country"]) || $object->country_id) + $country=GETPOST('country','int'); + if (!empty($country) || $object->country_id) { - $sql = "SELECT rowid, code, libelle as label from ".MAIN_DB_PREFIX."c_pays where rowid = ".(isset($_POST["country"])?$_POST["country"]:$object->country_id); + $sql = "SELECT rowid, code, libelle as label from ".MAIN_DB_PREFIX."c_pays where rowid = ".(!empty($country)?$country:$object->country_id); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/categories/fiche.php b/htdocs/categories/fiche.php index 34a036156a3..c97d023f5b8 100644 --- a/htdocs/categories/fiche.php +++ b/htdocs/categories/fiche.php @@ -211,7 +211,7 @@ if ($user->rights->categorie->creer) // Ref print ''; - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; print''; // Description diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 367ab558194..fbc76d402e1 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -529,4 +529,4 @@ print ''; llxFooter(); $db->close(); -?> \ No newline at end of file +?> diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 9cde868a97a..09bc17792c0 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -351,7 +351,7 @@ else if ($action == 'add' && $user->rights->propal->creer) if ($id > 0) { // Insertion contact par defaut si defini - if (GETPOST('contactidp')) + if (GETPOST('contactidp') > 0) { $result=$object->add_contact(GETPOST('contactidp'),'CUSTOMER','external'); if ($result < 0) @@ -1347,6 +1347,7 @@ if ($action == 'create') $numprojet=select_projects($soc->id,$projectid); if ($numprojet==0) { + $langs->load("projects"); print '   '.$langs->trans("AddProject").''; } print ''; @@ -1834,33 +1835,58 @@ else $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook if (empty($reshook) && ! empty($extrafields->attribute_label)) { - if ($action == 'edit_extras') { - print ''; print '
'; print ''; print ''; print ''; - print ''; } - print $object->showOptionals($extrafields,'edit'); + foreach($extrafields->attribute_label as $key=>$label) + { + $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); + if ($extrafields->attribute_type[$key] == 'separate') + { + print $extrafields->showSeparator($key); + } + else + { + print 'attribute_required[$key])) print ' class="fieldrequired"'; + print '>'.$label.''."\n"; + } + } if(count($extrafields->attribute_label) > 0) { if ($action == 'edit_extras' && $user->rights->propal->creer) { - print ''; - print '
'; + // Convert date into timestamp format + if (in_array($extrafields->attribute_type[$key],array('date','datetime'))) + { + $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$object->array_options['options_'.$key]; + } + + if ($action == 'edit_extras' && $user->rights->propal->creer) + { + print $extrafields->showInputField($key,$value); + } + else + { + print $extrafields->showOutputField($key,$value); + } + print '
'; + print '
'; print ''; + print ''; print '
'; - print ''; + } else { if ($object->statut == 0 && $user->rights->propal->creer) { - print ''; + print ''; } } } @@ -1923,6 +1949,7 @@ else include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; } + /* * Lines */ diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index dc2c708cbec..7dc63fdace9 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -648,8 +648,7 @@ class Propal extends CommonObject dol_syslog(get_class($this)."::create"); // Check parameters - $soc = new Societe($this->db); - $result=$soc->fetch($this->socid); + $result=$this->fetch_thirdparty(); if ($result < 0) { $this->error="Failed to fetch company"; @@ -670,8 +669,6 @@ class Propal extends CommonObject $this->db->begin(); - $this->fetch_thirdparty(); - // Insert into database $sql = "INSERT INTO ".MAIN_DB_PREFIX."propal ("; $sql.= "fk_soc"; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 99168cdc6a0..a7d04670961 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1,34 +1,34 @@ * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2013 Juanjo Menent - * Copyright (C) 2011 Philippe Grand - * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2012 Marcos García - * Copyright (C) 2013 Florian Henry - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +* Copyright (C) 2005 Marc Barilley / Ocebo +* Copyright (C) 2005-2013 Regis Houssin +* Copyright (C) 2006 Andre Cianfarani +* Copyright (C) 2010-2013 Juanjo Menent +* Copyright (C) 2011 Philippe Grand +* Copyright (C) 2012 Christophe Battarel +* Copyright (C) 2012 Marcos García +* Copyright (C) 2013 Florian Henry +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ /** * \file htdocs/commande/fiche.php - * \ingroup commande - * \brief Page to show customer order - */ +* \ingroup commande +* \brief Page to show customer order +*/ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -2135,34 +2135,56 @@ else $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook if (empty($reshook) && ! empty($extrafields->attribute_label)) { + if ($action == 'edit_extras') + { + print '
'; + print ''; + print ''; + print ''; + } + + foreach($extrafields->attribute_label as $key=>$label) + { + $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); + if ($extrafields->attribute_type[$key] == 'separate') + { + print $extrafields->showSeparator($key); + } + else + { + print '
attribute_required[$key])) print ' class="fieldrequired"'; + print '>'.$label.''."\n"; + } + } + if(count($extrafields->attribute_label) > 0) { - if ($action == 'edit_extras') + if ($action == 'edit_extras' && $user->rights->commande->creer) { - print ''; - print ''; - print ''; - print ''; - } - - - if ($action == 'edit_extras' && $user->rights->propal->creer) { - print $object->showOptionals($extrafields,'edit'); - } - else { - print $object->showOptionals($extrafields); - } - - if ($action == 'edit_extras' && $user->rights->propal->creer) - { - print ''; } else { - if ($object->statut == 0 && $user->rights->propal->creer) + if ($object->statut == 0 && $user->rights->commande->creer) { print ''; } @@ -2320,7 +2342,7 @@ else if ($object->statut > 0 && $object->statut < 3 && $object->getNbOfProductsLines() > 0) { if (($conf->expedition_bon->enabled && $user->rights->expedition->creer) - || ($conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer)) + || ($conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer)) { if ($user->rights->expedition->creer) { diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index e740ea0e387..01ec205564a 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -4,6 +4,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2004 Christophe Combelles * Copyright (C) 2005-2010 Regis Houssin + * Copytight (C) 2013 Florian Henry * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -804,7 +805,7 @@ class Account extends CommonObject $sql = "SELECT sum(amount) as amount"; $sql.= " FROM ".MAIN_DB_PREFIX."bank"; $sql.= " WHERE fk_account = ".$this->id; - if ($option == 1) $sql.= " AND dateo <= ".$this->db->idate(time()); + if ($option == 1) $sql.= " AND dateo <= '".$this->db->idate(dol_now())."'"; $resql = $this->db->query($sql); if ($resql) diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 218d8fb9523..ce33322d03a 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -24,7 +24,7 @@ * \brief Page liste des bons de prelevements */ -require('../../../main.inc.php'); +require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 5be91cb8044..f9d770111a7 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -24,7 +24,7 @@ * \brief Prelevement creation page */ -require('../../../main.inc.php'); +require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index 4d83076c600..3012a70bd55 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -24,7 +24,7 @@ * \brief Page to list withdraw requests */ -require('../../../main.inc.php'); +require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/core/modules/modPrelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 94f96b04f9d..ec8eaa51479 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -24,7 +24,7 @@ * \brief Page liste des factures prelevees */ -require('../../../main.inc.php'); +require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php'; diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index e89a5fa2fcd..c77a0ab6682 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -24,7 +24,7 @@ * \brief Withdraw reject */ -require('../../../main.inc.php'); +require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php'; diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index 9cb29ad8d26..161df078aae 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -23,7 +23,7 @@ * \brief Prelevement statistics */ -require('../../../main.inc.php'); +require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php'; diff --git a/htdocs/compta/prelevement/fiche.php b/htdocs/compta/prelevement/fiche.php index fee2f1ecc24..a7ebf00c950 100644 --- a/htdocs/compta/prelevement/fiche.php +++ b/htdocs/compta/prelevement/fiche.php @@ -23,7 +23,7 @@ * \brief Fiche prelevement */ -require('../../../main.inc.php'); +require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index c1d0a0aaa3f..d3823cc130e 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -3,6 +3,7 @@ * Copyright (C) 2005-2012 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2013 Florian Henry * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +25,8 @@ * \brief Prelevement index page */ -require('../../../main.inc.php'); + +require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index 5f7e17fb679..45dc325f5c1 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -24,7 +24,7 @@ * \brief card of withdraw line */ -require('../../../main.inc.php'); +require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php'; diff --git a/htdocs/compta/prelevement/lignes.php b/htdocs/compta/prelevement/lignes.php index 055574a2c06..445f1e66755 100644 --- a/htdocs/compta/prelevement/lignes.php +++ b/htdocs/compta/prelevement/lignes.php @@ -24,7 +24,7 @@ * \brief Prelevement lines */ -require('../../../main.inc.php'); +require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php'; diff --git a/htdocs/compta/prelevement/liste.php b/htdocs/compta/prelevement/liste.php index 1410b177ff2..d3d8634d64a 100644 --- a/htdocs/compta/prelevement/liste.php +++ b/htdocs/compta/prelevement/liste.php @@ -23,7 +23,7 @@ * \ingroup prelevement * \brief Page liste des prelevements */ -require('../../../main.inc.php'); +require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 274e55084f4..27a2ab59f38 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -24,7 +24,7 @@ * \brief Reject page */ -require('../../../main.inc.php'); +require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index 419fb7eb3e8..34ffdb168b5 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -24,7 +24,7 @@ * \brief Page de stats des prelevements */ -require('../../../main.inc.php'); +require('../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; 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/contact/list.php b/htdocs/contact/list.php index 505992341de..aa7923926e0 100755 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -262,7 +262,7 @@ if ($result) print_liste_field_titre($langs->trans("PostOrFunction"),$_SERVER["PHP_SELF"],"p.poste", $begin, $param, '', $sortfield,$sortorder); if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom", $begin, $param, '', $sortfield,$sortorder); print_liste_field_titre($langs->trans("Phone"),$_SERVER["PHP_SELF"],"p.phone", $begin, $param, '', $sortfield,$sortorder); - print_liste_field_titre($langs->trans("Mobile"),$_SERVER["PHP_SELF"],"p.phone_mob", $begin, $param, '', $sortfield,$sortorder); + print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mob", $begin, $param, '', $sortfield,$sortorder); print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder); print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder); print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"p.tms", $begin, $param, 'align="center"', $sortfield,$sortorder); diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index c4f65889fbe..a7a8fe04903 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -400,7 +400,7 @@ class Conf $this->maxfilesize = (empty($this->global->MAIN_UPLOAD_DOC) ? 0 : $this->global->MAIN_UPLOAD_DOC * 1024); // Define list of limited modules - if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='facture,commande,fournisseur,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda'; // '' means 'all'. Note that contact is added here as it should be a module later. + if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,facture,commande,fournisseur,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda'; // '' means 'all'. Note that contact is added here as it should be a module later. // Timeouts if (empty($this->global->MAIN_USE_CONNECT_TIMEOUT)) $this->global->MAIN_USE_CONNECT_TIMEOUT=10; diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index c87f2df36dd..c3157c07124 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -1004,11 +1004,13 @@ class FormOther } } - $emptybox->box_id='A'; - $emptybox->info_box_head=array(); - $emptybox->info_box_contents=array(); - $emptybox->showBox(array(),array()); - + if (empty($conf->browser->phone)) + { + $emptybox->box_id='A'; + $emptybox->info_box_head=array(); + $emptybox->info_box_contents=array(); + $emptybox->showBox(array(),array()); + } print "\n"; print "\n"; @@ -1033,11 +1035,13 @@ class FormOther } } - $emptybox->box_id='B'; - $emptybox->info_box_head=array(); - $emptybox->info_box_contents=array(); - $emptybox->showBox(array(),array()); - + if (empty($conf->browser->phone)) + { + $emptybox->box_id='B'; + $emptybox->info_box_head=array(); + $emptybox->info_box_contents=array(); + $emptybox->showBox(array(),array()); + } print "\n"; print "\n"; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 0d4bbcf6d7a..434ffc7d7fb 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1001,20 +1001,22 @@ function complete_dictionnary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsq * Show array with constants to edit * * @param array $tableau Array of constants + * @param int $strictw3c Respect W3C (no form into table) * @return void */ -function form_constantes($tableau) +function form_constantes($tableau,$strictw3c=0) { global $db,$bc,$langs,$conf,$_Avery_Labels; $form = new Form($db); + if (! empty($strictw3c)) print "\n".'
'; + print '
'.img_picto('','edit').' '.$langs->trans('Modify').'
'.img_picto('','edit').' '.$langs->trans('Modify').'
'; + // Convert date into timestamp format + if (in_array($extrafields->attribute_type[$key],array('date','datetime'))) + { + $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$object->array_options['options_'.$key]; + } + + if ($action == 'edit_extras' && $user->rights->commande->creer) + { + print $extrafields->showInputField($key,$value); + } + else + { + print $extrafields->showOutputField($key,$value); + } + print '
'; + print '
'; print ''; print ''; print '
'.img_picto('','edit').' '.$langs->trans('Modify').'
'; print ''; print ''; print ''; - print ''; - print ''; + if (empty($strictw3c)) print ''; print "\n"; $var=true; @@ -1044,17 +1046,17 @@ function form_constantes($tableau) $obj = (object) array('rowid'=>'','name'=>'','value'=>'','type'=>'','note'=>''); } - print "\n".''; + if (empty($strictw3c)) print "\n".''; print ""; - // Affiche nom constante + // Show constant print '\n"; + // Value if ($const == 'ADHERENT_CARD_TYPE' || $const == 'ADHERENT_ETIQUETTE_TYPE') { print ''; } else { print ''; } - print '"; - print "\n"; - print "\n"; + // Submit + if (empty($strictw3c)) + { + print '"; + } + print "\n"; + if (empty($strictw3c)) print "\n"; } } print '
'.$langs->trans("Description").''.$langs->trans("Value").'* '.$langs->trans("Action").''.$langs->trans("Action").'
'; print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print $langs->trans('Desc'.$const); @@ -1077,6 +1079,7 @@ function form_constantes($tableau) print "'; @@ -1087,55 +1090,57 @@ function form_constantes($tableau) { $arrayoflabels[$codecards]=$_Avery_Labels[$codecards]['name']; } - print $form->selectarray('constvalue',$arrayoflabels,($obj->value?$obj->value:'CARD'),1,0,0); - print ''; + print $form->selectarray('constvalue'.(empty($strictw3c)?'':'[]'),$arrayoflabels,($obj->value?$obj->value:'CARD'),1,0,0); print ''; print ''; - //print 'aa'.$const; if (in_array($const,array('ADHERENT_CARD_TEXT','ADHERENT_CARD_TEXT_RIGHT','ADHERENT_ETIQUETTE_TEXT'))) { - print '\n"; - print ''; print ''; } else if (in_array($const,array('ADHERENT_AUTOREGISTER_NOTIF_MAIL','ADHERENT_AUTOREGISTER_MAIL','ADHERENT_MAIL_VALID','ADHERENT_MAIL_COTIS','ADHERENT_MAIL_RESIL'))) { require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor=new DolEditor('constvalue_'.$const,$obj->value,'',160,'dolibarr_notes','',false,false,$conf->fckeditor->enabled,5,60); + $doleditor=new DolEditor('constvalue_'.$const.(empty($strictw3c)?'':'[]'),$obj->value,'',160,'dolibarr_notes','',false,false,$conf->fckeditor->enabled,5,60); $doleditor->Create(); - - print ''; - print ''; + print ''; } else if ($obj->type == 'yesno') { - print $form->selectyesno('constvalue',$obj->value,1); - print ''; - print ''; + print $form->selectyesno('constvalue'.(empty($strictw3c)?'':'[]'),$obj->value,1); + print ''; } else { - print ''; - print ''; - print ''; + print ''; + print ''; } print ''; - print '  '; - // print ''.img_delete().''; - print "
'; + print ''; + print "
'; + + if (! empty($strictw3c)) + { + print '
'; + print "\n"; + } } diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 2e2d764b861..f7b189a5c9a 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -184,13 +184,12 @@ function show_array_actions_to_do($max=5) $sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent,"; $sql.= " c.code, c.libelle,"; $sql.= " s.nom as sname, s.rowid, s.client"; - $sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c,"; - $sql.= " ".MAIN_DB_PREFIX."actioncomm as a"; + $sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c LEFT JOIN "; + $sql.= " ".MAIN_DB_PREFIX."actioncomm as a ON c.id = a.fk_action"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ")"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; - $sql.= " WHERE c.id = a.fk_action"; - $sql.= " AND a.entity = ".$conf->entity; + $sql.= " WHERE a.entity = ".$conf->entity; $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid) $sql.= " AND s.rowid = ".$socid; @@ -283,13 +282,12 @@ function show_array_last_actions_done($max=5) $sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label,"; $sql.= " c.code, c.libelle,"; $sql.= " s.rowid, s.nom as sname, s.client"; - $sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c,"; - $sql.= " ".MAIN_DB_PREFIX."actioncomm as a"; + $sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c LEFT JOIN "; + $sql.= " ".MAIN_DB_PREFIX."actioncomm as a ON c.id = a.fk_action "; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.=")"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; - $sql.= " WHERE c.id = a.fk_action"; - $sql.= " AND a.entity = ".$conf->entity; + $sql.= " WHERE a.entity = ".$conf->entity; $sql.= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid) $sql.= " AND s.rowid = ".$socid; @@ -473,4 +471,4 @@ function calendars_prepare_head($param) return $head; } -?> \ No newline at end of file +?> diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index f83ea5f433c..67b51748d3e 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -74,11 +74,11 @@ function barcode_print($code, $encoding="ANY", $scale = 2 ,$mode = "png") dol_syslog("barcode.lib.php::barcode_print $code $encoding $scale $mode"); $bars=barcode_encode($code,$encoding); - - if (! $bars) + if (! $bars || ! empty($bars['error'])) { // DOLCHANGE LDR Return error message instead of array - $error='Bad Value '.$code.' for encoding '.$encoding; + if (empty($bars['error'])) $error='Bad Value '.$code.' for encoding '.$encoding; + else $error=$bars['error']; dol_syslog('barcode.lib.php::barcode_print '.$error, LOG_ERR); return $error; } @@ -133,7 +133,7 @@ function barcode_encode($code,$encoding) dol_syslog("barcode.lib.php::barcode_encode Use barcode_encode_ean"); $bars=barcode_encode_ean($code, $encoding); } - else if (file_exists($genbarcode_loc)) + else if (file_exists($genbarcode_loc)) // For example C39 { /* use genbarcode */ dol_syslog("barcode.lib.php::barcode_encode Use genbarcode ".$genbarcode_loc." code=".$code." encoding=".$encoding); @@ -252,10 +252,11 @@ function barcode_encode_genbarcode($code,$encoding) $code=preg_replace("/[\\\|]/", "_", $code); $command=escapeshellarg($genbarcode_loc); - $paramclear=" \"".str_replace("\"", "\\\"",$code)."\" \"".str_replace("\"", "\\\"",strtoupper($encoding))."\""; - + //$paramclear=" \"".str_replace("\"", "\\\"",$code)."\" \"".str_replace("\"", "\\\"",strtoupper($encoding))."\""; + $paramclear=" ".escapeshellarg($code)." ".escapeshellarg(strtoupper($encoding)); + $fullcommandclear=$command." ".$paramclear." 2>&1"; - //print $fullcommandclear."
\n"; + //print $fullcommandclear."
\n";exit; dol_syslog("Run command ".$fullcommandclear); $fp=popen($fullcommandclear, "r"); @@ -273,14 +274,20 @@ function barcode_encode_genbarcode($code,$encoding) } //var_dump($bars); $ret=array( - "encoding" => trim($encoding), "bars" => trim($bars), - "text" => trim($text) + "text" => trim($text), + "encoding" => trim($encoding), + "error" => "" ); //var_dump($ret); - if (!$ret['encoding']) return false; + if (preg_match('/permission denied/i',$ret['bars'])) + { + $ret['error']=$ret['bars']; $ret['bars']=''; + return $ret; + } if (!$ret['bars']) return false; if (!$ret['text']) return false; + if (!$ret['encoding']) return false; return $ret; } diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 83af9f60871..cad4d4c3d52 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1244,7 +1244,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) if (empty($modulepart)) return 'ErrorBadParameter'; if (empty($entity)) $entity=0; - + dol_syslog('$modulepart='.$modulepart.' $original_file= '.$original_file); // We define $accessallowed and $sqlprotectagainstexternals $accessallowed=0; $sqlprotectagainstexternals=''; @@ -1364,9 +1364,12 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) } // Wrapping pour les prelevements elseif ($modulepart == 'prelevement') - { - if ($user->rights->prelevement->bons->lire) $accessallowed=1; - $original_file=$conf->prelevement->dir_output.'/receipts/'.$original_file; + { + if ($user->rights->prelevement->bons->lire || preg_match('/^specimen/i',$original_file)) + { + $accessallowed=1; + } + $original_file=$conf->prelevement->dir_output.'/'.$original_file; } // Wrapping pour les graph energie elseif ($modulepart == 'graph_stock') @@ -1466,17 +1469,6 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) $original_file=$conf->deplacement->dir_output.'/'.$original_file; //$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$refname."' AND entity=".$conf->entity; } - - // Wrapping pour les prelevements - else if ($modulepart == 'prelevement') - { - if ($user->rights->prelevement->bons->lire || preg_match('/^specimen/i',$original_file)) - { - $accessallowed=1; - } - $original_file=$conf->prelevement->dir_output.'/'.$original_file; - } - // Wrapping pour les propales else if ($modulepart == 'propal') { @@ -1767,7 +1759,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity) eval('$sqlprotectagainstexternals = "'.$conf->global->$sqlProtectConstName.'";'); } } - + $ret = array( 'accessallowed' => $accessallowed, 'sqlprotectagainstexternals'=>$sqlprotectagainstexternals, diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 784762907d3..2fc96042895 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2194,10 +2194,10 @@ function dol_print_error($db='',$error='') $out.="".$langs->trans("PHP").": ".phpversion()."
\n"; //phpinfo(); // This is to show location of php.ini file } - $out.="".$langs->trans("Server").": ".$_SERVER["SERVER_SOFTWARE"]."
\n";; + $out.="".$langs->trans("Server").": ".$_SERVER["SERVER_SOFTWARE"]."
\n"; $out.="
\n"; - $out.="".$langs->trans("RequestedUrl").": ".$_SERVER["REQUEST_URI"]."
\n";; - $out.="".$langs->trans("Referer").": ".(isset($_SERVER["HTTP_REFERER"])?$_SERVER["HTTP_REFERER"]:'')."
\n";; + $out.="".$langs->trans("RequestedUrl").": ".dol_htmlentities($_SERVER["REQUEST_URI"],ENT_COMPAT,'UTF-8')."
\n"; + $out.="".$langs->trans("Referer").": ".(isset($_SERVER["HTTP_REFERER"])?dol_htmlentities($_SERVER["HTTP_REFERER"],ENT_COMPAT,'UTF-8'):'')."
\n"; $out.="".$langs->trans("MenuManager").": ".(isset($conf->standard_menu)?$conf->standard_menu:'')."
\n"; $out.="
\n"; $syslog.="url=".$_SERVER["REQUEST_URI"]; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 76323b4eb40..3a8bd016e21 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -721,7 +721,7 @@ function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0) print ''; print ''; print_liste_field_titre($langs->trans("Project"),"index.php","","","","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("NbOpenTasks"),"","","","",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Tasks"),"","","","",'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),"","","","",'align="right"',$sortfield,$sortorder); print "\n"; @@ -775,7 +775,7 @@ function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0) print ''; + print ' - '.dol_trunc($objp->title,24).''; print ''; $projectstatic->statut = $objp->fk_statut; print ''; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 17d6189e1b0..3bcbe1a3bba 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -484,16 +484,16 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) { $langs->load("errors"); - $warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete")); + $warnpicto =' '.img_warning($langs->trans("WarningMandatorySetupNotComplete")); } - $newmenu->add("/admin/company.php?mainmenu=home", $langs->trans("MenuCompanySetup").' '.$warnpicto,1); + $newmenu->add("/admin/company.php?mainmenu=home", $langs->trans("MenuCompanySetup").$warnpicto,1); $warnpicto=''; if (count($conf->modules) <= 1) // If only user module enabled { $langs->load("errors"); - $warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete")); + $warnpicto = ' '.img_warning($langs->trans("WarningMandatorySetupNotComplete")); } - $newmenu->add("/admin/modules.php?mainmenu=home", $langs->trans("Modules").' '.$warnpicto,1); + $newmenu->add("/admin/modules.php?mainmenu=home", $langs->trans("Modules").$warnpicto,1); $newmenu->add("/admin/menus.php?mainmenu=home", $langs->trans("Menus"),1); $newmenu->add("/admin/ihm.php?mainmenu=home", $langs->trans("GUISetup"),1); if (! in_array($langs->defaultlang,array('en_US','en_GB','en_NZ','en_AU','fr_FR','fr_BE','es_ES','ca_ES'))) @@ -1387,4 +1387,4 @@ function dol_eldy_showmenu($type_user, &$menuentry, &$listofmodulesforexternal) return 1; } -?> \ No newline at end of file +?> 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/core/modules/syslog/mod_syslog_file.php b/htdocs/core/modules/syslog/mod_syslog_file.php index e6bbefb7295..e98bb96b8eb 100644 --- a/htdocs/core/modules/syslog/mod_syslog_file.php +++ b/htdocs/core/modules/syslog/mod_syslog_file.php @@ -147,7 +147,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface fwrite($filefd, $message."\n"); fclose($filefd); - @chmod($logfile, octdec($conf->global->MAIN_UMASK)); + @chmod($logfile, octdec(empty($conf->global->MAIN_UMASK)?'0664':$conf->global->MAIN_UMASK)); } } } diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index cf44cccce2b..1ea6138873e 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -102,7 +102,7 @@ else $searchform=$hookmanager->resPrint; print "\n"; print "\n"; -print '
'; +print '
'; print ''; //print '
'; print '
'."\n"; diff --git a/htdocs/core/tpl/freeproductline_create.tpl.php b/htdocs/core/tpl/freeproductline_create.tpl.php index ad0b0eeb426..328b8d9a69b 100644 --- a/htdocs/core/tpl/freeproductline_create.tpl.php +++ b/htdocs/core/tpl/freeproductline_create.tpl.php @@ -30,6 +30,13 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob ?> + +
"> + + + +
-"> - - - - - > - global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>> - > + global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>> + '; echo $form->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1); @@ -90,66 +91,69 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob $doleditor=new DolEditor('dp_desc',GETPOST('dp_desc'),'',100,'dolibarr_details','',false,true,$enabled,$nbrows,70); $doleditor->Create(); ?> - + - - - - - - - global->DISPLAY_MARGIN_RATES)) $colspan++; - if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++; - } - ?> - - - - service->enabled) && $dateSelector) - { - if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10; - else $colspan = 9; - - if (! empty($usemargins)) - { - $colspan++; // For the buying price - if($conf->global->DISPLAY_MARGIN_RATES) $colspan++; - if($conf->global->DISPLAY_MARK_RATES) $colspan++; - } + > - + + + + + - - + global->DISPLAY_MARGIN_RATES)) $colspan++; + if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++; + } + ?> + + + +service->enabled) && $dateSelector) +{ + if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10; + else $colspan = 9; + + if (! empty($usemargins)) + { + $colspan++; // For the buying price + if($conf->global->DISPLAY_MARGIN_RATES) $colspan++; + if($conf->global->DISPLAY_MARK_RATES) $colspan++; + } +?> + +> + + + \ No newline at end of file diff --git a/htdocs/core/tpl/predefinedproductline_create.tpl.php b/htdocs/core/tpl/predefinedproductline_create.tpl.php index ae8491784e6..b435d40be64 100644 --- a/htdocs/core/tpl/predefinedproductline_create.tpl.php +++ b/htdocs/core/tpl/predefinedproductline_create.tpl.php @@ -32,6 +32,21 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob +"> + + + + + + + global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="4"' : ' colspan="3"'); ?>> ">  -"> - - - - - - > global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="4"' : ' colspan="3"'); ?>> Create(); ?> - - + + global->DISPLAY_MARK_RATES)) $colspan++; ?> service->enabled) && $dateSelector) if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++; } ?> + > '; @@ -3521,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/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 3677392d64c..1f02fc11f5f 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -122,6 +122,7 @@ ErrorFailedToRemoveToMailmanList=Failed to remove record %s to Mailman list %s o ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check Mysql server is running (in most cases, you can launch it from command line with 'sudo /etc/init.d/mysql start'). +ErrorFailedToAddContact=Failed to add contact # Warnings WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 13052863068..18f58bd0dae 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -480,6 +480,8 @@ Module2650Name=Ultimatepdf Module2650Desc=Gestión de la presentación de las plantillas pdf (presupuestos, facturas, pedidos, etc.) Module2700Name=Gravatar Module2700Desc=Utiliza el servicio en línea de Gravatar (www.gravatar.com) para mostrar fotos de los usuarios/miembros (que se encuentran en sus mensajes de correo electrónico). Necesita un acceso a Internet +Module2800Name=FTP +Module2800Desc=Cliente FTP Module2900Name=GeoIPMaxmind Module2900Desc=Capacidades de conversión GeoIP Maxmind Module5000Name=Multi-empresa diff --git a/htdocs/langs/fr_FR/dict.lang b/htdocs/langs/fr_FR/dict.lang index 649397eb3c8..e0a8fd6f2ef 100644 --- a/htdocs/langs/fr_FR/dict.lang +++ b/htdocs/langs/fr_FR/dict.lang @@ -274,8 +274,8 @@ CurrencyMAD=Dirham CurrencySingMAD=Dirham CurrencyMGA=Ariary CurrencySingMGA=Ariary -CurrencyMUR=Roupies mauritiennes -CurrencySingMUR=Roupie mauritienne +CurrencyMUR=Roupies mauriciennes +CurrencySingMUR=Roupie mauriciennes CurrencyNOK=Couronnes norvégiennes CurrencySingNOK=Couronne norvégienne CurrencySUR=Roubles diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index 2c06d31126b..28be39d651f 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -123,6 +123,7 @@ ErrorFailedToRemoveToMailmanList=Echec de la suppression de %s de la liste Mailm ErrorNewValueCantMatchOldValue=La nouvelle valeur ne peut être égale à l'ancienne ErrorFailedToValidatePasswordReset=Echec de la réinitialisation du mot de passe. Il est possible que ce lien ait déjà été utilisé (l'utilisation de ce lien ne fonctionne qu'une fois). Si ce n'est pas le cas, essayer de recommencer le processus de réinit de mot de passe depuis le début. ErrorToConnectToMysqlCheckInstance=Echec de la connection au serveur de base de donnée. Vérifier que Mysql est bien lancé (dans la plupart des cas, vous pouvez le lancer depuis la ligne de commande par la commande 'sudo /etc/init.d/mysql start'). +ErrorFailedToAddContact=Echec à l'ajout du contact # Warnings WarningMandatorySetupNotComplete=Les informations de configuration obligatoire doivent être renseignées diff --git a/htdocs/langs/fr_FR/mailmanspip.lang b/htdocs/langs/fr_FR/mailmanspip.lang index 3f27ae0d9c9..1118fbbff90 100644 --- a/htdocs/langs/fr_FR/mailmanspip.lang +++ b/htdocs/langs/fr_FR/mailmanspip.lang @@ -1,6 +1,6 @@ # Dolibarr language file - fr_FR - mailmanspip CHARSET=UTF-8 -MailmanTitle=Système de listes de diffusion Mailman +MailmanTitle=Interfacer avec le système de listes de diffusion Mailman MailmanSpipSetup=Configuration du module Mailman et SPIP TestSubscribe=Pour tester l'inscription aux listes mailman TestUnSubscribe=Pour tester la désincritpion aux listes mailman @@ -11,7 +11,7 @@ SynchroSpipEnabled=Une alimentation de Spip sera réalisée DescADHERENT_MAILMAN_ADMINPW=Mot de passe administrateur Mailman DescADHERENT_MAILMAN_URL=URL d'inscription aux listes Mailman DescADHERENT_MAILMAN_UNSUB_URL=URL de désinscription aux listes Mailman -SPIPTitle=Gestion de contenu SPIP +SPIPTitle=Interfacer avec le sytème de gestion de contenu SPIP DescADHERENT_SPIP_SERVEUR=Serveur SPIP DescADHERENT_SPIP_DB=Nom base SPIP DescADHERENT_SPIP_USER=Login connexion base SPIP diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index 5cd7890df1e..7f30ddd3fd5 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -153,7 +153,7 @@ DescADHERENT_CARD_HEADER_TEXT=Texte imprimé sur le haut des cartes d'adhérent DescADHERENT_CARD_TEXT=Texte imprimé sur les cartes d'adhérent (Aligné à gauche) DescADHERENT_CARD_TEXT_RIGHT=Texte imprimé sur les cartes d'adhérent (Aligné à droite) DescADHERENT_CARD_FOOTER_TEXT=Texte imprimé sur le bas des cartes d'adhérent -DescADHERENT_MAILMAN_LISTS=Liste(s) à la quelle (auxquelles) inscrire les nouveaux adhérents (séparés par une virgule) +DescADHERENT_MAILMAN_LISTS=Liste(s) à la quelle (auxquelles) inscrire automatiquement les adhérents validés (séparés par une virgule) GlobalConfigUsedIfNotDefined=Le texte défini dans la configuration du module Adhérent sera utilisé si cette valeur est non définie ici. MayBeOverwrited=Cette valeur peut être écrasée par le texte défini au niveau du type d'adhérent ShowTypeCard=Voir type '%s' diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 6e03a9ac2ce..6bee9a606ca 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -984,7 +984,10 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile)) { print ''."\n"; - } + //$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css'); + print ''."\n"; + } + } print ''."\n"; @@ -1148,6 +1151,9 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0)) { print ''."\n"; + //$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js'); + print ''."\n"; + print ''."\n"; } } 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/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index e6376bbe7eb..dc438d2b929 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1292,9 +1292,11 @@ class Project extends CommonObject switch ($Tablename) { case "facture": - case "facture_fourn": $sql = "SELECT rowid, facnumber as ref"; break; + case "facture_fourn": + $sql = "SELECT rowid, ref"; + break; case "facture_rec": $sql = "SELECT rowid, titre as ref"; break; @@ -1309,7 +1311,9 @@ class Project extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX.$Tablename; $sql.= " WHERE ".$projectkey." is null"; - $sql.= " AND fk_soc=".$this->societe->id; + if (!empty($this->societe->id)) { + $sql.= " AND fk_soc=".$this->societe->id; + } $sql.= " ORDER BY ref DESC"; dol_syslog("Project.Lib::select_element sql=".$sql); diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index fecd918a29f..c8dcbb5d7f2 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; $langs->load("admin"); +$langs->load('other'); $action=GETPOST('action','alpha'); $value=GETPOST('value','alpha'); diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 3203e556e82..568e81f13f2 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -1432,7 +1432,7 @@ table.liste td { tr.liste_titre, tr.liste_titre_sel { - height: 20px; + height: 20px !important; } div.liste_titre, tr.liste_titre { color: #842F00; @@ -1440,24 +1440,23 @@ div.liste_titre, tr.liste_titre { font-family: "Trebuchet MS",Arial,Helvetica,sans-serif; /*border-bottom: 1px solid #FDFFFF;*/ border-radius: 8px; - line-height: 18px; padding-left: 10px; padding-right: 10px; - white-space: nowrap; + white-space: ; text-align: ; } th.liste_titre, td.liste_titre { padding-left: 6px; padding-right: 6px; - /*vertical-align: text-top;*/ + white-space: ; } th.liste_titre_sel, td.liste_titre_sel { background-position: top right; color: #A51B00; font-weight: bold; - white-space: nowrap; + white-space: ; } input.liste_titre { diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 39a9292531c..1fbca3e51a0 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -238,7 +238,7 @@ input, input.flat, textarea, textarea.flat, form.flat select, select.flat { background: #FDFDFD; border: 1px solid #C0C0C0; - padding: 1px 1px 1px 1px; + /*padding: 1px 1px 1px 1px; */ margin: 0px 0px 0px 0px; } @@ -514,6 +514,7 @@ a.tmenudisabled:link, a.tmenudisabled:visited, a.tmenudisabled:hover, a.tmenudis cursor: not-allowed; font-weight: normal; white-space: nowrap; + text-decoration: none; } a.tmenu:link, a.tmenu:visited, a.tmenu:hover, a.tmenu:active { diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index f26aa4c527c..54aff2226a6 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -219,6 +219,15 @@ class User extends CommonObject $this->contact_id = $obj->fk_socpeople; $this->fk_member = $obj->fk_member; $this->fk_user = $obj->fk_user; + + // Retreive all extrafield for thirdparty + // fetch optionals attributes and labels + require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'); + $extrafields=new ExtraFields($this->db); + $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true); + if (count($extralabels)>0) { + $this->fetch_optionals($this->id,$extralabels); + } $this->db->free($result); } diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 7769a9da06c..53de51df268 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -7,6 +7,7 @@ * Copyright (C) 2005 Lionel Cousteix * Copyright (C) 2011 Herve Prot * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2013 Florian Henry * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -85,6 +86,9 @@ $form = new Form($db); $object = new User($db); $extrafields = new ExtraFields($db); +// fetch optionals attributes and labels +$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); + // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('usercard')); @@ -560,9 +564,6 @@ if ($action == 'adduserldap') * View */ -// fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); - llxHeader('',$langs->trans("UserCard")); $form = new Form($db); diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 3554af45ffd..616b0609f7a 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -63,6 +63,7 @@ if ($user->id == $id && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user- $feature2=''; $canreaduser=1; } + $result = restrictedArea($user, 'user', $id, '&user', $feature2); if ($user->id <> $id && ! $canreaduser) accessforbidden(); @@ -271,9 +272,8 @@ print ''."\n"; print '
'; $projectstatic->ref=$objp->ref; print $projectstatic->getNomUrl(1); - print ' - '.$objp->title.''.$objp->nb.''.$projectstatic->getLibStatut(3).'
global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>>
margin->enabled) && ! empty($object->element) && in_array($ob
 
tva_assuj == "0") echo '0'; - else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?$_POST["tva_tx"]:-1), $seller, $buyer); - ?> - "> - ">%"> -
tva_assuj == "0") echo '0'; + else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?$_POST["tva_tx"]:-1), $seller, $buyer); ?> -
element) && $object->element == 'contrat') - { - print $langs->trans("DateStartPlanned").' '; - $form->select_date('',"date_start_sl",$usehm,$usehm,1,"addline_sl"); - print '   '.$langs->trans("DateEndPlanned").' '; - $form->select_date('',"date_end_sl",$usehm,$usehm,1,"addline_sl"); - } - else - { - echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; - echo $form->select_date('','date_start',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct"); - echo ' '.$langs->trans('to').' '; - echo $form->select_date('','date_end',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct"); - } + "> + ">%">
element) && $object->element == 'contrat') + { + print $langs->trans("DateStartPlanned").' '; + $form->select_date('',"date_start_sl",$usehm,$usehm,1,"addline_sl"); + print '   '.$langs->trans("DateEndPlanned").' '; + $form->select_date('',"date_end_sl",$usehm,$usehm,1,"addline_sl"); + } + else + { + echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; + echo $form->select_date('','date_start',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct"); + echo ' '.$langs->trans('to').' '; + echo $form->select_date('','date_end',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct"); + } + ?> +
%% - - "> + + ">
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/filefunc.inc.php b/htdocs/filefunc.inc.php index f6b25d254ed..d1526e04984 100755 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -152,11 +152,11 @@ if (! empty($dolibarr_main_document_root_alt)) // Define DOL_MAIN_URL_ROOT and DOL_URL_ROOT $tmp=''; $found=0; -$real_dolibarr_main_document_root=str_replace('\\','/',realpath($dolibarr_main_document_root)); -$pathroot=$_SERVER["DOCUMENT_ROOT"]; -$paths=explode('/',str_replace('\\','/',$_SERVER["SCRIPT_NAME"])); +$real_dolibarr_main_document_root=str_replace('\\','/',realpath($dolibarr_main_document_root)); // A) Ex: C:/xxx/dolibarr/htdocs +$pathroot=$_SERVER["DOCUMENT_ROOT"]; // B) Ex: C:/Program Files/wamp/www/ +$paths=explode('/',str_replace('\\','/',$_SERVER["SCRIPT_NAME"])); // C) Ex: /dolibarr/htdocs/admin/system/phpinfo.php $concatpath=''; -foreach($paths as $tmppath) +foreach($paths as $tmppath) // We check to find (B+start of C)=A { if ($tmppath) $concatpath.='/'.$tmppath; //print $_SERVER["SCRIPT_NAME"].'-'.$pathroot.'-'.$concatpath.'-'.$real_dolibarr_main_document_root.'-'.realpath($pathroot.$concatpath).'
'; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 5b3c9d6c8d3..dbd23b2f465 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -947,7 +947,7 @@ class CommandeFournisseur extends CommonOrder $sql.= ", '".$this->note_public."'"; $sql.= ", ".$conf->entity; $sql.= ", ".$this->socid; - $sql.= ", ".$this->db->idate($now); + $sql.= ", '".$this->db->idate($now)."'"; //$sql.= ", ".$this->db->idate($now); $sql.= ", ".$user->id; $sql.= ", 0"; diff --git a/htdocs/holiday/fiche.php b/htdocs/holiday/fiche.php index 624287d9bb4..db27fb1116a 100644 --- a/htdocs/holiday/fiche.php +++ b/htdocs/holiday/fiche.php @@ -380,10 +380,10 @@ if($action == 'confirm_valid') $newSolde = $soldeActuel - ($nbJour*$cp->getConfCP('nbHolidayDeducted')); // On ajoute la modification dans le LOG - $cp->addLogCP($user->id,$cp->fk_user, $langs->transnoentitiesnoconv("Holidays"),$newSolde); + $cp->addLogCP($user->id, $cp->fk_user, $langs->transnoentitiesnoconv("Holidays"), $newSolde); // Mise à jour du solde - $cp->updateSoldeCP($cp->fk_user,$newSolde); + $cp->updateSoldeCP($cp->fk_user, $newSolde); // To $destinataire = new User($db); diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 9a3f073f40d..46affb6327a 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -346,9 +346,9 @@ ALTER TABLE llx_opensurvey_comments ADD INDEX idx_id_comment (id_comment); ALTER TABLE llx_opensurvey_comments ADD INDEX idx_id_sondage (id_sondage); ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_id_sondage_admin (id_sondage_admin); ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_date_fin (date_fin); -ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_id_users (id_users); -ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_nom (nom); -ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_id_sondage (id_sondage); +ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_opensurvey_user_studs_id_users (id_users); +ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_opensurvey_user_studs_nom (nom); +ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_opensurvey_user_studs_id_sondage (id_sondage); ALTER TABLE llx_boxes ADD COLUMN params varchar(255); @@ -374,3 +374,5 @@ create table llx_facture_fourn_extrafields import_key varchar(14) -- import key ) ENGINE=innodb; ALTER TABLE llx_facture_fourn_extrafields ADD INDEX idx_facture_fourn_extrafields (fk_object); + +ALTER TABLE llx_user_clicktodial ADD COLUMN url varchar(255) AFTER fk_user; diff --git a/htdocs/install/mysql/tables/llx_opensurvey_user_studs.key.sql b/htdocs/install/mysql/tables/llx_opensurvey_user_studs.key.sql index 041b2d0593d..810080e3466 100755 --- a/htdocs/install/mysql/tables/llx_opensurvey_user_studs.key.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_user_studs.key.sql @@ -15,6 +15,6 @@ -- along with this program. If not, see . -- ============================================================================ -ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_id_users (id_users); -ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_nom (nom); -ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_id_sondage (id_sondage); +ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_opensurvey_user_studs_id_users (id_users); +ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_opensurvey_user_studs_nom (nom); +ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_opensurvey_user_studs_id_sondage (id_sondage); diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 3448e3a196c..e477ec3b6a5 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -329,12 +329,17 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0) { migrate_categorie_association($db,$langs,$conf); + } - // Reload modules - migrate_reload_modules($db,$langs,$conf); - - // Reload menus - migrate_reload_menu($db,$langs,$conf,$versionto); + $afterversionarray=explode('.','3.3.9'); + $beforeversionarray=explode('.','3.4.9'); + if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0) + { + // Reload modules (this must be always and only into last targeted version) + migrate_reload_modules($db,$langs,$conf); + + // Reload menus (this must be always and only into last targeted version) + migrate_reload_menu($db,$langs,$conf,$versionto); } print '

'.$langs->trans("MigrationFinished").'

'; if ($user->admin) print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules"), 0, 1).'
'; -// Show warning about external users -print showModulesExludedForExternal($modules).'
'."\n"; -print "
\n"; +// Show warning about external users +if (empty($user->societe_id)) print showModulesExludedForExternal($modules).'

'."\n"; // For multicompany transversal mode if (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode))