QUAL: Endpoint for API /partnershipapi has been renamed into

/partnerships to follow conventions
This commit is contained in:
Laurent Destailleur
2023-10-31 13:31:02 +01:00
parent ecd4c7bbc7
commit ca145ef912
5 changed files with 15 additions and 5 deletions

View File

@@ -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 *****

View File

@@ -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) {

View File

@@ -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);
}

View File

@@ -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',

View File

@@ -1,6 +1,5 @@
<?php
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2022 Alice Adminson <aadminson@example.com>
*
* 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}