mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Refactor Appbox
This commit is contained in:
@@ -14,18 +14,14 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @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();
|
$session = $appbox->get_session();
|
||||||
$registry = $appbox->get_registry();
|
$registry = $appbox->get_registry();
|
||||||
$user = User_Adapter::getInstance($session->get_usr_id(), $appbox);
|
$user = $Core->getAuthenticatedUser();
|
||||||
|
|
||||||
|
|
||||||
$lng = Session_Handler::get_locale();
|
|
||||||
|
|
||||||
$ses_id = $session->get_ses_id();
|
|
||||||
$usr_id = $session->get_usr_id();
|
|
||||||
|
|
||||||
if (!isset($parm))
|
if (!isset($parm))
|
||||||
{
|
{
|
||||||
|
@@ -15,19 +15,17 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
|
/* @var $Core \Alchemy\Phrasea\Core */
|
||||||
$Core = require_once __DIR__ . "/../../lib/bootstrap.php";
|
$Core = require_once __DIR__ . "/../../lib/bootstrap.php";
|
||||||
|
|
||||||
$em = $Core->getEntityManager();
|
$em = $Core->getEntityManager();
|
||||||
|
|
||||||
$appbox = appbox::get_instance();
|
$appbox = appbox::get_instance($Core);
|
||||||
$session = $appbox->get_session();
|
|
||||||
$registry = $appbox->get_registry();
|
$registry = $appbox->get_registry();
|
||||||
$user = User_Adapter::getInstance($session->get_usr_id(), $appbox);
|
$user = $Core->getAuthenticatedUser();
|
||||||
|
|
||||||
$lng = Session_Handler::get_locale();
|
$lng = Session_Handler::get_locale();
|
||||||
|
|
||||||
$usr_id = $session->get_usr_id();
|
|
||||||
|
|
||||||
$output = '';
|
$output = '';
|
||||||
|
|
||||||
$request = http_request::getInstance();
|
$request = http_request::getInstance();
|
||||||
|
@@ -15,14 +15,13 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
$appbox = appbox::get_instance();
|
$Core = \bootstrap::getCore();
|
||||||
|
$appbox = appbox::get_instance($Core);
|
||||||
$session = $appbox->get_session();
|
$session = $appbox->get_session();
|
||||||
$registry = $appbox->get_registry();
|
|
||||||
|
|
||||||
$th_size = $user->getPrefs('images_size');
|
$th_size = $user->getPrefs('images_size');
|
||||||
|
|
||||||
$user = User_Adapter::getInstance($session->get_usr_id(), $appbox);
|
$user = $Core->getAuthenticatedUser();
|
||||||
$ACL = $user->ACL();
|
|
||||||
|
|
||||||
$RN = array("\r\n", "\n", "\r");
|
$RN = array("\r\n", "\n", "\r");
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
$Core = require_once __DIR__ . "/../../lib/bootstrap.php";
|
$Core = require_once __DIR__ . "/../../lib/bootstrap.php";
|
||||||
$appbox = appbox::get_instance();
|
$appbox = appbox::get_instance($Core);
|
||||||
$session = $appbox->get_session();
|
$session = $appbox->get_session();
|
||||||
$registry = $appbox->get_registry();
|
$registry = $appbox->get_registry();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user