diff --git a/ChangeLog b/ChangeLog index c931f9ea865..efc1be2c344 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,7 @@ Following changes may create regressions for some external modules, but were nec * Deprecated function img_phone as been removed. You can use img_picto(..., 'call|call_out') instead.; * Files for variables of themes were renamed from graph-color.php into theme_vars.inc.php to match naming convention of extension .inc.php for files to be included. +* All methods set_draft() were renamed into setDraft(). ***** ChangeLog for 9.0.1 compared to 9.0.0 ***** diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 72984c33504..039c41309c9 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -595,7 +595,6 @@ class BOM extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Set draft status * @@ -604,7 +603,6 @@ class BOM extends CommonObject */ public function setDraft($user) { - //phpcs:enable global $conf,$langs; $error=0; diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 44c05629744..9a296def86b 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -790,7 +790,7 @@ if (empty($reshook)) // Go back to draft if ($action == 'modif' && $usercancreate) { - $object->set_draft($user); + $object->setDraft($user); if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php index 9145b8eb151..30a8e03cbd3 100644 --- a/htdocs/comm/propal/class/api_proposals.class.php +++ b/htdocs/comm/propal/class/api_proposals.class.php @@ -593,7 +593,7 @@ class Proposals extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $result = $this->propal->set_draft(DolibarrApiAccess::$user); + $result = $this->propal->setDraftDolibarrApiAccess::$user); if ($result == 0) { throw new RestException(304, 'Nothing done. May be object is already draft'); } diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index e0ad01a453b..fd9187afb9c 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2605,7 +2605,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function set_draft($user, $notrigger = 0) + public function setDraft($user, $notrigger = 0) { // phpcs:enable $error=0; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 65dba5049f4..f85870bd6f1 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1219,7 +1219,7 @@ if (empty($reshook)) } if (! $error) { - $result = $object->set_draft($user, $idwarehouse); + $result = $object->setDraft($user, $idwarehouse); if ($result >= 0) { // Define output language diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index ca7823a6ac1..777236bc4d8 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -770,7 +770,7 @@ class Orders extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $result = $this->commande->set_draft(DolibarrApiAccess::$user, $idwarehouse); + $result = $this->commande->setDraftDolibarrApiAccess::$user, $idwarehouse); if ($result == 0) { throw new RestException(304, 'Nothing done. May be object is already closed'); } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 7dc13b5a97e..a92bfe23eb8 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -479,7 +479,7 @@ class Commande extends CommonOrder * @param int $idwarehouse Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on) * @return int <0 if KO, >0 if OK */ - public function set_draft($user, $idwarehouse = -1) + public function setDraft($user, $idwarehouse = -1) { //phpcs:enable global $conf,$langs; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index e3fea0200dc..ac34b6f3491 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -621,7 +621,7 @@ if (empty($reshook)) { if (! empty($conf->global->INVOICE_CAN_ALWAYS_BE_EDITED) || ($resteapayer == $object->total_ttc && empty($object->paye))) { - $result=$object->set_draft($user, $idwarehouse); + $result=$object->setDraft($user, $idwarehouse); if ($result<0) setEventMessages($object->error, $object->errors, 'errors'); // Define output language diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index d68c3d40338..cbaf2115c3e 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -745,7 +745,7 @@ class Invoices extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $result = $this->invoice->set_draft(DolibarrApiAccess::$user, $idwarehouse); + $result = $this->invoice->setDraftDolibarrApiAccess::$user, $idwarehouse); if ($result == 0) { throw new RestException(304, 'Nothing done.'); } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index a87cd25cdf6..6076cbb6232 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2537,7 +2537,7 @@ class Facture extends CommonInvoice * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, >0 if OK */ - public function set_draft($user, $idwarehouse = -1) + public function setDraft($user, $idwarehouse = -1) { // phpcs:enable global $conf,$langs; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 690acedb35d..aa914b54894 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1458,7 +1458,7 @@ class FactureFournisseur extends CommonInvoice * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, >0 if OK */ - public function set_draft($user, $idwarehouse = -1) + public function setDraft($user, $idwarehouse = -1) { // phpcs:enable global $conf,$langs; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 71abab3a065..c2a5552f15e 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1446,7 +1446,7 @@ if (empty($reshook)) } } - $object->set_draft($user, $idwarehouse); + $object->setDraft($user, $idwarehouse); // Define output language if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index dfe1eb5e2e6..2c41e2af570 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -144,7 +144,7 @@ if (empty($reshook)) // Confirm back to draft status if ($action == 'modif' && $user->rights->reception->creer) { - $result = $object->set_draft($user); + $result = $object->setDraft($user); if ($result >= 0) { // Define output language diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 607d1cc25f3..29bd65f6ae0 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -1771,7 +1771,7 @@ class Reception extends CommonObject * @param User $user Object user that modify * @return int <0 if KO, >0 if OK */ - public function set_draft($user) + public function setDraft($user) { // phpcs:enable global $conf,$langs; diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index d5370a7361e..c119ba2d488 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -491,7 +491,7 @@ if (empty($reshook)) // Go back to draft if ($action == 'modif' && $user->rights->supplier_proposal->creer) { - $object->set_draft($user); + $object->setDraft($user); if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 24ce18bf676..3aba8afccc1 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -1878,7 +1878,7 @@ class SupplierProposal extends CommonObject * @param User $user Object user that modify * @return int <0 if KO, >0 if OK */ - public function set_draft($user) + public function setDraft($user) { // phpcs:enable global $conf,$langs; diff --git a/htdocs/webservices/server_invoice.php b/htdocs/webservices/server_invoice.php index a0d96e8b008..60c93c488e7 100644 --- a/htdocs/webservices/server_invoice.php +++ b/htdocs/webservices/server_invoice.php @@ -777,7 +777,7 @@ dol_syslog("Function: updateInvoice login=".$authentication['login']." id=".$inv { if ($invoice['status'] == Facture::STATUS_DRAFT) { - $result = $object->set_draft($fuser); + $result = $object->setDraft($fuser); } if ($invoice['status'] == Facture::STATUS_VALIDATED) {