diff --git a/.editorconfig b/.editorconfig index 143f0739505..5b3e0d6a8df 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,14 +8,10 @@ charset = utf-8 end_of_line = lf insert_final_newline = true [*.php] -indent_style = space -indent_size = 4 +indent_style = tab [*.js] -indent_style = space -indent_size = 2 +indent_style = tab [*.css] -indent_style = space -indent_size = 2 +indent_style = tab [*.xml] -indent_style = space -indent_size = 4 +indent_style = tab diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e3a97fe358e..a603fd242cc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,10 @@ How to contribute to Dolibarr Bug reports and feature requests -------------------------------- -** NEW ** + +*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](http://www.dolibarr.org/forum). + +**NEW** Issues are now managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues). @@ -42,28 +45,19 @@ Please don't edit the ChangeLog file. A project manager will update it from your Use clear commit messages with the following structure:
-KEYWORD Short description (may be the bug number #456) +FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog) +or +CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog) +or +NEW|New Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456) +or +Short description (when the commit is not introducing feature nor closing a bug) Long description (Can span accross multiple lines).-Where KEYWORD is one of: - -- "Fixed" for bug fixes (May be followed by the bug number i.e: #456) -- "Closed" for a commit to close a feature request issue (May be followed by the bug number i.e: #456) -- void, don't put a keyword if the commit is not introducing feature or closing a bug. - ### Pull Requests -When submitting a pull request, use following syntax: - -
-KEYWORD Short description (may be the bug number #456) -- -Where KEYWORD is one of: - -- "FIXED" or "Fixed" for bug fixes. In upper case to appear into ChangeLog. (May be followed by the bug number i.e: #456) -- "NEW" or "New" for new features. In upper case to appear into ChangeLog. (May be followed by the task number i.e: #123) +When submitting a pull request, use same rule than Commits. With upper case keyword to appear into ChangeLog. ### Resources diff --git a/COPYRIGHT b/COPYRIGHT index e4bd78e7bbf..3c7cb5bf1cf 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -18,6 +18,7 @@ CKEditor 4.3.3 LGPL-2.1+ Yes FPDI 1.5.2 Apache Software License 2.0 Yes PDF templates management GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package) NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package) +PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency odtPHP 1.0.1 GPL-2+ b Yes Library to build/edit ODT files PHPExcel 1.8.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files php-iban 1.4.6 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP diff --git a/ChangeLog b/ChangeLog index 6ed93c77235..618231d8937 100644 --- a/ChangeLog +++ b/ChangeLog @@ -243,6 +243,12 @@ Dolibarr better: - Fix: Bad SEPA xml file creation - Fix: [ bug #1892 ] PHP Fatal error when using USER_UPDATE_SESSION trigger and adding a supplier invoice payment - Fix: Showing system error if not enough stock of product into orders creation with lines +- Fix: [ bug #2543 ] Untranslated "Contract" origin string when creating an invoice from a contract +- Fix: [ bug #2534 ] SQL error when editing a supplier invoice line +- Fix: [ bug #2535 ] Untranslated string in "Linked objects" page of a project +- Fix: [ bug #2545 ] Missing object_margin.png in Amarok theme +- Fix: [ bug #2542 ] Contracts store localtax preferences +- Fix: Bad permission assignments for stock movements actions ***** ChangeLog for 3.6.2 compared to 3.6.1 ***** - Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice. diff --git a/build/README b/build/README index 897a59c4eef..4816be8bc3a 100644 --- a/build/README +++ b/build/README @@ -28,9 +28,6 @@ Note: Prerequisites to build autoexe DoliWamp package: recommanded), open file build/exe/doliwamp.iss and click on button "Compile". The .exe file will be build into directory build. -- To build a translaction package, launch the script -> perl makepack-dolibarrlang.pl - - To build a theme package, launch the script > perl makepack-dolibarrtheme.pl diff --git a/build/debian/changelog b/build/debian/changelog index 50d2b158e29..a8d056d77ab 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -3,4 +3,4 @@ dolibarr (3.8.0-3) UNRELEASED; urgency=low [ Laurent Destailleur (eldy) ] * New upstream release. - -- Laurent Destailleur (eldy)
"; + +echo "
| # | String | File and lines |
|---|---|---|
| $count | "; + echo "$string | "; + echo "";
+ foreach ($pages AS $page => $lines ) {
+ echo "$page ";
+ foreach ($lines as $line => $nothing) {
+ echo "($line) ";
+ }
+ echo " "; + } + echo " |
"; + print_r($unused); +} +echo ""; +echo ""; +?> \ No newline at end of file diff --git a/dev/translation/txpull.sh b/dev/translation/txpull.sh index 0154fb14c72..71e03cf522e 100755 --- a/dev/translation/txpull.sh +++ b/dev/translation/txpull.sh @@ -26,7 +26,6 @@ fi if [ "x$1" = "xall" ] then - cd htdocs/lang for dir in `find htdocs/langs/* -type d` do fic=`basename $dir` diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 8fc5ccf0c40..c0f24821d1c 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -4,6 +4,7 @@ * Copyright (C) 2014 Florian Henry* Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -94,7 +95,7 @@ llxHeader(); $form = new Form($db); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'setup'); +print_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'title_setup'); $head = admin_accounting_prepare_head(); diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 85e49028298..0a005862054 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -5,6 +5,7 @@ * Copyright (C) 2014 Ari Elbaz (elarifr) * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -148,7 +149,7 @@ llxHeader(); $form = new Form($db); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'setup'); +print_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'title_setup'); $head = admin_accounting_prepare_head($accounting); diff --git a/htdocs/accountancy/admin/journaux.php b/htdocs/accountancy/admin/journaux.php index bec3fee45e9..03fd8684f50 100644 --- a/htdocs/accountancy/admin/journaux.php +++ b/htdocs/accountancy/admin/journaux.php @@ -4,6 +4,7 @@ * Copyright (C) 2014 Florian Henry * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -82,7 +83,7 @@ llxHeader(); $form = new Form($db); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'setup'); +print_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'title_setup'); $head = admin_accounting_prepare_head(null); diff --git a/htdocs/accountancy/bookkeeping/balancebymonth.php b/htdocs/accountancy/bookkeeping/balancebymonth.php index 35e6c85ee4f..bae7b10e38c 100644 --- a/htdocs/accountancy/bookkeeping/balancebymonth.php +++ b/htdocs/accountancy/bookkeeping/balancebymonth.php @@ -2,6 +2,7 @@ /* Copyright (C) 2013-2014 Olivier Geffroy * Copyright (C) 2013-2014 Alexandre Spangaro * Copyright (C) 2014 Florian Henry + * Copyright (C) 2015 Jean-François Ferry * * 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 diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 0c653627be0..71afe4ca218 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -106,7 +106,7 @@ if (! empty($id)) { print ''; $linkback=''.$langs->trans("Back").''; - print_fiche_titre($langs->trans('CustomersVentilation'),$linkback,'setup'); + print_fiche_titre($langs->trans('CustomersVentilation'),$linkback,'title_setup'); print ' '; diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 1760f8360a9..39c9d05c833 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -3,6 +3,7 @@ * Copyright (C) 2013-2014 Florian Henry
* Copyright (C) 2013-2014 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry * * 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 diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 7605d54825c..c2c51bacd42 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -178,7 +178,7 @@ if ($result) { /* * Action - * FIXME Action must be set before any view part + * FIXME Action must be set before any view part to respect MVC */ // Bookkeeping Write diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index 1acd5829c45..70d97b376c5 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -5,6 +5,7 @@ * Copyright (C) 2013-2014 Olivier Geffroy * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry * * 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 diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 1e445911b24..877c8d785e8 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -7,6 +7,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2012 J. Fernando Lagrange + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -110,7 +111,7 @@ llxHeader('',$langs->trans("MembersSetup"),$help_url); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("MembersSetup"),$linkback,'setup'); +print_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup'); $head = member_admin_prepare_head(); diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/adherent_extrafields.php index fc820100315..54667967634 100644 --- a/htdocs/adherents/admin/adherent_extrafields.php +++ b/htdocs/adherents/admin/adherent_extrafields.php @@ -65,12 +65,12 @@ llxHeader('',$langs->trans("MembersSetup"),$help_url); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("MembersSetup"),$linkback,'setup'); +print_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup'); $head = member_admin_prepare_head(); -dol_fiche_head($head, 'attributes', $langs->trans("Members"), 0, 'user'); +dol_fiche_head($head, 'attributes', $langs->trans("Members"), 0, 'title_user'); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; diff --git a/htdocs/adherents/admin/adherent_type_extrafields.php b/htdocs/adherents/admin/adherent_type_extrafields.php index 4164be44f64..2f57ce4ed6b 100644 --- a/htdocs/adherents/admin/adherent_type_extrafields.php +++ b/htdocs/adherents/admin/adherent_type_extrafields.php @@ -4,6 +4,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Florian Henry + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -67,7 +68,7 @@ llxHeader('',$langs->trans("MembersSetup"),$help_url); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("MembersSetup"),$linkback,'setup'); +print_fiche_titre($langs->trans("MembersSetup"),$linkback,'setup_title'); $head = member_admin_prepare_head(); diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php index 0f92e017437..b7383e00010 100644 --- a/htdocs/adherents/admin/public.php +++ b/htdocs/adherents/admin/public.php @@ -3,6 +3,7 @@ * Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2006-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -80,7 +81,7 @@ llxHeader('',$langs->trans("MembersSetup"),$help_url); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("MembersSetup"),$linkback,'setup'); +print_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup'); $head = member_admin_prepare_head(); @@ -164,7 +165,7 @@ print ''; print ' \n"; // Can edit @@ -197,7 +198,7 @@ if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled)) print ' '; print $langs->trans("DefaultAmount"); print ' '; -print '';; +print ''; print " \n"; } diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 6aa9e074ff6..0fe6366ae58 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -249,7 +249,7 @@ if (empty($reshook)) } $lastname=$_POST["lastname"]; $firstname=$_POST["firstname"]; - $morphy=$morphy=$_POST["morphy"];; + $morphy=$morphy=$_POST["morphy"]; if ($morphy != 'mor' && empty($lastname)) { $error++; $langs->load("errors"); diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index c8c4f9b9ad4..941f7b300fd 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -5,8 +5,9 @@ * Copyright (C) 2004 Sebastien Di Cintio '; print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL"); print ' '; - print '';; + print ''; print " * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2009-2012 Regis Houssin - * Copyright (C) 2014 Alexandre Spangaro + * Copyright (C) 2014-2015 Alexandre Spangaro * Copyright (C) 2015 Marcos García + * Copyright (C) 2015 Frederic France * * 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 @@ -77,7 +78,8 @@ class Adherent extends CommonObject var $morphy; var $public; - var $note; // Private note + var $note_private; // Private note + var $note_public; // Public note var $statut; // -1:brouillon, 0:resilie, >=1:valide,paye var $photo; @@ -310,7 +312,7 @@ class Adherent extends CommonObject $sql.= " VALUES ("; $sql.= " '".$this->db->idate($this->datec)."'"; $sql.= ", ".($this->login?"'".$this->db->escape($this->login)."'":"null"); - $sql.= ", ".($user->id>0?$user->id:"null"); // Can be null because member can be createb by a guest or a script + $sql.= ", ".($user->id>0?$user->id:"null"); // Can be null because member can be created by a guest or a script $sql.= ", null, null, '".$this->morphy."'"; $sql.= ", '".$this->typeid."'"; $sql.= ", ".$conf->entity; @@ -445,9 +447,10 @@ class Adherent extends CommonObject $sql.= ", email='".$this->email."'"; $sql.= ", skype='".$this->skype."'"; $sql.= ", phone=" .($this->phone?"'".$this->db->escape($this->phone)."'":"null"); - $sql.= ", phone_perso=" .($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null"); + $sql.= ", phone_perso=" .($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null"); $sql.= ", phone_mobile=" .($this->phone_mobile?"'".$this->db->escape($this->phone_mobile)."'":"null"); - $sql.= ", note=" .($this->note?"'".$this->db->escape($this->note)."'":"null"); + $sql.= ", note_private=" .($this->note_private?"'".$this->db->escape($this->note_private)."'":"null"); + $sql.= ", note_public=" .($this->note_private?"'".$this->db->escape($this->note_public)."'":"null"); $sql.= ", photo=" .($this->photo?"'".$this->photo."'":"null"); $sql.= ", public='".$this->public."'"; $sql.= ", statut=" .$this->statut; @@ -473,7 +476,7 @@ class Adherent extends CommonObject $action='update'; // Actions on extra fields (by external module) - // FIXME le hook fait double emploi avec le trigger !! + // TODO le hook fait double emploi avec le trigger !! $hookmanager->initHooks(array('memberdao')); $parameters=array('id'=>$this->id); $action=''; @@ -1053,7 +1056,8 @@ class Adherent extends CommonObject { global $langs; - $sql = "SELECT d.rowid, d.ref_ext, d.civility as civility_id, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note,"; + $sql = "SELECT d.rowid, d.ref_ext, d.civility as civility_id, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note_private,"; + $sql.= " d.note_public,"; $sql.= " d.email, d.skype, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,"; $sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,"; $sql.= " d.datec as datec,"; @@ -1134,7 +1138,8 @@ class Adherent extends CommonObject $this->datevalid = $this->db->jdate($obj->datev); $this->birth = $this->db->jdate($obj->birthday); - $this->note = $obj->note; + $this->note_private = $obj->note_private; + $this->note_public = $obj->note_public; $this->morphy = $obj->morphy; $this->typeid = $obj->fk_adherent_type; @@ -1561,7 +1566,8 @@ class Adherent extends CommonObject $result=''; $label = '' . $langs->trans("ShowMember") . ''; - $label.= '
' . $langs->trans('Ref') . ': ' . $this->ref; + if (! empty($this->ref)) + $label.= '
' . $langs->trans('Ref') . ': ' . $this->ref; if (! empty($this->firstname) || ! empty($this->lastname)) $label.= '
' . $langs->trans('Name') . ': ' . $this->getFullName($langs); $linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; @@ -1801,7 +1807,7 @@ class Adherent extends CommonObject $this->phone = '0999999999'; $this->phone_perso = '0999999998'; $this->phone_mobile = '0999999997'; - $this->note='No comment'; + $this->note_private='No comment'; $this->birth=time(); $this->photo=''; $this->public=1; @@ -1874,7 +1880,8 @@ class Adherent extends CommonObject if ($this->phone_perso && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO] = $this->phone_perso; if ($this->phone_mobile && ! empty($conf->global->LDAP_MEMBER_FIELD_MOBILE)) $info[$conf->global->LDAP_MEMBER_FIELD_MOBILE] = $this->phone_mobile; if ($this->fax && ! empty($conf->global->LDAP_MEMBER_FIELD_FAX)) $info[$conf->global->LDAP_MEMBER_FIELD_FAX] = $this->fax; - if ($this->note && ! empty($conf->global->LDAP_MEMBER_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_MEMBER_FIELD_DESCRIPTION] = $this->note; + if ($this->note_private && ! empty($conf->global->LDAP_MEMBER_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_MEMBER_FIELD_DESCRIPTION] = $this->note_private; + if ($this->note_public && ! empty($conf->global->LDAP_MEMBER_FIELD_NOTE_PUBLIC)) $info[$conf->global->LDAP_MEMBER_FIELD_NOTE_PUBLIC] = $this->note_public; if ($this->birth && ! empty($conf->global->LDAP_MEMBER_FIELD_BIRTHDATE)) $info[$conf->global->LDAP_MEMBER_FIELD_BIRTHDATE] = dol_print_date($this->birth,'dayhourldap'); if (isset($this->statut) && ! empty($conf->global->LDAP_FIELD_MEMBER_STATUS)) $info[$conf->global->LDAP_FIELD_MEMBER_STATUS] = $this->statut; if ($this->datefin && ! empty($conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION)) $info[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION] = dol_print_date($this->datefin,'dayhourldap'); @@ -1947,4 +1954,21 @@ class Adherent extends CommonObject } } + /** + * Function used to replace a thirdparty id with another one. + * + * @param DoliDB $db Database handler + * @param int $origin_id Old thirdparty id + * @param int $dest_id New thirdparty id + * @return bool + */ + public static function replaceThirdparty($db, $origin_id, $dest_id) + { + $tables = array( + 'adherent' + ); + + return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); + } + } diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index cbf5b428cc0..ee15a261820 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -73,7 +73,7 @@ class AdherentType extends CommonObject { global $conf; - $this->statut=trim($this->statut); + $this->statut=(int) $this->statut; $sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type ("; $sql.= "libelle"; diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 41c06beebe9..a94f6750f55 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -110,7 +110,7 @@ if ($sall) if (is_numeric($sall)) $sql.= "d.rowid = ".$sall." OR "; $sql.=" d.firstname LIKE '%".$db->escape($sall)."%' OR d.lastname LIKE '%".$db->escape($sall)."%' OR d.societe LIKE '%".$db->escape($sall)."%'"; $sql.=" OR d.email LIKE '%".$db->escape($sall)."%' OR d.login LIKE '%".$db->escape($sall)."%' OR d.address LIKE '%".$db->escape($sall)."%'"; - $sql.=" OR d.town LIKE '%".$db->escape($sall)."%' OR d.note LIKE '%".$db->escape($sall)."%')"; + $sql.=" OR d.town LIKE '%".$db->escape($sall)."%' OR d.note_public LIKE '%".$db->escape($sall)."%' OR d.note_private LIKE '%".$db->escape($sall)."%')"; } } if ($type > 0) diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index 727b3a9bcdc..79b7db086e6 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -1,6 +1,7 @@ - * Copyright (C) 2004-2014 Laurent Destailleur+/* Copyright (C) 2004 Rodolphe Quiedeville + * Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2015 Frederic France * * 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 @@ -19,7 +20,7 @@ /** * \file htdocs/adherents/note.php * \ingroup member - * \brief Tabe for note of a member + * \brief Tab for note of a member */ require '../main.inc.php'; @@ -45,26 +46,13 @@ if ($result > 0) $result=$adht->fetch($object->typeid); } +$permissionnote=$user->rights->adherent->creer; // Used by the include of actions_setnotes.inc.php /* * Actions */ -if ($action == 'update' && $user->rights->adherent->creer && ! $_POST["cancel"]) -{ - $db->begin(); - - $res=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES)); - if ($res < 0) - { - setEventMessage($object->error, 'errors'); - $db->rollback(); - } - else - { - $db->commit(); - } -} +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once @@ -82,7 +70,7 @@ if ($id) dol_fiche_head($head, 'note', $langs->trans("Member"), 0, 'user'); - print "\n"; + print '
'; - /* - * Actions - */ - print ''; - print ''; + $colwidth='20'; + $permission = $user->rights->adherent->creer; // Used by the include of notes.tpl.php + include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; - if ($user->rights->adherent->creer && $action != 'edit') - { - print '"; - } - - print ""; + dol_fiche_end(); } diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 22b8cdbfd68..cdeaa21ba9f 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -386,7 +386,7 @@ if ($rowid > 0) { $sql.= " AND (d.firstname LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; $sql.= " OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; - $sql.= " OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; + $sql.= " OR d.town LIKE '%".$sall."%' OR d.note_public LIKE '%".$sall."%' OR d.note_private LIKE '%".$sall."%')"; } if ($status != '') { diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index 5d10f4614cc..3f952bae511 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -2,6 +2,7 @@ /* Copyright (C) 2008-2014 Laurent Destailleur* Copyright (C) 2011 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -132,7 +133,7 @@ if (preg_match('/del_(.*)/',$action,$reg)) llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup'); +print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup'); print "
\n"; diff --git a/htdocs/admin/agenda_extrafields.php b/htdocs/admin/agenda_extrafields.php index f03af469bca..d7af0bc8d9e 100644 --- a/htdocs/admin/agenda_extrafields.php +++ b/htdocs/admin/agenda_extrafields.php @@ -4,6 +4,7 @@ * Copyright (C) 2004-2013 Laurent Destailleur* Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Florian Henry + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -69,7 +70,7 @@ $textobject=$langs->transnoentitiesnoconv("Agenda"); llxHeader('',$langs->trans("AgendaSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup'); +print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup'); print "
\n"; $head=agenda_prepare_head(); diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index fe0539f7348..f0187da6881 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -1,6 +1,7 @@ * Copyright (C) 2011-2014 Juanjo Menent+ * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -123,7 +124,7 @@ $arrayofcss=array(); llxHeader('',$langs->trans("AgendaSetup"),'','',0,0,$arrayofjs,$arrayofcss); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup'); +print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup'); print '
'; $head=agenda_prepare_head(); diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 85623270edf..f0d9f2ca00d 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -1,7 +1,8 @@ - * Copyright (C) 2011 Regis Houssin- * Copyright (C) 2011-2013 Juanjo Menent +/* Copyright (C) 2008-2010 Laurent Destailleur + * Copyright (C) 2011 Regis Houssin + * Copyright (C) 2011-2013 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -88,7 +89,7 @@ $formactions=new FormActions($db); llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup'); +print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup'); print "
\n"; diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index ecf49c01201..d196664bdf9 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -2,6 +2,7 @@ /* Copyright (C) 2008-2013 Laurent Destailleur* Copyright (C) 2012-2013 Juanjo Menent * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -73,7 +74,7 @@ if (! isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $conf->global->MAIN_A llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup'); +print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup'); print '
'; diff --git a/htdocs/admin/askpricesupplier.php b/htdocs/admin/askpricesupplier.php index 6307e81042c..ed73898278e 100644 --- a/htdocs/admin/askpricesupplier.php +++ b/htdocs/admin/askpricesupplier.php @@ -6,7 +6,8 @@ * Copyright (C) 2004 Eric Seigne* Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2011-2013 Juanjo Menent + * Copyright (C) 2011-2013 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -239,7 +240,7 @@ $form=new Form($db); //if ($mesg) print $mesg; $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("AskPriceSupplierSetup"),$linkback,'setup'); +print_fiche_titre($langs->trans("AskPriceSupplierSetup"),$linkback,'title_setup'); $head = askpricesupplier_admin_prepare_head(); @@ -319,7 +320,6 @@ foreach ($dirmodels as $reldir) // Info $htmltooltip=''; $htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().'
'; - $askpricesupplier->type=0; $nextval=$module->getNextValue($mysoc,$askpricesupplier); if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip.=''.$langs->trans("NextValue").': '; diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index a63e310a9b3..dee635c1778 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -1,7 +1,8 @@ - * Copyright (C) 2010-2013 Juanjo Menent- * Copyright (C) 2013-2014 Philippe Grand +/* Copyright (C) 2009 Laurent Destailleur + * Copyright (C) 2010-2013 Juanjo Menent + * Copyright (C) 2013-2014 Philippe Grand + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -86,7 +87,7 @@ llxHeader("",$langs->trans("BankSetupModule")); $form=new Form($db); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("BankSetupModule"),$linkback,'setup'); +print_fiche_titre($langs->trans("BankSetupModule"),$linkback,'title_setup'); print '