mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix: add function for switch to another entity
This commit is contained in:
parent
cbf0eecde5
commit
255e1fdedf
|
|
@ -768,10 +768,23 @@ else
|
|||
|
||||
$heightforframes=48;
|
||||
|
||||
// Switch to another entity
|
||||
if (GETPOST('action') == 'switchentity' && $user->admin && ! $user->entity)
|
||||
{
|
||||
require_once("../class/actions_multicompany.class.php");
|
||||
|
||||
$mc = new ActionsMulticompany($db);
|
||||
|
||||
if($mc->switchEntity(GETPOST('entity_id')) > 0)
|
||||
{
|
||||
Header("Location: ".DOL_URL_ROOT.'/');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Functions
|
||||
|
||||
|
||||
/**
|
||||
* Show HTML header HTML + BODY + Top menu + left menu + DIV
|
||||
* @param head Add optionnal head lines
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user