Fix phpcs
This commit is contained in:
parent
43ed48896a
commit
b7cf070d2d
@ -50,7 +50,7 @@ class DolibarrApiAccess implements iAuthenticate
|
||||
* @return bool
|
||||
* @throws RestException
|
||||
*/
|
||||
public function __isAllowed()
|
||||
public function _isAllowed()
|
||||
{
|
||||
global $db;
|
||||
|
||||
@ -113,7 +113,7 @@ class DolibarrApiAccess implements iAuthenticate
|
||||
* @example Digest
|
||||
* @example OAuth
|
||||
*/
|
||||
public function __getWWWAuthenticateString()
|
||||
public function _getWWWAuthenticateString()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
if (! defined("NOLOGIN")) define("NOLOGIN",'1');
|
||||
|
||||
$res=0;
|
||||
if (! $res && file_exists("../../main.inc.php")) $res=@include '../../main.inc.php';
|
||||
if (! $res && file_exists("../../main.inc.php")) $res=@include '../../main.inc.php';
|
||||
if (! $res && file_exists("../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../dolibarr/htdocs/main.inc.php'; // For custom directory
|
||||
if (! $res) die("Include of main fails");
|
||||
|
||||
@ -48,7 +48,7 @@ if (empty($conf->global->MAIN_MODULE_API))
|
||||
}
|
||||
|
||||
use \Luracast\Restler\Defaults;
|
||||
Defaults::setProperty('authenticationMethod','__isAllowed');
|
||||
Defaults::setProperty('authenticationMethod','_isAllowed');
|
||||
|
||||
$api = new DolibarrApi($db);
|
||||
|
||||
@ -64,7 +64,7 @@ foreach ($modulesdir as $dir)
|
||||
* Search available module
|
||||
*/
|
||||
dol_syslog("Scan directory ".$dir." for API modules");
|
||||
|
||||
|
||||
$handle=@opendir(dol_osencode($dir));
|
||||
if (is_resource($handle))
|
||||
{
|
||||
@ -81,7 +81,7 @@ foreach ($modulesdir as $dir)
|
||||
if ($module == 'societe') {
|
||||
$obj = 'thirdparty';
|
||||
}
|
||||
if ($module == 'categorie') {
|
||||
if ($module == 'categorie') {
|
||||
$part = 'categories';
|
||||
$obj = 'category';
|
||||
}
|
||||
@ -90,7 +90,7 @@ foreach ($modulesdir as $dir)
|
||||
$obj = 'facture';
|
||||
}
|
||||
if (empty($conf->$module->enabled)) $enabled=false;
|
||||
|
||||
|
||||
if ($enabled)
|
||||
{
|
||||
/*
|
||||
@ -102,7 +102,7 @@ foreach ($modulesdir as $dir)
|
||||
* @todo : use getElementProperties() function ?
|
||||
*/
|
||||
$dir_part = DOL_DOCUMENT_ROOT.'/'.$part.'/class/';
|
||||
|
||||
|
||||
$handle_part=@opendir(dol_osencode($dir_part));
|
||||
if (is_resource($handle_part))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user