diff --git a/ChangeLog b/ChangeLog index ea9f91b93c6..9c7db6d51a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,7 @@ Following changes may create regressions for some external modules, but were nec an invoice from a shipment is validated (and if your process is to make invoice on shipment and not on order), because this setup has changed. * It was possible to use a variable $soc or $right inside a php code condition of some extrafields properties, this is no more true (this 2 variables are no more global variables). * New hook files of modules actions_mymodule.class.php should "extends CommonHookActions" +* Endpoint for API /partnershipapi has been renamed into /partnerships to follow conventions ***** ChangeLog for 18.0.2 compared to 18.0.1 ***** diff --git a/htdocs/api/index.php b/htdocs/api/index.php index a140bb23057..d449e16339a 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -363,7 +363,7 @@ if (!empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' && } } - dol_syslog('Search api file /'.$moduledirforclass.'/class/api_'.$classfile.'.class.php => dir_part_file='.$dir_part_file.' classname='.$classname); + dol_syslog('Search api file /'.$moduledirforclass.'/class/api_'.$classfile.'.class.php => dir_part_file='.$dir_part_file.', classname='.$classname); $res = false; if ($dir_part_file) { diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index ab7ed7aa526..b7ceac840a5 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -2661,7 +2661,7 @@ function getModuleDirForApiClass($moduleobject) $moduledirforclass = 'mrp'; } elseif ($moduleobject == 'accounting') { $moduledirforclass = 'accountancy'; - } elseif (in_array($moduleobject, array('products', 'expensereports', 'users', 'tickets', 'boms', 'receptions'))) { + } elseif (in_array($moduleobject, array('products', 'expensereports', 'users', 'tickets', 'boms', 'receptions', 'partnerships'))) { $moduledirforclass = preg_replace('/s$/', '', $moduleobject); } diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 8ab7357031b..d8b9b862298 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -499,6 +499,15 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { migrate_contractdet_rank(); } + + // Scripts for 19.0 + /* + $afterversionarray = explode('.', '18.0.9'); + $beforeversionarray = explode('.', '19.0.9'); + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { + migrate_contractdet_rank(); + } + */ } @@ -4149,6 +4158,7 @@ function migrate_delete_old_files($db, $langs, $conf) '/compta/facture/class/api_invoice.class.php', '/commande/class/api_commande.class.php', '/user/class/api_user.class.php', + '/partnership/class/api_partnership.class.php', '/product/class/api_product.class.php', '/societe/class/api_contact.class.php', '/societe/class/api_thirdparty.class.php', diff --git a/htdocs/partnership/class/api_partnership.class.php b/htdocs/partnership/class/api_partnerships.class.php similarity index 98% rename from htdocs/partnership/class/api_partnership.class.php rename to htdocs/partnership/class/api_partnerships.class.php index 515c43d62cd..dd6fffe37c4 100644 --- a/htdocs/partnership/class/api_partnership.class.php +++ b/htdocs/partnership/class/api_partnerships.class.php @@ -1,6 +1,5 @@ - * Copyright (C) 2022 Alice Adminson * * 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 @@ -23,7 +22,7 @@ dol_include_once('/partnership/class/partnership.class.php'); /** - * \file partnership/class/api_partnership.class.php + * \file partnership/class/api_partnerships.class.php * \ingroup partnership * \brief File for API management of partnership. */ @@ -34,7 +33,7 @@ dol_include_once('/partnership/class/partnership.class.php'); * @access protected * @class DolibarrApiAccess {@requires user,external} */ -class PartnershipApi extends DolibarrApi +class Partnerships extends DolibarrApi { /** * @var Partnership $partnership {@type Partnership}