forked from Wavyzz/dolibarr
Clean code
This commit is contained in:
@@ -250,7 +250,7 @@ class Interventions extends DolibarrApi
|
||||
public function post($request_data = null)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->hasRight('ficheinter', 'creer')) {
|
||||
throw new RestException(403, "Insuffisant rights");
|
||||
throw new RestException(403, "Insufficiant rights");
|
||||
}
|
||||
// Check mandatory fields
|
||||
$result = $this->_validate($request_data);
|
||||
@@ -376,7 +376,7 @@ class Interventions extends DolibarrApi
|
||||
public function postLine($id, $request_data = null)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->hasRight('ficheinter', 'creer')) {
|
||||
throw new RestException(403, "Insuffisant rights");
|
||||
throw new RestException(403, "Insufficiant rights");
|
||||
}
|
||||
// Check mandatory fields
|
||||
$result = $this->_validateLine($request_data);
|
||||
@@ -468,7 +468,7 @@ class Interventions extends DolibarrApi
|
||||
public function reopen($id)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->hasRight('ficheinter', 'creer')) {
|
||||
throw new RestException(403, "Insuffisant rights");
|
||||
throw new RestException(403, "Insufficiant rights");
|
||||
}
|
||||
$result = $this->fichinter->fetch($id);
|
||||
if (!$result) {
|
||||
@@ -511,7 +511,7 @@ class Interventions extends DolibarrApi
|
||||
public function validate($id, $notrigger = 0)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->hasRight('ficheinter', 'creer')) {
|
||||
throw new RestException(403, "Insuffisant rights");
|
||||
throw new RestException(403, "Insufficiant rights");
|
||||
}
|
||||
$result = $this->fichinter->fetch($id);
|
||||
if (!$result) {
|
||||
@@ -551,7 +551,7 @@ class Interventions extends DolibarrApi
|
||||
public function closeFichinter($id)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->hasRight('ficheinter', 'creer')) {
|
||||
throw new RestException(403, "Insuffisant rights");
|
||||
throw new RestException(403, "Insufficiant rights");
|
||||
}
|
||||
$result = $this->fichinter->fetch($id);
|
||||
if (!$result) {
|
||||
|
||||
Reference in New Issue
Block a user