diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 831aa15c68a..60fea392133 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,4 +1,7 @@ # .scrutinizer.yml +build: + - php-scrutinizer-run + imports: - javascript - php diff --git a/.travis.yml b/.travis.yml index 63e48a051f0..b710e17c773 100644 --- a/.travis.yml +++ b/.travis.yml @@ -164,12 +164,6 @@ before_script: echo echo "Set timezone" echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini - if [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then - # Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0, 7.1, 7.2 and nightly! - echo - echo "Enabling Memcached for PHP <= 5.4" - echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini - fi phpenv rehash echo @@ -350,6 +344,9 @@ script: php upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log php upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log php step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log + php upgrade.php 10.0.0 11.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log + php upgrade2.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log + php step5.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log # Enable modules not enabled into original dump php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log echo $? diff --git a/ChangeLog b/ChangeLog index e0f4159c49e..eefa22844fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,19 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 11.0.0 compared to 10.0.0 ***** +For Users: + + +For Developers: + + +WARNING: + +Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: +... + + ***** ChangeLog for 10.0.0 compared to 9.0.0 ***** For Users: NEW: Module "Ticket" is available as a stable module. @@ -114,6 +127,7 @@ NEW: Option in workflow module to set a reception billed on validate supplier bi NEW: Autocompletion on lists should be available on mobile applications. NEW: Add mass action to close several members. NEW: Add hidden option ADD_UNSPLASH_LOGIN_BACKGROUND for random background +NEW: Add hidden option to be ready for BREXIT For Developers: NEW: Module "DebugBar" is available as a stable module. diff --git a/build/debian/copyright b/build/debian/copyright index 72e531d7007..a5832aa7754 100644 --- a/build/debian/copyright +++ b/build/debian/copyright @@ -52,7 +52,7 @@ License: GPL-3+ details. . You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU General Public License version 3 can be found in the file @@ -98,7 +98,7 @@ License: GPL-2+ 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 . + along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2 file. @@ -192,7 +192,7 @@ License: GPL-2+ details. . You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file @@ -212,7 +212,7 @@ License: LGPL-2.1+ Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU Lesser General Public License version 2.1 can be found in the file @@ -236,7 +236,7 @@ License: GPL-2+ or MIT details. . You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file @@ -291,7 +291,7 @@ License: GPL-2+ details. . You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file @@ -311,7 +311,7 @@ License: LGPL-2.1+ Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU Lesser General Public License version 2.1 can be found in the file @@ -358,7 +358,7 @@ License: LGPL-2.1+ Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU Lesser General Public License version 2.1 can be found in the file @@ -378,7 +378,7 @@ License: LGPL-3.0+ See the GNU Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License - along with TCPDF. If not, see . + along with TCPDF. If not, see . . On Debian systems, the complete text of the GNU Lesser General Public License version 3 can be found in "/usr/share/common-licenses/LGPL-3". diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index 88b194f362b..4b1d4b55c65 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/build/perl/virtualmin/dolibarr.pl b/build/perl/virtualmin/dolibarr.pl index a28fc430caa..343cebc6abe 100644 --- a/build/perl/virtualmin/dolibarr.pl +++ b/build/perl/virtualmin/dolibarr.pl @@ -1,7 +1,7 @@ #---------------------------------------------------------------------------- # \file dolibarr.pl # \brief Dolibarr script install for Virtualmin Pro -# \author (c)2009-2018 Regis Houssin +# \author (c)2009-2019 Regis Houssin #---------------------------------------------------------------------------- @@ -30,7 +30,7 @@ return "Regis Houssin"; # script_dolibarr_versions() sub script_dolibarr_versions { -return ( "9.0.0", "8.0.3", "7.0.4", "6.0.8", "5.0.7" ); +return ( "10.0.0", "9.0.3", "8.0.5", "7.0.5", "6.0.8" ); } sub script_dolibarr_release @@ -390,6 +390,7 @@ sub script_dolibarr_check_latest { local ($ver) = @_; local @vers = &osdn_package_versions("dolibarr", + $ver >= 10.0 ? "dolibarr\\-(10\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 9.0 ? "dolibarr\\-(9\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 8.0 ? "dolibarr\\-(8\\.0\\.[0-9\\.]+)\\.tgz" : $ver >= 7.0 ? "dolibarr\\-(7\\.0\\.[0-9\\.]+)\\.tgz" : diff --git a/dev/examples/code/create_invoice.php b/dev/examples/code/create_invoice.php index 792341f5c79..dbbe9d84c1c 100755 --- a/dev/examples/code/create_invoice.php +++ b/dev/examples/code/create_invoice.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/dev/examples/code/create_order.php b/dev/examples/code/create_order.php index fa3fa573223..30265d5462e 100755 --- a/dev/examples/code/create_order.php +++ b/dev/examples/code/create_order.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/dev/examples/code/create_product.php b/dev/examples/code/create_product.php index 7ca09246980..234658388df 100755 --- a/dev/examples/code/create_product.php +++ b/dev/examples/code/create_product.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/dev/examples/code/create_user.php b/dev/examples/code/create_user.php index 2fed1a51972..96d369085d2 100755 --- a/dev/examples/code/create_user.php +++ b/dev/examples/code/create_user.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/dev/examples/code/get_contracts.php b/dev/examples/code/get_contracts.php index eafc0dfeed5..aec246e9480 100755 --- a/dev/examples/code/get_contracts.php +++ b/dev/examples/code/get_contracts.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/dev/initdata/generate-invoice.php b/dev/initdata/generate-invoice.php index 0f04a4d236f..bfdda2896a1 100755 --- a/dev/initdata/generate-invoice.php +++ b/dev/initdata/generate-invoice.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . * * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION */ diff --git a/dev/initdata/generate-order.php b/dev/initdata/generate-order.php index f07905f1edd..b66d3a3abc9 100755 --- a/dev/initdata/generate-order.php +++ b/dev/initdata/generate-order.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION */ diff --git a/dev/initdata/generate-product.php b/dev/initdata/generate-product.php index 9e1b15331d4..e9703fbfd6e 100755 --- a/dev/initdata/generate-product.php +++ b/dev/initdata/generate-product.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION */ diff --git a/dev/initdata/generate-proposal.php b/dev/initdata/generate-proposal.php index 4bd9c2c654b..30c9471a281 100755 --- a/dev/initdata/generate-proposal.php +++ b/dev/initdata/generate-proposal.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION */ diff --git a/dev/initdata/generate-thirdparty.php b/dev/initdata/generate-thirdparty.php index cc2e85e544a..54e17c7f8d7 100755 --- a/dev/initdata/generate-thirdparty.php +++ b/dev/initdata/generate-thirdparty.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION */ diff --git a/dev/initdata/import-products.php b/dev/initdata/import-products.php index fa9cfd6592b..e55f13c7c82 100755 --- a/dev/initdata/import-products.php +++ b/dev/initdata/import-products.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE */ diff --git a/dev/initdata/import-thirdparties.php b/dev/initdata/import-thirdparties.php index 8826ca18544..558745e8d06 100755 --- a/dev/initdata/import-thirdparties.php +++ b/dev/initdata/import-thirdparties.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE */ diff --git a/dev/initdata/import-users.php b/dev/initdata/import-users.php index 34130890f4b..64af2f9eb64 100755 --- a/dev/initdata/import-users.php +++ b/dev/initdata/import-users.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE */ diff --git a/dev/initdata/purge-data.php b/dev/initdata/purge-data.php index 42d6d28eadf..62f41ce825f 100755 --- a/dev/initdata/purge-data.php +++ b/dev/initdata/purge-data.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . * * THIS SCRIPT DELETE ALL MAIN TABLE CONTENT * WARNING, DO NOT USE ON A PRODUCTION INSTANCE diff --git a/dev/initdemo/sftpget_and_loaddump.php b/dev/initdemo/sftpget_and_loaddump.php index e261895b617..e5ade3aa2f6 100755 --- a/dev/initdemo/sftpget_and_loaddump.php +++ b/dev/initdemo/sftpget_and_loaddump.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . * or see http://www.gnu.org/ * * Get a distant dump file and load it into a mysql database diff --git a/dev/initdemo/updatedemo.php b/dev/initdemo/updatedemo.php index 53ae2251f35..dcaa44c43a6 100755 --- a/dev/initdemo/updatedemo.php +++ b/dev/initdemo/updatedemo.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . * or see http://www.gnu.org/ * * Get a distant dump file and load it into a mysql database diff --git a/dev/resources/licence/Links on GPL.txt b/dev/resources/licence/Links on GPL.txt index 1bb3053da2a..bb9c1597f68 100644 --- a/dev/resources/licence/Links on GPL.txt +++ b/dev/resources/licence/Links on GPL.txt @@ -1,8 +1,8 @@ * Page with licence compatibility -http://www.gnu.org/licenses/quick-guide-gplv3.fr.html +https://www.gnu.org/licenses/quick-guide-gplv3.fr.html * FAQ on GPL licence -http://www.fsf.org/licensing/licenses/gpl-faq.html +https://www.fsf.org/licensing/licenses/gpl-faq.html * Questions/Answers on Fork for using Dolibarr as a SaaS -http://stackoverflow.com/questions/539291/rebranding-a-gpld-app-as-saas +https://stackoverflow.com/questions/539291/rebranding-a-gpld-app-as-saas diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php index 789bd8173c4..f9657482c86 100644 --- a/dev/translation/autotranslator.class.php +++ b/dev/translation/autotranslator.class.php @@ -12,7 +12,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/dev/translation/autotranslator.php b/dev/translation/autotranslator.php index eb0f53ead65..5e8cc13c3c8 100755 --- a/dev/translation/autotranslator.php +++ b/dev/translation/autotranslator.php @@ -13,7 +13,7 @@ * 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 . + * along with this program. If not, see . */ /** diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php index 4db931f7dae..7f095a744db 100755 --- a/dev/translation/sanity_check_en_langfiles.php +++ b/dev/translation/sanity_check_en_langfiles.php @@ -15,7 +15,7 @@ * 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 . + * along with this program. If not, see . */ $sapi_type = php_sapi_name(); diff --git a/dev/translation/strip_language_file.php b/dev/translation/strip_language_file.php index d439397a512..ce28ca5de63 100755 --- a/dev/translation/strip_language_file.php +++ b/dev/translation/strip_language_file.php @@ -14,7 +14,7 @@ * 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 . + * along with this program. If not, see . * * ----- * diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index f44ff0071d2..527cb13fcfd 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -1,10 +1,10 @@ - * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2004-2019 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2016 Juanjo Menent - * Copyright (C) 2011-2018 Philippe Grand + * Copyright (C) 2011-2019 Philippe Grand * Copyright (C) 2011 Remy Younes * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel @@ -462,8 +462,6 @@ $linkback=''; print load_fiche_titre($titre, $linkback, 'title_accountancy'); -print "
\n"; - // Confirmation de la suppression de la ligne if ($action == 'delete') diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 3a55e092d94..e7cdc800aee 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -412,7 +412,7 @@ $titlepicto='title_setup'; print load_fiche_titre($titre, $linkback, $titlepicto); -print $langs->trans("AccountingAccountGroupsDesc", $langs->transnoentitiesnoconv("ByPersonalizedAccountGroups")).'

