mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Merge remote-tracking branch 'upstream/develop' into camelCaps
This commit is contained in:
@@ -94,7 +94,8 @@ class DolibarrApi
|
||||
* @param object $object Object to clean
|
||||
* @return array Array of cleaned object properties
|
||||
*/
|
||||
function _cleanObjectDatas($object) {
|
||||
function _cleanObjectDatas($object)
|
||||
{
|
||||
|
||||
// Remove $db object property for object
|
||||
unset($object->db);
|
||||
@@ -220,7 +221,8 @@ class DolibarrApi
|
||||
* @return bool
|
||||
* @throws RestException
|
||||
*/
|
||||
static function _checkAccessToResource($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') {
|
||||
static function _checkAccessToResource($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid')
|
||||
{
|
||||
|
||||
// Features/modules to check
|
||||
$featuresarray = array($resource);
|
||||
|
||||
@@ -26,7 +26,8 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
class Login
|
||||
{
|
||||
|
||||
function __construct() {
|
||||
function __construct()
|
||||
{
|
||||
global $db;
|
||||
$this->db = $db;
|
||||
}
|
||||
@@ -51,7 +52,8 @@ class Login
|
||||
* @url GET /
|
||||
* @url POST /
|
||||
*/
|
||||
public function index($login, $password, $entity='', $reset=0) {
|
||||
public function index($login, $password, $entity='', $reset=0)
|
||||
{
|
||||
|
||||
global $conf, $dolibarr_main_authentication, $dolibarr_auto_user;
|
||||
|
||||
|
||||
@@ -26,19 +26,21 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php';
|
||||
*/
|
||||
class Status
|
||||
{
|
||||
/**
|
||||
/**
|
||||
* Get status (Dolibarr version)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function index() {
|
||||
global $conf;
|
||||
*/
|
||||
function index()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
return array(
|
||||
'success' => array(
|
||||
'code' => 200,
|
||||
'dolibarr_version' => DOL_VERSION,
|
||||
'access_locked' => (empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)?'0':$conf->global->MAIN_ONLY_LOGIN_ALLOWED)
|
||||
)
|
||||
);
|
||||
return array(
|
||||
'success' => array(
|
||||
'code' => 200,
|
||||
'dolibarr_version' => DOL_VERSION,
|
||||
'access_locked' => (empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)?'0':$conf->global->MAIN_ONLY_LOGIN_ALLOWED),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user