Fix: add function for switch to another entity
This commit is contained in:
parent
2548c1d2a4
commit
6c2b1f5244
@ -752,6 +752,23 @@ else
|
|||||||
|
|
||||||
$heightforframes=48;
|
$heightforframes=48;
|
||||||
|
|
||||||
|
// Switch to another entity
|
||||||
|
if (!empty($conf->global->MAIN_MODULE_MULTICOMPANY))
|
||||||
|
{
|
||||||
|
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
|
// Functions
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user