diff --git a/dev/examples/code/create_invoice.php b/dev/examples/code/create_invoice.php index cdb23e11f69..fc1af34ddd9 100755 --- a/dev/examples/code/create_invoice.php +++ b/dev/examples/code/create_invoice.php @@ -1,6 +1,7 @@ #!/usr/bin/env php + * Copyright (C) 2024 Frédéric 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 @@ -55,7 +56,7 @@ if (!$result > 0) { dol_print_error(null, $user->error); exit; } -$user->getrights(); +$user->loadRights(); print "***** ".$script_file." (".$version.") *****\n"; diff --git a/dev/examples/code/create_order.php b/dev/examples/code/create_order.php index 3b4e88d5646..7ab059cc931 100755 --- a/dev/examples/code/create_order.php +++ b/dev/examples/code/create_order.php @@ -1,6 +1,7 @@ #!/usr/bin/env php + * Copyright (C) 2024 Frédéric 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 @@ -53,7 +54,7 @@ if (!$result > 0) { dol_print_error(null, $user->error); exit; } -$user->getrights(); +$user->loadRights(); print "***** ".$script_file." (".$version.") *****\n"; diff --git a/dev/examples/code/create_product.php b/dev/examples/code/create_product.php index 2ceaa5d74e6..9d4132d40d3 100755 --- a/dev/examples/code/create_product.php +++ b/dev/examples/code/create_product.php @@ -1,6 +1,7 @@ #!/usr/bin/env php + * Copyright (C) 2024 Frédéric 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 @@ -53,7 +54,7 @@ if (!$result > 0) { dol_print_error(null, $user->error); exit; } -$user->getrights(); +$user->loadRights(); print "***** ".$script_file." (".$version.") *****\n"; diff --git a/dev/examples/code/create_user.php b/dev/examples/code/create_user.php index 91644c3fd45..33732f8562e 100755 --- a/dev/examples/code/create_user.php +++ b/dev/examples/code/create_user.php @@ -1,6 +1,7 @@ #!/usr/bin/env php + * Copyright (C) 2024 Frédéric 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 @@ -53,7 +54,7 @@ if (!$result > 0) { dol_print_error(null, $user->error); exit; } -$user->getrights(); +$user->loadRights(); print "***** ".$script_file." (".$version.") *****\n"; diff --git a/dev/examples/code/get_contracts.php b/dev/examples/code/get_contracts.php index 853a059d995..52deedc3ff2 100755 --- a/dev/examples/code/get_contracts.php +++ b/dev/examples/code/get_contracts.php @@ -1,6 +1,7 @@ #!/usr/bin/env php + * Copyright (C) 2024 Frédéric 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 @@ -53,7 +54,7 @@ if (!$result > 0) { dol_print_error(null, $user->error); exit; } -$user->getrights(); +$user->loadRights(); print "***** ".$script_file." (".$version.") *****\n"; diff --git a/dev/initdata/generate-invoice.php b/dev/initdata/generate-invoice.php index 802adf92aa6..3f4a701b0c4 100755 --- a/dev/initdata/generate-invoice.php +++ b/dev/initdata/generate-invoice.php @@ -1,6 +1,7 @@ #!/usr/bin/env php + * Copyright (C) 2024 Frédéric 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 @@ -104,7 +105,7 @@ if (! $ret > 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } -$user->getrights(); +$user->loadRights(); $socids = array(); diff --git a/dev/initdata/generate-order.php b/dev/initdata/generate-order.php index 68aab032686..fc110907ce5 100755 --- a/dev/initdata/generate-order.php +++ b/dev/initdata/generate-order.php @@ -2,6 +2,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2024 Frédéric 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 @@ -110,7 +111,7 @@ if ($ret <= 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } -$user->getrights(); +$user->loadRights(); $societesid = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe where client in (1, 3)"; diff --git a/dev/initdata/generate-product.php b/dev/initdata/generate-product.php index 20f83932e64..0a41c0df8fe 100755 --- a/dev/initdata/generate-product.php +++ b/dev/initdata/generate-product.php @@ -2,6 +2,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2024 Frédéric 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 @@ -58,7 +59,7 @@ if (! $ret > 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } -$user->getrights(); +$user->loadRights(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array(); diff --git a/dev/initdata/generate-proposal.php b/dev/initdata/generate-proposal.php index 3c357949e28..59298a44e69 100755 --- a/dev/initdata/generate-proposal.php +++ b/dev/initdata/generate-proposal.php @@ -2,6 +2,7 @@ * Copyright (C) 2007 Laurent Destailleur + * Copyright (C) 2024 Frédéric 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 @@ -106,7 +107,7 @@ if (! $ret > 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } -$user->getrights(); +$user->loadRights(); $socids = array(); diff --git a/dev/initdata/generate-thirdparty.php b/dev/initdata/generate-thirdparty.php index 4bdcad752ef..0aba3de6a4c 100755 --- a/dev/initdata/generate-thirdparty.php +++ b/dev/initdata/generate-thirdparty.php @@ -2,6 +2,7 @@ * Copyright (C) 2006-2013 Laurent Destailleur + * Copyright (C) 2024 Frédéric 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 @@ -61,7 +62,7 @@ if (! $ret > 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } -$user->getrights(); +$user->loadRights(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array(); diff --git a/dev/initdata/import-products.php b/dev/initdata/import-products.php index 18bc7611491..7a61cd1cf16 100755 --- a/dev/initdata/import-products.php +++ b/dev/initdata/import-products.php @@ -2,6 +2,7 @@ * Copyright (C) 2016 Juanjo Menent + * Copyright (C) 2024 Frédéric 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 @@ -83,7 +84,7 @@ if (! $ret > 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } -$user->getrights(); +$user->loadRights(); // Ask confirmation if (! $confirmed) { diff --git a/dev/initdata/import-thirdparties.php b/dev/initdata/import-thirdparties.php index 4157cee8686..d6b7f1d3183 100755 --- a/dev/initdata/import-thirdparties.php +++ b/dev/initdata/import-thirdparties.php @@ -2,6 +2,7 @@ * Copyright (C) 2016 Juanjo Menent + * Copyright (C) 2024 Frédéric 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 @@ -83,7 +84,7 @@ if (! $ret > 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } -$user->getrights(); +$user->loadRights(); // Ask confirmation if (! $confirmed) { diff --git a/dev/initdata/import-users.php b/dev/initdata/import-users.php index eb4625c96b1..fd0767ca31d 100755 --- a/dev/initdata/import-users.php +++ b/dev/initdata/import-users.php @@ -84,7 +84,7 @@ if (! $ret > 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } -$user->getrights(); +$user->loadRights(); // Ask confirmation if (! $confirmed) { diff --git a/dev/initdata/purge-data.php b/dev/initdata/purge-data.php index 9bc83dec400..32e68b81100 100755 --- a/dev/initdata/purge-data.php +++ b/dev/initdata/purge-data.php @@ -231,7 +231,7 @@ if (! $ret > 0) { print 'An admin user with login "admin" must exists to use this script.'."\n"; exit; } -//$user->getrights(); +//$user->loadRights(); print "Purge all data for this database:\n"; diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 49da9149aff..d225ad27af8 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -167,7 +167,7 @@ if ($langs->getDefaultLang() != $langcode) { // Language Management $langs->loadLangs(array('main', 'admin', 'cron', 'dict')); -$user->getrights(); +$user->loadRights(); if (isset($argv[3]) && $argv[3]) { $id = $argv[3]; @@ -245,7 +245,7 @@ if (is_array($object->lines) && (count($object->lines) > 0)) { exit(1); } } - $user->getrights(); + $user->loadRights(); } // Reload langs diff --git a/test/phpunit/AbstractRestAPITest.php b/test/phpunit/AbstractRestAPITest.php index fa1cb867283..bacdaa1e812 100644 --- a/test/phpunit/AbstractRestAPITest.php +++ b/test/phpunit/AbstractRestAPITest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010 Laurent Destailleur * Copyright (C) 2023 Alexandre Janniaux * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; $conf->global->MAIN_UMASK = '0666'; diff --git a/test/phpunit/AccountingAccountTest.php b/test/phpunit/AccountingAccountTest.php index 5ed9dd36151..053fe345558 100644 --- a/test/phpunit/AccountingAccountTest.php +++ b/test/phpunit/AccountingAccountTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/ActionCommTest.php b/test/phpunit/ActionCommTest.php index 1d77158ac1c..35b616bc2c4 100644 --- a/test/phpunit/ActionCommTest.php +++ b/test/phpunit/ActionCommTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/AdherentTest.php b/test/phpunit/AdherentTest.php index f98200cb044..c8ff2ff1a8a 100644 --- a/test/phpunit/AdherentTest.php +++ b/test/phpunit/AdherentTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010 Laurent Destailleur * Copyright (C) 2013 Marcos García * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -36,7 +37,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/AdminLibTest.php b/test/phpunit/AdminLibTest.php index d50de588de9..a65234cecf0 100644 --- a/test/phpunit/AdminLibTest.php +++ b/test/phpunit/AdminLibTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010 Laurent Destailleur * Copyright (C) 2023 Alexandre Janniaux * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/AllTests.php b/test/phpunit/AllTests.php index 794bdfe30a0..7a2c903b14b 100644 --- a/test/phpunit/AllTests.php +++ b/test/phpunit/AllTests.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010-2012 Laurent Destailleur * Copyright (C) 2011-2012 Regis Houssin * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric 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 @@ -62,7 +63,7 @@ if (isModEnabled('google')) { if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; $conf->global->MAIN_UMASK = '666'; diff --git a/test/phpunit/AssetModelTest.php b/test/phpunit/AssetModelTest.php index d0d86e149c8..322577f6565 100644 --- a/test/phpunit/AssetModelTest.php +++ b/test/phpunit/AssetModelTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2007-2017 Laurent Destailleur * Copyright (C) 2022 Alice Adminson * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/BOMTest.php b/test/phpunit/BOMTest.php index 2cb661f6ab3..9c54dd5dc63 100644 --- a/test/phpunit/BOMTest.php +++ b/test/phpunit/BOMTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2007-2017 Laurent Destailleur * Copyright (C) 2023 Alexandre Janniaux * Copyright (C) ---Put here your own copyright and developer email--- + * Copyright (C) 2024 Frédéric 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 @@ -33,7 +34,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/BankAccountTest.php b/test/phpunit/BankAccountTest.php index 86192311459..bf0575afa7f 100644 --- a/test/phpunit/BankAccountTest.php +++ b/test/phpunit/BankAccountTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/BarcodeTest.php b/test/phpunit/BarcodeTest.php index d6bd7fc0e7c..801a87354dc 100644 --- a/test/phpunit/BarcodeTest.php +++ b/test/phpunit/BarcodeTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/BonPrelevementTest.php b/test/phpunit/BonPrelevementTest.php index 1584c176a0d..42cf9daabab 100644 --- a/test/phpunit/BonPrelevementTest.php +++ b/test/phpunit/BonPrelevementTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index 25eef494d2e..ba73a20da9b 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010-2012 Laurent Destailleur * Copyright (C) 2012 Regis Houssin * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -64,7 +65,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/CMailFileTest.php b/test/phpunit/CMailFileTest.php index 1898a9fba34..a09d3ea62a8 100644 --- a/test/phpunit/CMailFileTest.php +++ b/test/phpunit/CMailFileTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/CategorieTest.php b/test/phpunit/CategorieTest.php index cef67a66b70..923ce87ffdb 100644 --- a/test/phpunit/CategorieTest.php +++ b/test/phpunit/CategorieTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/ChargeSocialesTest.php b/test/phpunit/ChargeSocialesTest.php index 6ec273f5c34..532449f1b64 100644 --- a/test/phpunit/ChargeSocialesTest.php +++ b/test/phpunit/ChargeSocialesTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/CodingPhpTest.php b/test/phpunit/CodingPhpTest.php index 4fa7d09631f..af861b03c3b 100644 --- a/test/phpunit/CodingPhpTest.php +++ b/test/phpunit/CodingPhpTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2013 Laurent Destailleur * Copyright (C) 2023 Alexandre Janniaux * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric 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 @@ -67,7 +68,7 @@ if (! defined("NOLOGIN")) { if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/CodingSqlTest.php b/test/phpunit/CodingSqlTest.php index ecdae47f807..eb421bce9e2 100644 --- a/test/phpunit/CodingSqlTest.php +++ b/test/phpunit/CodingSqlTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -66,7 +67,7 @@ if (! defined("NOLOGIN")) { if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/CommandeFournisseurTest.php b/test/phpunit/CommandeFournisseurTest.php index 67bf797b8c2..96460ee86a9 100644 --- a/test/phpunit/CommandeFournisseurTest.php +++ b/test/phpunit/CommandeFournisseurTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/CommandeTest.php b/test/phpunit/CommandeTest.php index 3793df8d3ff..08dd399636a 100644 --- a/test/phpunit/CommandeTest.php +++ b/test/phpunit/CommandeTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/CommonClassTest.class.php b/test/phpunit/CommonClassTest.class.php index f11a7392cbc..d083e842758 100644 --- a/test/phpunit/CommonClassTest.class.php +++ b/test/phpunit/CommonClassTest.class.php @@ -41,7 +41,7 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/CommonInvoiceTest.php b/test/phpunit/CommonInvoiceTest.php index 554e1e6d34b..6c8de7d4972 100644 --- a/test/phpunit/CommonInvoiceTest.php +++ b/test/phpunit/CommonInvoiceTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/CommonObjectTest.php b/test/phpunit/CommonObjectTest.php index e07119a8d93..49f63efddc7 100644 --- a/test/phpunit/CommonObjectTest.php +++ b/test/phpunit/CommonObjectTest.php @@ -36,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/CompanyBankAccountTest.php b/test/phpunit/CompanyBankAccountTest.php index 85d74b6c631..a324131c8b5 100644 --- a/test/phpunit/CompanyBankAccountTest.php +++ b/test/phpunit/CompanyBankAccountTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/CompanyLibTest.php b/test/phpunit/CompanyLibTest.php index e4a52541d60..4e35a218f2b 100644 --- a/test/phpunit/CompanyLibTest.php +++ b/test/phpunit/CompanyLibTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/ContactTest.php b/test/phpunit/ContactTest.php index d7c6a889714..e4e604b442d 100644 --- a/test/phpunit/ContactTest.php +++ b/test/phpunit/ContactTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -41,7 +42,7 @@ if ($langs->defaultlang != 'en_US') { if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/ContratTest.php b/test/phpunit/ContratTest.php index 3d960bac884..9e751f0f26c 100644 --- a/test/phpunit/ContratTest.php +++ b/test/phpunit/ContratTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/DateLibTest.php b/test/phpunit/DateLibTest.php index 633f6c5c7bf..7a23ca6a2a5 100644 --- a/test/phpunit/DateLibTest.php +++ b/test/phpunit/DateLibTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/DateLibTzFranceTest.php b/test/phpunit/DateLibTzFranceTest.php index 4c4dc124194..1b86828e5f7 100644 --- a/test/phpunit/DateLibTzFranceTest.php +++ b/test/phpunit/DateLibTzFranceTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/DiscountTest.php b/test/phpunit/DiscountTest.php index ab0d1747ac2..e7ed4908d8a 100644 --- a/test/phpunit/DiscountTest.php +++ b/test/phpunit/DiscountTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/DoliDBTest.php b/test/phpunit/DoliDBTest.php index 5cc4cd695fe..0093f7e500e 100644 --- a/test/phpunit/DoliDBTest.php +++ b/test/phpunit/DoliDBTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/EmailCollectorTest.php b/test/phpunit/EmailCollectorTest.php index 2700bd07b7a..233f636cae2 100644 --- a/test/phpunit/EmailCollectorTest.php +++ b/test/phpunit/EmailCollectorTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/EntrepotTest.php b/test/phpunit/EntrepotTest.php index b0b38034081..0a913314867 100644 --- a/test/phpunit/EntrepotTest.php +++ b/test/phpunit/EntrepotTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/EvalMathTest.php b/test/phpunit/EvalMathTest.php index eac55992058..70d913cdc3f 100644 --- a/test/phpunit/EvalMathTest.php +++ b/test/phpunit/EvalMathTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010 Laurent Destailleur * Copyright (C) 2022 Quatadah Nasdami * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -33,7 +34,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/ExampleTest.php b/test/phpunit/ExampleTest.php index b63ef7024b1..9d115e93ec2 100644 --- a/test/phpunit/ExampleTest.php +++ b/test/phpunit/ExampleTest.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Frédéric 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 @@ -60,7 +61,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/ExpeditionTest.php b/test/phpunit/ExpeditionTest.php index 9a779709636..e0f6a2199ab 100644 --- a/test/phpunit/ExpeditionTest.php +++ b/test/phpunit/ExpeditionTest.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ $langs->load("dict"); if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/ExpenseReportTest.php b/test/phpunit/ExpenseReportTest.php index afd2644568f..d2a2ab031f2 100644 --- a/test/phpunit/ExpenseReportTest.php +++ b/test/phpunit/ExpenseReportTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/FactureFournisseurTest.php b/test/phpunit/FactureFournisseurTest.php index 56c24bb217b..53e8f7def7e 100644 --- a/test/phpunit/FactureFournisseurTest.php +++ b/test/phpunit/FactureFournisseurTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010 Laurent Destailleur * Copyright (C) 2017 Juanjo Menent * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/FactureRecTest.php b/test/phpunit/FactureRecTest.php index 801a6656131..e55c2338107 100644 --- a/test/phpunit/FactureRecTest.php +++ b/test/phpunit/FactureRecTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2013 Laurent Destailleur * Copyright (C) 2023 Alexandre Janniaux * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric 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 @@ -36,7 +37,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/FactureTestRounding.php b/test/phpunit/FactureTestRounding.php index 006faf1c306..e1233eb8e91 100644 --- a/test/phpunit/FactureTestRounding.php +++ b/test/phpunit/FactureTestRounding.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Frédéric 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 @@ -33,7 +34,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/FichinterTest.php b/test/phpunit/FichinterTest.php index 4f3832ae55b..ad4879eb335 100644 --- a/test/phpunit/FichinterTest.php +++ b/test/phpunit/FichinterTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/FilesLibMoveDirTest.php b/test/phpunit/FilesLibMoveDirTest.php index 2324cd868d8..10e7e6436b3 100644 --- a/test/phpunit/FilesLibMoveDirTest.php +++ b/test/phpunit/FilesLibMoveDirTest.php @@ -3,6 +3,7 @@ * Copyright (C) 2012 Regis Houssin * Copyright (C) 2023 Alexandre Janniaux * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric 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 @@ -36,7 +37,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/FilesLibTest.php b/test/phpunit/FilesLibTest.php index 32616542c2a..1fe6809e0b2 100644 --- a/test/phpunit/FilesLibTest.php +++ b/test/phpunit/FilesLibTest.php @@ -3,6 +3,7 @@ * Copyright (C) 2012 Regis Houssin * Copyright (C) 2023 Alexandre Janniaux * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric 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 @@ -36,7 +37,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/FormAdminTest.php b/test/phpunit/FormAdminTest.php index 3a0adc03cf5..e1f56ea2ea0 100644 --- a/test/phpunit/FormAdminTest.php +++ b/test/phpunit/FormAdminTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/FormTest.php b/test/phpunit/FormTest.php index 7d6388eebd3..ae67bd4453d 100644 --- a/test/phpunit/FormTest.php +++ b/test/phpunit/FormTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/GetUrlLibTest.php b/test/phpunit/GetUrlLibTest.php index 85d3d81bfc2..36bd26317ce 100644 --- a/test/phpunit/GetUrlLibTest.php +++ b/test/phpunit/GetUrlLibTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010-2012 Laurent Destailleur * Copyright (C) 2012 Regis Houssin * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/HolidayTest.php b/test/phpunit/HolidayTest.php index c68dec16872..697a974d97c 100644 --- a/test/phpunit/HolidayTest.php +++ b/test/phpunit/HolidayTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -36,7 +37,7 @@ $langs->load("dict"); if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/ImagesLibTest.php b/test/phpunit/ImagesLibTest.php index 37b6485429d..0639a16d5b5 100644 --- a/test/phpunit/ImagesLibTest.php +++ b/test/phpunit/ImagesLibTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010-2012 Laurent Destailleur * Copyright (C) 2012 Regis Houssin * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -36,7 +37,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/InventoryTest.php b/test/phpunit/InventoryTest.php index 57b416ee04b..5a0a2bd51c7 100644 --- a/test/phpunit/InventoryTest.php +++ b/test/phpunit/InventoryTest.php @@ -36,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/KnowledgeRecordTest.php b/test/phpunit/KnowledgeRecordTest.php index 544c0046d75..9361d6cc29d 100644 --- a/test/phpunit/KnowledgeRecordTest.php +++ b/test/phpunit/KnowledgeRecordTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2007-2017 Laurent Destailleur * Copyright (C) 2021 SuperAdmin * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ $langs->load("main"); if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/LangTest.php b/test/phpunit/LangTest.php index 26937db56c4..9276c9c0323 100644 --- a/test/phpunit/LangTest.php +++ b/test/phpunit/LangTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2013 Laurent Destailleur * Copyright (C) 2023 Alexandre Janniaux * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric 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 @@ -67,7 +68,7 @@ if (! defined("NOLOGIN")) { if (empty($user->id)) { print "Load permissions for admin user nb 1".PHP_EOL; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/LesscTest.php b/test/phpunit/LesscTest.php index ee1d11a8c45..671e1862c44 100644 --- a/test/phpunit/LesscTest.php +++ b/test/phpunit/LesscTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -66,7 +67,7 @@ if (! defined("NOLOGIN")) { if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/LoanTest.php b/test/phpunit/LoanTest.php index 11cb2c445d8..1fcfd6fb6b9 100644 --- a/test/phpunit/LoanTest.php +++ b/test/phpunit/LoanTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/MarginsLibTest.php b/test/phpunit/MarginsLibTest.php index 0e6eefd4fb8..0cd70859088 100644 --- a/test/phpunit/MarginsLibTest.php +++ b/test/phpunit/MarginsLibTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/ModulesTest.php b/test/phpunit/ModulesTest.php index 2745b875290..16e679a09c6 100644 --- a/test/phpunit/ModulesTest.php +++ b/test/phpunit/ModulesTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010 Laurent Destailleur * Copyright (C) 2023 Alexandre Janniaux * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/MouvementStockTest.php b/test/phpunit/MouvementStockTest.php index 1af893cd864..6e61b203ce8 100644 --- a/test/phpunit/MouvementStockTest.php +++ b/test/phpunit/MouvementStockTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -36,7 +37,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/NumberingModulesTest.php b/test/phpunit/NumberingModulesTest.php index be47e462bdd..898f9f969df 100644 --- a/test/phpunit/NumberingModulesTest.php +++ b/test/phpunit/NumberingModulesTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -33,7 +34,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/ODFTest.php b/test/phpunit/ODFTest.php index e2043d8975e..8ddae208e19 100644 --- a/test/phpunit/ODFTest.php +++ b/test/phpunit/ODFTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2007-2017 Laurent Destailleur * Copyright (C) 2023 - Thomas Negre - contact@open-dsi.fr * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -33,7 +34,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/PaypalTest.php b/test/phpunit/PaypalTest.php index 1883eb226b6..b2ae97c8e04 100644 --- a/test/phpunit/PaypalTest.php +++ b/test/phpunit/PaypalTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/PdfDocTest.php b/test/phpunit/PdfDocTest.php index b8f62f05540..5d49bfccf48 100644 --- a/test/phpunit/PdfDocTest.php +++ b/test/phpunit/PdfDocTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -38,7 +39,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/PgsqlTest.php b/test/phpunit/PgsqlTest.php index 709d271b752..74a222653fe 100644 --- a/test/phpunit/PgsqlTest.php +++ b/test/phpunit/PgsqlTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -36,7 +37,7 @@ $langs->load("dict"); if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/PricesTest.php b/test/phpunit/PricesTest.php index 306d867eb9b..eee464a57f4 100644 --- a/test/phpunit/PricesTest.php +++ b/test/phpunit/PricesTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010 Laurent Destailleur * Copyright (C) 2015 Juanjo Menent * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -36,7 +37,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/ProductTest.php b/test/phpunit/ProductTest.php index b760df7416c..bd8ac3ab43d 100644 --- a/test/phpunit/ProductTest.php +++ b/test/phpunit/ProductTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/ProjectTest.php b/test/phpunit/ProjectTest.php index 152bc0361db..f8b133ef1f9 100644 --- a/test/phpunit/ProjectTest.php +++ b/test/phpunit/ProjectTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/PropalTest.php b/test/phpunit/PropalTest.php index ea50989539c..ae388aeecd3 100644 --- a/test/phpunit/PropalTest.php +++ b/test/phpunit/PropalTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/ReceptionTest.php b/test/phpunit/ReceptionTest.php index 562164f30cd..971cd06876b 100644 --- a/test/phpunit/ReceptionTest.php +++ b/test/phpunit/ReceptionTest.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ $langs->load("dict"); if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/RepositoryTest.php b/test/phpunit/RepositoryTest.php index c785cab2d02..dd66383e8f4 100644 --- a/test/phpunit/RepositoryTest.php +++ b/test/phpunit/RepositoryTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -65,7 +66,7 @@ if (! defined("NOLOGIN")) { if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/ScriptsTest.php b/test/phpunit/ScriptsTest.php index 048189b0bd0..ffbb6ccd843 100644 --- a/test/phpunit/ScriptsTest.php +++ b/test/phpunit/ScriptsTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -66,7 +67,7 @@ if (! defined("NOLOGIN")) { if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/SecurityGETPOSTTest.php b/test/phpunit/SecurityGETPOSTTest.php index 651a263f257..ca7797397f0 100644 --- a/test/phpunit/SecurityGETPOSTTest.php +++ b/test/phpunit/SecurityGETPOSTTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -58,7 +59,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index e4f3aac3c51..294d1596fec 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -61,7 +62,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/SocieteTest.php b/test/phpunit/SocieteTest.php index ec05bc365a0..eecefc38f23 100644 --- a/test/phpunit/SocieteTest.php +++ b/test/phpunit/SocieteTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -36,7 +37,7 @@ $langs->load("dict"); if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/StripeTest.php b/test/phpunit/StripeTest.php index 84f86f99cec..9517eef4e91 100644 --- a/test/phpunit/StripeTest.php +++ b/test/phpunit/StripeTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/SupplierProposalTest.php b/test/phpunit/SupplierProposalTest.php index aa7319fe482..437857d8381 100644 --- a/test/phpunit/SupplierProposalTest.php +++ b/test/phpunit/SupplierProposalTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -37,7 +38,7 @@ if (empty($user->id)) { //$user->addrights(0, 'supplier_proposal'); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/TargetTest.php b/test/phpunit/TargetTest.php index 7f812150292..46631857a60 100644 --- a/test/phpunit/TargetTest.php +++ b/test/phpunit/TargetTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2007-2017 Laurent Destailleur * Copyright (C) 2022 Alice Adminson * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/TicketTest.php b/test/phpunit/TicketTest.php index 09582ab23ae..feeae56e90b 100644 --- a/test/phpunit/TicketTest.php +++ b/test/phpunit/TicketTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/UserGroupTest.php b/test/phpunit/UserGroupTest.php index d637009ffb3..4428941bab4 100644 --- a/test/phpunit/UserGroupTest.php +++ b/test/phpunit/UserGroupTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/UserTest.php b/test/phpunit/UserTest.php index d5328982f3a..ee4704a415f 100644 --- a/test/phpunit/UserTest.php +++ b/test/phpunit/UserTest.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010-2015 Laurent Destailleur * Copyright (C) 2023 Alexandre Janniaux * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/UtilsTest.php b/test/phpunit/UtilsTest.php index 354a325b8cc..d71cc77b7c5 100644 --- a/test/phpunit/UtilsTest.php +++ b/test/phpunit/UtilsTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/WebservicesInvoicesTest.php b/test/phpunit/WebservicesInvoicesTest.php index a11a7a43569..74f219b8589 100644 --- a/test/phpunit/WebservicesInvoicesTest.php +++ b/test/phpunit/WebservicesInvoicesTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/WebservicesOrdersTest.php b/test/phpunit/WebservicesOrdersTest.php index 2a669eef91a..1cf47ef7679 100644 --- a/test/phpunit/WebservicesOrdersTest.php +++ b/test/phpunit/WebservicesOrdersTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/WebservicesOtherTest.php b/test/phpunit/WebservicesOtherTest.php index 798134796e8..8eea893f93c 100644 --- a/test/phpunit/WebservicesOtherTest.php +++ b/test/phpunit/WebservicesOtherTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/WebservicesProductsTest.php b/test/phpunit/WebservicesProductsTest.php index 25e350d4a86..84065080447 100644 --- a/test/phpunit/WebservicesProductsTest.php +++ b/test/phpunit/WebservicesProductsTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -37,7 +38,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/WebservicesThirdpartyTest.php b/test/phpunit/WebservicesThirdpartyTest.php index 4df603a910d..31e0289a0f5 100644 --- a/test/phpunit/WebservicesThirdpartyTest.php +++ b/test/phpunit/WebservicesThirdpartyTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/WebservicesUserTest.php b/test/phpunit/WebservicesUserTest.php index c033b408c59..e954d79ec05 100644 --- a/test/phpunit/WebservicesUserTest.php +++ b/test/phpunit/WebservicesUserTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -35,7 +36,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/test/phpunit/WebsiteTest.php b/test/phpunit/WebsiteTest.php index b4612f11e46..6ccccb17b23 100644 --- a/test/phpunit/WebsiteTest.php +++ b/test/phpunit/WebsiteTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -63,7 +64,7 @@ require_once dirname(__FILE__).'/../../htdocs/website/class/website.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); if (empty($user->rights->website)) { $user->rights->website = new stdClass(); diff --git a/test/phpunit/XCalLibTest.php b/test/phpunit/XCalLibTest.php index e8911b3c37a..6aa9f2b55f7 100644 --- a/test/phpunit/XCalLibTest.php +++ b/test/phpunit/XCalLibTest.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric 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 @@ -34,7 +35,7 @@ require_once dirname(__FILE__).'/CommonClassTest.class.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1;