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