diff --git a/lib/Alchemy/Phrasea/Helper/Prod.php b/lib/Alchemy/Phrasea/Helper/Prod.php index 1232372d6d..8c4772fa23 100644 --- a/lib/Alchemy/Phrasea/Helper/Prod.php +++ b/lib/Alchemy/Phrasea/Helper/Prod.php @@ -32,7 +32,7 @@ class Prod extends Helper ); $bases = $fields = $dates = array(); - $appbox = \appbox::get_instance(); + $appbox = \appbox::get_instance($this->core); $session = $appbox->get_session(); $user = $this->getCore()->getAuthenticatedUser(); diff --git a/lib/Alchemy/Phrasea/Helper/Record/Edit.php b/lib/Alchemy/Phrasea/Helper/Record/Edit.php index f982a77250..dbb70a6fb9 100644 --- a/lib/Alchemy/Phrasea/Helper/Record/Edit.php +++ b/lib/Alchemy/Phrasea/Helper/Record/Edit.php @@ -481,7 +481,7 @@ class Edit extends RecordHelper */ public function execute(Request $request) { - $appbox = \appbox::get_instance(); + $appbox = \appbox::get_instance($this->core); if ($request->get('act_option') == 'SAVEGRP' && $request->get('newrepresent')) { try diff --git a/lib/Alchemy/Phrasea/Helper/Record/Helper.php b/lib/Alchemy/Phrasea/Helper/Record/Helper.php index aebf2a81f9..704b6de3aa 100644 --- a/lib/Alchemy/Phrasea/Helper/Record/Helper.php +++ b/lib/Alchemy/Phrasea/Helper/Record/Helper.php @@ -107,7 +107,7 @@ class Helper extends \Alchemy\Phrasea\Helper\Helper $this->selection = new \set_selection(); - $appbox = \appbox::get_instance(); + $appbox = \appbox::get_instance($core); $usr_id = $appbox->get_session()->get_usr_id(); if (trim($Request->get('ssel')) !== '') diff --git a/lib/Alchemy/Phrasea/Helper/Record/MoveCollection.php b/lib/Alchemy/Phrasea/Helper/Record/MoveCollection.php index 07fc44ffab..af558854f2 100644 --- a/lib/Alchemy/Phrasea/Helper/Record/MoveCollection.php +++ b/lib/Alchemy/Phrasea/Helper/Record/MoveCollection.php @@ -98,7 +98,7 @@ class MoveCollection extends RecordHelper */ public function execute(Request $request) { - $appbox = \appbox::get_instance(); + $appbox = \appbox::get_instance($this->core); $user = $this->getCore()->getAuthenticatedUser(); $baseId = $request->get('base_id'); diff --git a/lib/Alchemy/Phrasea/Helper/User/Edit.php b/lib/Alchemy/Phrasea/Helper/User/Edit.php index a42ab38fee..035d9afce4 100644 --- a/lib/Alchemy/Phrasea/Helper/User/Edit.php +++ b/lib/Alchemy/Phrasea/Helper/User/Edit.php @@ -63,7 +63,7 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper public function delete_users() { - $appbox = \appbox::get_instance(); + $appbox = \appbox::get_instance($this->core); foreach ($this->users as $usr_id) { $user = \User_Adapter::getInstance($usr_id, $appbox); @@ -92,7 +92,7 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper public function get_users_rights() { $user = $this->getCore()->getAuthenticatedUser(); - $appbox = \appbox::get_instance(); + $appbox = \appbox::get_instance($this->core); $list = array_keys($user->ACL()->get_granted_base(array('canadmin'))); @@ -393,7 +393,7 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper public function apply_rights() { - $appbox = \appbox::get_instance(); + $appbox = \appbox::get_instance($this->core); $session = $appbox->get_session(); $request = \http_request::getInstance(); $ACL = \User_Adapter::getInstance($session->get_usr_id(), $appbox)->ACL(); @@ -543,14 +543,14 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper $users = $this->users; - $user = \User_adapter::getInstance(array_pop($users), \appbox::get_instance()); + $user = \User_adapter::getInstance(array_pop($users), \appbox::get_instance($this->core)); if ($user->is_template() || $user->is_special()) { return $this; } - $appbox = \appbox::get_instance(); + $appbox = \appbox::get_instance($this->core); $session = $appbox->get_session(); $request = \http_request::getInstance(); @@ -592,7 +592,7 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper public function apply_template() { - $appbox = \appbox::get_instance(); + $appbox = \appbox::get_instance($this->core); $session = $appbox->get_session(); $template = \User_adapter::getInstance($this->request->get('template'), $appbox); @@ -627,7 +627,7 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper foreach ($this->users as $usr_id) { - $user = \User_Adapter::getInstance($usr_id, \appbox::get_instance()); + $user = \User_Adapter::getInstance($usr_id, \appbox::get_instance($this->core)); if ($this->request->get('quota')) $user->ACL()->set_quotas_on_base($this->base_id, $this->request->get('droits'), $this->request->get('restes')); else @@ -650,7 +650,7 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper { foreach ($this->users as $usr_id) { - $user = \User_Adapter::getInstance($usr_id, \appbox::get_instance()); + $user = \User_Adapter::getInstance($usr_id, \appbox::get_instance($this->core)); $user->ACL()->set_masks_on_base($this->base_id, $vand_and, $vand_or, $vxor_and, $vxor_or); } @@ -670,7 +670,7 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper foreach ($this->users as $usr_id) { - $user = \User_Adapter::getInstance($usr_id, \appbox::get_instance()); + $user = \User_Adapter::getInstance($usr_id, \appbox::get_instance($this->core)); $user->ACL()->set_limits($this->base_id, $activate, $dmin, $dmax); } diff --git a/lib/Alchemy/Phrasea/Helper/User/Manage.php b/lib/Alchemy/Phrasea/Helper/User/Manage.php index 6a36961d72..35479a42d4 100644 --- a/lib/Alchemy/Phrasea/Helper/User/Manage.php +++ b/lib/Alchemy/Phrasea/Helper/User/Manage.php @@ -42,7 +42,7 @@ class Manage extends \Alchemy\Phrasea\Helper\Helper public function export() { $request = $this->request; - $appbox = \appbox::get_instance(); + $appbox = \appbox::get_instance($this->core); $session = $appbox->get_session(); $offset_start = (int) $request->get('offset_start'); @@ -80,7 +80,7 @@ class Manage extends \Alchemy\Phrasea\Helper\Helper public function search() { $request = $this->request; - $appbox = \appbox::get_instance(); + $appbox = \appbox::get_instance($this->core); $offset_start = (int) $this->request->get('offset_start'); $offset_start = $offset_start < 0 ? 0 : $offset_start; @@ -165,7 +165,7 @@ class Manage extends \Alchemy\Phrasea\Helper\Helper throw new \Exception_InvalidArgument(_('Invalid mail address')); } - $appbox = \appbox::get_instance(); + $appbox = \appbox::get_instance($this->core); $conn = $appbox->get_connection(); $sql = 'SELECT usr_id FROM usr WHERE usr_mail = :email'; @@ -197,7 +197,7 @@ class Manage extends \Alchemy\Phrasea\Helper\Helper throw new \Exception_InvalidArgument(_('Invalid template name')); } - $appbox = \appbox::get_instance(); + $appbox = \appbox::get_instance($this->core); $user = $this->getCore()->getAuthenticatedUser(); $created_user = \User_Adapter::create($appbox, $name, \random::generatePassword(16), null, false, false);