diff --git a/www/client/answer.php b/www/client/answer.php index 8b8966c7b8..c7b46ed416 100644 --- a/www/client/answer.php +++ b/www/client/answer.php @@ -14,18 +14,14 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -require_once __DIR__ . "/../../lib/bootstrap.php"; -$appbox = appbox::get_instance(); +/* @var $Core \Alchemy\Phrasea\Core */ +$Core = require_once __DIR__ . "/../../lib/bootstrap.php"; + +$appbox = appbox::get_instance($Core); $session = $appbox->get_session(); $registry = $appbox->get_registry(); -$user = User_Adapter::getInstance($session->get_usr_id(), $appbox); - - -$lng = Session_Handler::get_locale(); - -$ses_id = $session->get_ses_id(); -$usr_id = $session->get_usr_id(); +$user = $Core->getAuthenticatedUser(); if (!isset($parm)) { diff --git a/www/client/clientFeedBack.php b/www/client/clientFeedBack.php index 37b11df1f8..1dd4fe190a 100644 --- a/www/client/clientFeedBack.php +++ b/www/client/clientFeedBack.php @@ -15,19 +15,17 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ +/* @var $Core \Alchemy\Phrasea\Core */ $Core = require_once __DIR__ . "/../../lib/bootstrap.php"; $em = $Core->getEntityManager(); -$appbox = appbox::get_instance(); -$session = $appbox->get_session(); +$appbox = appbox::get_instance($Core); $registry = $appbox->get_registry(); -$user = User_Adapter::getInstance($session->get_usr_id(), $appbox); +$user = $Core->getAuthenticatedUser(); $lng = Session_Handler::get_locale(); -$usr_id = $session->get_usr_id(); - $output = ''; $request = http_request::getInstance(); diff --git a/www/client/homeinterpubbask.php b/www/client/homeinterpubbask.php index 933521d6ab..a2c6f276dc 100644 --- a/www/client/homeinterpubbask.php +++ b/www/client/homeinterpubbask.php @@ -15,14 +15,13 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -$appbox = appbox::get_instance(); +$Core = \bootstrap::getCore(); +$appbox = appbox::get_instance($Core); $session = $appbox->get_session(); -$registry = $appbox->get_registry(); $th_size = $user->getPrefs('images_size'); -$user = User_Adapter::getInstance($session->get_usr_id(), $appbox); -$ACL = $user->ACL(); +$user = $Core->getAuthenticatedUser(); $RN = array("\r\n", "\n", "\r"); diff --git a/www/client/index.php b/www/client/index.php index 85bb4ad395..5dafe03272 100644 --- a/www/client/index.php +++ b/www/client/index.php @@ -15,7 +15,7 @@ * @link www.phraseanet.com */ $Core = require_once __DIR__ . "/../../lib/bootstrap.php"; -$appbox = appbox::get_instance(); +$appbox = appbox::get_instance($Core); $session = $appbox->get_session(); $registry = $appbox->get_registry();