Browse Source

Endpoint for API /partnershipapi and /recruitment has been renamed into
/partnerships and /recruitments to follow name conventions.

Laurent Destailleur 1 year ago
parent
commit
edaab57f2e

+ 1 - 1
ChangeLog

@@ -33,7 +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
+* Endpoint for API /partnershipapi and /recruitment has been renamed into /partnerships and /recruitments to follow name conventions.
 
 
 ***** ChangeLog for 18.0.2 compared to 18.0.1 *****

+ 1 - 1
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', 'partnerships'))) {
+	} elseif (in_array($moduleobject, array('products', 'expensereports', 'users', 'tickets', 'boms', 'receptions', 'partnerships', 'recruitments'))) {
 		$moduledirforclass = preg_replace('/s$/', '', $moduleobject);
 	}
 

+ 1 - 0
htdocs/install/upgrade2.php

@@ -4160,6 +4160,7 @@ function migrate_delete_old_files($db, $langs, $conf)
 		'/user/class/api_user.class.php',
 		'/partnership/class/api_partnership.class.php',
 		'/product/class/api_product.class.php',
+		'/recruitment/class/api_recruitment.class.php',
 		'/societe/class/api_contact.class.php',
 		'/societe/class/api_thirdparty.class.php',
 		'/support/online.php',

+ 1 - 1
htdocs/recruitment/class/api_recruitment.class.php → htdocs/recruitment/class/api_recruitments.class.php

@@ -34,7 +34,7 @@ dol_include_once('/recruitment/class/recruitmentcandidature.class.php');
  * @access protected
  * @class  DolibarrApiAccess {@requires user,external}
  */
-class Recruitment extends DolibarrApi
+class Recruitments extends DolibarrApi
 {
 	/**
 	 * @var RecruitmentJobPosition $jobposition {@type RecruitmentJobPosition}