All methods set_draft() were renamed into setDraft()

This commit is contained in:
Laurent Destailleur 2019-03-15 19:01:40 +01:00
parent 6ecd37ea8f
commit c0b6699b25
18 changed files with 17 additions and 18 deletions

View File

@ -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.; * 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 * 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. 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 ***** ***** ChangeLog for 9.0.1 compared to 9.0.0 *****

View File

@ -595,7 +595,6 @@ class BOM extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Set draft status * Set draft status
* *
@ -604,7 +603,6 @@ class BOM extends CommonObject
*/ */
public function setDraft($user) public function setDraft($user)
{ {
//phpcs:enable
global $conf,$langs; global $conf,$langs;
$error=0; $error=0;

View File

@ -790,7 +790,7 @@ if (empty($reshook))
// Go back to draft // Go back to draft
if ($action == 'modif' && $usercancreate) if ($action == 'modif' && $usercancreate)
{ {
$object->set_draft($user); $object->setDraft($user);
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
{ {

View File

@ -593,7 +593,7 @@ class Proposals extends DolibarrApi
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); 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) { if ($result == 0) {
throw new RestException(304, 'Nothing done. May be object is already draft'); throw new RestException(304, 'Nothing done. May be object is already draft');
} }

View File

@ -2605,7 +2605,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function set_draft($user, $notrigger = 0) public function setDraft($user, $notrigger = 0)
{ {
// phpcs:enable // phpcs:enable
$error=0; $error=0;

View File

@ -1219,7 +1219,7 @@ if (empty($reshook))
} }
if (! $error) { if (! $error) {
$result = $object->set_draft($user, $idwarehouse); $result = $object->setDraft($user, $idwarehouse);
if ($result >= 0) if ($result >= 0)
{ {
// Define output language // Define output language

View File

@ -770,7 +770,7 @@ class Orders extends DolibarrApi
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); 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) { if ($result == 0) {
throw new RestException(304, 'Nothing done. May be object is already closed'); throw new RestException(304, 'Nothing done. May be object is already closed');
} }

View File

@ -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) * @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 * @return int <0 if KO, >0 if OK
*/ */
public function set_draft($user, $idwarehouse = -1) public function setDraft($user, $idwarehouse = -1)
{ {
//phpcs:enable //phpcs:enable
global $conf,$langs; global $conf,$langs;

View File

@ -621,7 +621,7 @@ if (empty($reshook))
{ {
if (! empty($conf->global->INVOICE_CAN_ALWAYS_BE_EDITED) || ($resteapayer == $object->total_ttc && empty($object->paye))) 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'); if ($result<0) setEventMessages($object->error, $object->errors, 'errors');
// Define output language // Define output language

View File

@ -745,7 +745,7 @@ class Invoices extends DolibarrApi
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); 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) { if ($result == 0) {
throw new RestException(304, 'Nothing done.'); throw new RestException(304, 'Nothing done.');
} }

View File

@ -2537,7 +2537,7 @@ class Facture extends CommonInvoice
* @param int $idwarehouse Id warehouse to use for stock change. * @param int $idwarehouse Id warehouse to use for stock change.
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function set_draft($user, $idwarehouse = -1) public function setDraft($user, $idwarehouse = -1)
{ {
// phpcs:enable // phpcs:enable
global $conf,$langs; global $conf,$langs;

View File

@ -1458,7 +1458,7 @@ class FactureFournisseur extends CommonInvoice
* @param int $idwarehouse Id warehouse to use for stock change. * @param int $idwarehouse Id warehouse to use for stock change.
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function set_draft($user, $idwarehouse = -1) public function setDraft($user, $idwarehouse = -1)
{ {
// phpcs:enable // phpcs:enable
global $conf,$langs; global $conf,$langs;

View File

@ -1446,7 +1446,7 @@ if (empty($reshook))
} }
} }
$object->set_draft($user, $idwarehouse); $object->setDraft($user, $idwarehouse);
// Define output language // Define output language
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))

View File

@ -144,7 +144,7 @@ if (empty($reshook))
// Confirm back to draft status // Confirm back to draft status
if ($action == 'modif' && $user->rights->reception->creer) if ($action == 'modif' && $user->rights->reception->creer)
{ {
$result = $object->set_draft($user); $result = $object->setDraft($user);
if ($result >= 0) if ($result >= 0)
{ {
// Define output language // Define output language

View File

@ -1771,7 +1771,7 @@ class Reception extends CommonObject
* @param User $user Object user that modify * @param User $user Object user that modify
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function set_draft($user) public function setDraft($user)
{ {
// phpcs:enable // phpcs:enable
global $conf,$langs; global $conf,$langs;

View File

@ -491,7 +491,7 @@ if (empty($reshook))
// Go back to draft // Go back to draft
if ($action == 'modif' && $user->rights->supplier_proposal->creer) if ($action == 'modif' && $user->rights->supplier_proposal->creer)
{ {
$object->set_draft($user); $object->setDraft($user);
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
{ {

View File

@ -1878,7 +1878,7 @@ class SupplierProposal extends CommonObject
* @param User $user Object user that modify * @param User $user Object user that modify
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function set_draft($user) public function setDraft($user)
{ {
// phpcs:enable // phpcs:enable
global $conf,$langs; global $conf,$langs;

View File

@ -777,7 +777,7 @@ dol_syslog("Function: updateInvoice login=".$authentication['login']." id=".$inv
{ {
if ($invoice['status'] == Facture::STATUS_DRAFT) if ($invoice['status'] == Facture::STATUS_DRAFT)
{ {
$result = $object->set_draft($fuser); $result = $object->setDraft($fuser);
} }
if ($invoice['status'] == Facture::STATUS_VALIDATED) if ($invoice['status'] == Facture::STATUS_VALIDATED)
{ {