Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
37617bbce8
@ -3889,7 +3889,7 @@ elseif ($id > 0 || !empty($ref))
|
||||
}
|
||||
|
||||
// Call Hook formConfirm
|
||||
$parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid);
|
||||
$parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid, 'remainingtopay' => &$resteapayer);
|
||||
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) $formconfirm .= $hookmanager->resPrint;
|
||||
elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint;
|
||||
|
||||
@ -348,6 +348,7 @@ class modStock extends DolibarrModules
|
||||
$this->import_examplevalues_array[$r]=array(
|
||||
'ps.fk_product'=>"PREF123456",'ps.fk_entrepot'=>"ALM001",'ps.reel'=>"10"
|
||||
);
|
||||
$this->import_updatekeys_array[$r]=array('ps.fk_product'=>'Product', 'ps.fk_entrepot'=>"Warehouse");
|
||||
$this->import_run_sql_after_array[$r]=array( // Because we may change data that are denormalized, we must update dernormalized data after.
|
||||
'UPDATE '.MAIN_DB_PREFIX.'product p SET p.stock= (SELECT SUM(ps.reel) FROM '.MAIN_DB_PREFIX.'product_stock ps WHERE ps.fk_product = p.rowid);'
|
||||
);
|
||||
|
||||
@ -132,15 +132,15 @@ class Users extends DolibarrApi
|
||||
|
||||
/**
|
||||
* Get properties of an user object
|
||||
*
|
||||
* Return an array with user informations
|
||||
*
|
||||
* @param int $id ID of user
|
||||
* @param int $id ID of user
|
||||
* @param int $includepermissions Set this to 1 to have the array of permissions loaded (not done by default for performance purpose)
|
||||
* @return array|mixed data without useless information
|
||||
*
|
||||
* @throws RestException
|
||||
*/
|
||||
public function get($id)
|
||||
public function get($id, $includepermissions = 0)
|
||||
{
|
||||
//if (!DolibarrApiAccess::$user->rights->user->user->lire) {
|
||||
//throw new RestException(401);
|
||||
@ -157,6 +157,10 @@ class Users extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
if ($includepermissions) {
|
||||
$this->useraccount->getRights();
|
||||
}
|
||||
|
||||
return $this->_cleanObjectDatas($this->useraccount);
|
||||
}
|
||||
|
||||
@ -544,6 +548,12 @@ class Users extends DolibarrApi
|
||||
unset($object->clicktodial_password);
|
||||
unset($object->openid);
|
||||
|
||||
unset($object->lines);
|
||||
unset($object->modelpdf);
|
||||
unset($object->skype);
|
||||
unset($object->twitter);
|
||||
unset($object->facebook);
|
||||
unset($object->linkedin);
|
||||
|
||||
$canreadsalary = ((!empty($conf->salaries->enabled) && !empty(DolibarrApiAccess::$user->rights->salaries->read))
|
||||
|| (!empty($conf->hrm->enabled) && !empty(DolibarrApiAccess::$user->rights->hrm->employee->read)));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user