From 9067c6deec4ac01e7e0da3811577b554e032f89f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 14 Nov 2024 00:16:43 +0100 Subject: [PATCH] replace deprecated (#31803) * replace deprecated * replace deprecated --- dev/examples/code/create_invoice.php | 3 ++- dev/examples/code/create_order.php | 3 ++- dev/examples/code/create_product.php | 3 ++- dev/examples/code/create_user.php | 3 ++- dev/examples/code/get_contracts.php | 3 ++- dev/initdata/generate-invoice.php | 3 ++- dev/initdata/generate-order.php | 3 ++- dev/initdata/generate-product.php | 3 ++- dev/initdata/generate-proposal.php | 3 ++- dev/initdata/generate-thirdparty.php | 3 ++- dev/initdata/import-products.php | 3 ++- dev/initdata/import-thirdparties.php | 3 ++- dev/initdata/import-users.php | 2 +- dev/initdata/purge-data.php | 2 +- scripts/cron/cron_run_jobs.php | 4 ++-- test/phpunit/AbstractRestAPITest.php | 3 ++- test/phpunit/AccountingAccountTest.php | 3 ++- test/phpunit/ActionCommTest.php | 3 ++- test/phpunit/AdherentTest.php | 3 ++- test/phpunit/AdminLibTest.php | 3 ++- test/phpunit/AllTests.php | 3 ++- test/phpunit/AssetModelTest.php | 3 ++- test/phpunit/BOMTest.php | 3 ++- test/phpunit/BankAccountTest.php | 3 ++- test/phpunit/BarcodeTest.php | 3 ++- test/phpunit/BonPrelevementTest.php | 3 ++- test/phpunit/BuildDocTest.php | 3 ++- test/phpunit/CMailFileTest.php | 3 ++- test/phpunit/CategorieTest.php | 3 ++- test/phpunit/ChargeSocialesTest.php | 3 ++- test/phpunit/CodingPhpTest.php | 3 ++- test/phpunit/CodingSqlTest.php | 3 ++- test/phpunit/CommandeFournisseurTest.php | 3 ++- test/phpunit/CommandeTest.php | 3 ++- test/phpunit/CommonClassTest.class.php | 2 +- test/phpunit/CommonInvoiceTest.php | 3 ++- test/phpunit/CommonObjectTest.php | 2 +- test/phpunit/CompanyBankAccountTest.php | 3 ++- test/phpunit/CompanyLibTest.php | 3 ++- test/phpunit/ContactTest.php | 3 ++- test/phpunit/ContratTest.php | 3 ++- test/phpunit/DateLibTest.php | 3 ++- test/phpunit/DateLibTzFranceTest.php | 3 ++- test/phpunit/DiscountTest.php | 3 ++- test/phpunit/DoliDBTest.php | 3 ++- test/phpunit/EmailCollectorTest.php | 3 ++- test/phpunit/EntrepotTest.php | 3 ++- test/phpunit/EvalMathTest.php | 3 ++- test/phpunit/ExampleTest.php | 3 ++- test/phpunit/ExpeditionTest.php | 3 ++- test/phpunit/ExpenseReportTest.php | 3 ++- test/phpunit/FactureFournisseurTest.php | 3 ++- test/phpunit/FactureRecTest.php | 3 ++- test/phpunit/FactureTestRounding.php | 3 ++- test/phpunit/FichinterTest.php | 3 ++- test/phpunit/FilesLibMoveDirTest.php | 3 ++- test/phpunit/FilesLibTest.php | 3 ++- test/phpunit/FormAdminTest.php | 3 ++- test/phpunit/FormTest.php | 3 ++- test/phpunit/GetUrlLibTest.php | 3 ++- test/phpunit/HolidayTest.php | 3 ++- test/phpunit/ImagesLibTest.php | 3 ++- test/phpunit/InventoryTest.php | 2 +- test/phpunit/KnowledgeRecordTest.php | 3 ++- test/phpunit/LangTest.php | 3 ++- test/phpunit/LesscTest.php | 3 ++- test/phpunit/LoanTest.php | 3 ++- test/phpunit/MarginsLibTest.php | 3 ++- test/phpunit/ModulesTest.php | 3 ++- test/phpunit/MouvementStockTest.php | 3 ++- test/phpunit/NumberingModulesTest.php | 3 ++- test/phpunit/ODFTest.php | 3 ++- test/phpunit/PaypalTest.php | 3 ++- test/phpunit/PdfDocTest.php | 3 ++- test/phpunit/PgsqlTest.php | 3 ++- test/phpunit/PricesTest.php | 3 ++- test/phpunit/ProductTest.php | 3 ++- test/phpunit/ProjectTest.php | 3 ++- test/phpunit/PropalTest.php | 3 ++- test/phpunit/ReceptionTest.php | 3 ++- test/phpunit/RepositoryTest.php | 3 ++- test/phpunit/ScriptsTest.php | 3 ++- test/phpunit/SecurityGETPOSTTest.php | 3 ++- test/phpunit/SecurityTest.php | 3 ++- test/phpunit/SocieteTest.php | 3 ++- test/phpunit/StripeTest.php | 3 ++- test/phpunit/SupplierProposalTest.php | 3 ++- test/phpunit/TargetTest.php | 3 ++- test/phpunit/TicketTest.php | 3 ++- test/phpunit/UserGroupTest.php | 3 ++- test/phpunit/UserTest.php | 3 ++- test/phpunit/UtilsTest.php | 3 ++- test/phpunit/WebservicesInvoicesTest.php | 3 ++- test/phpunit/WebservicesOrdersTest.php | 3 ++- test/phpunit/WebservicesOtherTest.php | 3 ++- test/phpunit/WebservicesProductsTest.php | 3 ++- test/phpunit/WebservicesThirdpartyTest.php | 3 ++- test/phpunit/WebservicesUserTest.php | 3 ++- test/phpunit/WebsiteTest.php | 3 ++- test/phpunit/XCalLibTest.php | 3 ++- 100 files changed, 195 insertions(+), 101 deletions(-) diff --git a/dev/examples/code/create_invoice.php b/dev/examples/code/create_invoice.php index cdb23e11f6973..fc1af34ddd91a 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 @@ 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 3b4e88d5646c4..7ab059cc931f3 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 @@ 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 2ceaa5d74e653..9d4132d40d309 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 @@ 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 91644c3fd45fc..33732f8562eb1 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 @@ 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 853a059d9953d..52deedc3ff272 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 @@ 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 802adf92aa68c..3f4a701b0c4c0 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 @@ 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 68aab032686a3..fc110907ce527 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 @@ 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 20f83932e6428..0a41c0df8fe54 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 @@ 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 3c357949e2805..59298a44e6959 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 @@ 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 4bdcad752ef3d..0aba3de6a4c12 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 @@ 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 18bc761149154..7a61cd1cf1644 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 @@ 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 4157cee86869d..d6b7f1d3183e3 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 @@ 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 eb4625c96b158..fd0767ca31d06 100755 --- a/dev/initdata/import-users.php +++ b/dev/initdata/import-users.php @@ -84,7 +84,7 @@ 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 9bc83dec40032..32e68b81100bf 100755 --- a/dev/initdata/purge-data.php +++ b/dev/initdata/purge-data.php @@ -231,7 +231,7 @@ 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 49da9149aff6b..d225ad27af8ca 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -167,7 +167,7 @@ // 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 @@ exit(1); } } - $user->getrights(); + $user->loadRights(); } // Reload langs diff --git a/test/phpunit/AbstractRestAPITest.php b/test/phpunit/AbstractRestAPITest.php index fa1cb86728378..bacdaa1e81202 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 @@ 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 5ed9dd3615116..053fe345558f2 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 @@ 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 1d77158ac1c2b..35b616bc2c4b0 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 @@ 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 f98200cb0447c..c8ff2ff1a8a22 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 @@ 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 d50de588de9cc..a65234cecf088 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 @@ 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 794bdfe30a0f9..7a2c903b14bdb 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 (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 d0d86e149c8f5..322577f656545 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 @@ 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 2cb661f6ab336..9c54dd5dc6307 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 @@ 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 8619231145958..bf0575afa7fcb 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 @@ 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 d6bd7fc0e7cbd..801a87354dc18 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 @@ 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 1584c176a0d6e..42cf9daabab6c 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 @@ 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 25eef494d2e88..ba73a20da9b10 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 @@ 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 1898a9fba3429..a09d3ea62a89f 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 @@ 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 cef67a66b70f9..923ce87ffdbe4 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 @@ 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 6ec273f5c342a..532449f1b648d 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 @@ 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 4fa7d09631fd1..af861b03c3b39 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 (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 ecdae47f807ac..eb421bce9e2e3 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 (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 67bf797b8c2cb..96460ee86a927 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 @@ 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 3793df8d3ff39..08dd399636aa6 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 @@ 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 f11a7392cbcdf..d083e84275842 100644 --- a/test/phpunit/CommonClassTest.class.php +++ b/test/phpunit/CommonClassTest.class.php @@ -41,7 +41,7 @@ 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 554e1e6d34bd6..6c8de7d497237 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 @@ 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 e07119a8d9310..49f63efddc7bb 100644 --- a/test/phpunit/CommonObjectTest.php +++ b/test/phpunit/CommonObjectTest.php @@ -36,7 +36,7 @@ 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 85d74b6c631af..a324131c8b570 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 @@ 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 e4a52541d6087..4e35a218f2be5 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 @@ 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 d7c6a8897140d..e4e604b442d7c 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 (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 3d960bac88449..9e751f0f26c91 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 @@ 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 633f6c5c7bf5b..7a23ca6a2a53f 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 @@ 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 4c4dc1241943d..1b86828e5f795 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 @@ 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 ab0d1747ac2ba..e7ed4908d8aef 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 @@ 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 5cc4cd695fe81..0093f7e500eb7 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 @@ 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 2700bd07b7ace..233f636cae253 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 @@ 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 b0b3803408166..0a9133148675c 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 @@ 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 eac5599205865..70d913cdc3f28 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 @@ 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 b63ef7024b109..9d115e93ec237 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 @@ 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 9a77970963658..e0f6a2199ab2a 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 @@ 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 afd2644568f87..d2a2ab031f2fa 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 @@ 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 56c24bb217b91..53e8f7def7e85 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 @@ 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 801a6656131bd..e55c233810762 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 @@ 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 006faf1c3060d..e1233eb8e91cd 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 @@ 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 4f3832ae55be2..ad4879eb33533 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 @@ 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 2324cd868d898..10e7e6436b30a 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 @@ 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 32616542c2abe..1fe6809e0b2e7 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 @@ 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 3a0adc03cf518..e1f56ea2ea0c1 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 @@ 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 7d6388eebd3f0..ae67bd4453d08 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 @@ 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 85d3d81bfc2f1..36bd26317cefb 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 @@ 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 c68dec168727f..697a974d97c07 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 @@ 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 37b6485429d8f..0639a16d5b5c2 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 @@ 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 57b416ee04be0..5a0a2bd51c7b3 100644 --- a/test/phpunit/InventoryTest.php +++ b/test/phpunit/InventoryTest.php @@ -36,7 +36,7 @@ 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 544c0046d75bb..9361d6cc29d50 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 @@ 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 26937db56c4b4..9276c9c03238b 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 (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 ee1d11a8c45c6..671e1862c4495 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 (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 11cb2c445d8bb..1fcfd6fb6b966 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 @@ 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 0e6eefd4fb819..0cd708590884b 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 @@ 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 2745b87529028..16e679a09c617 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 @@ 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 1af893cd864e4..6e61b203ce86c 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 @@ 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 be47e462bddd1..898f9f969dfbf 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 @@ 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 e2043d8975e60..8ddae208e1981 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 @@ 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 1883eb226b68c..b2ae97c8e0497 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 @@ 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 b8f62f0554027..5d49bfccf486a 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 @@ 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 709d271b752c1..74a222653fecc 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 @@ 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 306d867eb9beb..eee464a57f456 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 @@ 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 b760df7416cef..bd8ac3ab43dd4 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 @@ 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 152bc0361db38..f8b133ef1f941 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 @@ 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 ea50989539c78..ae388aeecd349 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 @@ 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 562164f30cd12..971cd06876b01 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 @@ 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 c785cab2d021e..dd66383e8f482 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 (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 048189b0bd071..ffbb6ccd84316 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 (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 651a263f257cb..ca7797397f0dc 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 @@ 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 e4f3aac3c5161..294d1596fec84 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 @@ 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 ec05bc365a059..eecefc38f23d4 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 @@ 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 84f86f99cec8a..9517eef4e9191 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 @@ 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 aa7319fe4822a..437857d8381b1 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 @@ //$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 7f81215029275..46631857a6055 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 @@ 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 09582ab23ae69..feeae56e90bfc 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 @@ 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 d637009ffb3ab..4428941bab4eb 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 @@ 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 d5328982f3ada..ee4704a415f8c 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 @@ 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 354a325b8cc0a..d71cc77b7c5ff 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 @@ 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 a11a7a43569a0..74f219b85896d 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 @@ 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 2a669eef91afe..1cf47ef7679f0 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 @@ 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 798134796e8e5..8eea893f93c4d 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 @@ 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 25e350d4a8613..8406508044725 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 @@ 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 4df603a910d8a..31e0289a0f5ce 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 @@ 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 c033b408c5990..e954d79ec0545 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 @@ 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 b4612f11e46c8..6ccccb17b23cd 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 @@ 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 e8911b3c37a58..6aa9f2b55f732 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 @@ 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;