'; +print ''.$langs->trans("AccountingAccountGroupsDesc", $langs->transnoentitiesnoconv("ByPersonalizedAccountGroups")).'

'; // Confirmation de la suppression de la ligne if ($action == 'delete') diff --git a/htdocs/accountancy/admin/closure.php b/htdocs/accountancy/admin/closure.php index a638d598ac9..479dd410f33 100644 --- a/htdocs/accountancy/admin/closure.php +++ b/htdocs/accountancy/admin/closure.php @@ -21,9 +21,8 @@ * \ingroup Accountancy (Double entries) * \brief Setup page to configure accounting expert module */ -require '../../main.inc.php'; -// Class +require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; @@ -89,7 +88,7 @@ llxHeader(); $linkback = ''; print load_fiche_titre($langs->trans('MenuClosureAccounts'), $linkback, 'title_accountancy'); -print $langs->trans("DefaultClosureDesc").'
'; +print ''.$langs->trans("DefaultClosureDesc").'
'; print '
'; print '
'; diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index cba9ac92f3b..079e3585341 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -78,7 +78,6 @@ $list_account = array ( $accounting_mode = empty($conf->global->ACCOUNTING_MODE) ? 'RECETTES-DEPENSES' : $conf->global->ACCOUNTING_MODE; - if (GETPOST('change_chart', 'alpha')) { $chartofaccounts = GETPOST('chartofaccounts', 'int'); @@ -132,7 +131,7 @@ llxHeader(); $linkback = ''; print load_fiche_titre($langs->trans('MenuDefaultAccounts'), $linkback, 'title_accountancy'); -print $langs->trans("DefaultBindingDesc").'
'; +print ''.$langs->trans("DefaultBindingDesc").'
'; print '
'; print ''; diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 74090e54120..81dc83b2ae5 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -76,6 +76,7 @@ $model_option = array ( ), ); + /* * Actions */ @@ -138,6 +139,7 @@ $form = new Form($db); // $linkback = '' . $langs->trans("BackToModuleList") . ''; print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'title_setup'); + print "\n".''; + } + } + } + return $out; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 63246fb0287..12cf8893005 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5234,10 +5234,12 @@ class Form * @param int $fullday When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59 * @param string $addplusone Add a link "+1 hour". Value must be name of another selectDate field. * @param datetime $adddateof Add a link "Date of invoice" using the following date. + * @param string $openinghours Specify hour strat and hour end for the select ex 8,20 + * @param int $stepminutes Specify step for minutes between 1 and 30 * @return string Html for selectDate * @see form_date(), select_month(), select_year(), select_dayofweek() */ - public function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '') + public function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '', $openinghours = '', $stepminutes = 1) { global $conf,$langs; @@ -5248,6 +5250,7 @@ class Form if ($m == '') $m=0; $emptydate=0; $emptyhours=0; + if ($stepminutes<=0 || $stepminutes>30) $stepminutes = 1; if ($empty == 1) { $emptydate=1; $emptyhours=1; } if ($empty == 2) { $emptydate=0; $emptyhours=1; } $orig_set_time=$set_time; @@ -5468,10 +5471,18 @@ class Form if ($h) { + $hourstart = 0; + $hourend = 24; + if ($openinghours != '') { + $openinghours = explode(',', $openinghours); + $hourstart = $openinghours[0]; + $hourend = $openinghours[1]; + if ($hourend<$hourstart) $hourend = $hourstart; + } // Show hour $retstring.=''; if ($emptyhours) $retstring.=''; - for ($hour = 0; $hour < 24; $hour++) + for ($hour = $hourstart; $hour < $hourend; $hour++) { if (strlen($hour) < 2) $hour = "0" . $hour; $retstring.=''; @@ -5485,7 +5496,7 @@ class Form // Show minutes $retstring.=''; if ($emptyhours) $retstring.=''; - for ($min = 0; $min < 60 ; $min++) + for ($min = 0; $min < 60 ; $min+=$stepminutes) { if (strlen($min) < 2) $min = "0" . $min; $retstring.=''; @@ -6480,7 +6491,7 @@ class Form public function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleImportElementsList = false) { global $conf,$langs,$hookmanager; - global $bc; + global $bc, $action; $object->fetchObjectLinked(); @@ -6525,6 +6536,7 @@ class Form $showImportButton=true; } + $regs = array(); if ($objecttype != 'supplier_proposal' && preg_match('/^([^_]+)_([^_]+)/i', $objecttype, $regs)) { $element = $regs[1]; @@ -6628,7 +6640,7 @@ class Form public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array()) { global $conf, $langs, $hookmanager; - global $bc; + global $bc, $action; $linktoelem=''; $linktoelemlist=''; @@ -6663,8 +6675,6 @@ class Form ); } - global $action; - // Can complete the possiblelink array $hookmanager->initHooks(array('commonobject')); $parameters=array('listofidcompanytoscan' => $listofidcompanytoscan); diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php index 87b32902684..03c70f749d2 100644 --- a/htdocs/core/class/html.formaccounting.class.php +++ b/htdocs/core/class/html.formaccounting.class.php @@ -21,7 +21,7 @@ /** * \file htdocs/core/class/html.formaccounting.class.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief File of class with all html predefined components */ require_once DOL_DOCUMENT_ROOT .'/core/class/html.form.class.php'; @@ -392,7 +392,7 @@ class FormAccounting extends Form $resql = $this->db->query($sql); if ($resql) { while ($obj = $this->db->fetch_object($resql)) { - if (!empty($obj->code_compta_fournisseur)) { + if ($obj->code_compta_fournisseur != "") { $aux_account[$obj->code_compta_fournisseur] = $obj->code_compta_fournisseur.' ('.$obj->nom.')'; } } diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index d2fb93000a9..17643e2d69a 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -211,13 +211,13 @@ class FormCompany * The key of the list is the code (there can be several entries for a given code but in this case, the country field differs). * Thus the links with the departments are done on a department independently of its name. * - * @param string $selected Code state preselected (mus be state id) + * @param int $selected Code state preselected (mus be state id) * @param integer $country_codeid Country code or id: 0=list for all countries, otherwise country code or country rowid to show * @param string $htmlname Id of department. If '', we want only the string with