mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Update appbox
This commit is contained in:
@@ -180,9 +180,11 @@ class Installer implements ControllerProviderInterface
|
|||||||
|
|
||||||
\setup::rollback($conn, $connbas);
|
\setup::rollback($conn, $connbas);
|
||||||
|
|
||||||
|
$app['phraseanet.registry'] = $setupRegistry;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$appbox = \appbox::create($app, $setupRegistry, $conn, $appbox_name, $app['phraseanet.appbox'], true);
|
$appbox = \appbox::create($app, $conn, $appbox_name, $app['phraseanet.appbox'], true);
|
||||||
|
|
||||||
$configuration = Configuration::build();
|
$configuration = Configuration::build();
|
||||||
|
|
||||||
|
@@ -55,26 +55,12 @@ class appbox extends base
|
|||||||
const CACHE_LIST_BASES = 'list_bases';
|
const CACHE_LIST_BASES = 'list_bases';
|
||||||
const CACHE_SBAS_IDS = 'sbas_ids';
|
const CACHE_SBAS_IDS = 'sbas_ids';
|
||||||
|
|
||||||
/**
|
|
||||||
* Singleton pattern
|
|
||||||
*
|
|
||||||
* @return appbox
|
|
||||||
*/
|
|
||||||
public static function get_instance(Application $app, registryInterface $registry = null)
|
|
||||||
{
|
|
||||||
if (!self::$_instance instanceof self) {
|
|
||||||
self::$_instance = new static($app, $registry);
|
|
||||||
}
|
|
||||||
|
|
||||||
return self::$_instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @return appbox
|
* @return appbox
|
||||||
*/
|
*/
|
||||||
public function __construct(Application $app, registryInterface $registry = null)
|
public function __construct(Application $app)
|
||||||
{
|
{
|
||||||
$this->app = $app;
|
$this->app = $app;
|
||||||
$this->connection = connection::getPDOConnection($app, null, $app['phraseanet.registry']);
|
$this->connection = connection::getPDOConnection($app, null, $app['phraseanet.registry']);
|
||||||
@@ -465,7 +451,7 @@ class appbox extends base
|
|||||||
* @param type $write_file
|
* @param type $write_file
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public static function create(Application $app, registryInterface $registry, connection_interface $conn, $dbname, Version $version, $write_file = false)
|
public static function create(Application $app, connection_interface $conn, $dbname, Version $version, $write_file = false)
|
||||||
{
|
{
|
||||||
$credentials = $conn->get_credentials();
|
$credentials = $conn->get_credentials();
|
||||||
|
|
||||||
@@ -487,7 +473,7 @@ class appbox extends base
|
|||||||
$connexionINI['driver'] = 'pdo_mysql';
|
$connexionINI['driver'] = 'pdo_mysql';
|
||||||
$connexionINI['charset'] = 'UTF8';
|
$connexionINI['charset'] = 'UTF8';
|
||||||
|
|
||||||
$serverName = $registry->get('GV_ServerName');
|
$serverName = $app['phraseanet.registry']->get('GV_ServerName');
|
||||||
|
|
||||||
$root = __DIR__ . '/../../';
|
$root = __DIR__ . '/../../';
|
||||||
|
|
||||||
@@ -550,7 +536,7 @@ class appbox extends base
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$appbox = static::get_instance($app, $registry);
|
$appbox = new self($app);
|
||||||
$appbox->insert_datas($version);
|
$appbox->insert_datas($version);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new Exception('Error while installing ' . $e->getMessage());
|
throw new Exception('Error while installing ' . $e->getMessage());
|
||||||
|
@@ -95,7 +95,7 @@ class patch_370a7 implements patchInterface
|
|||||||
$spec->setResizeMode(ImageSpec::RESIZE_MODE_INBOUND_FIXEDRATIO);
|
$spec->setResizeMode(ImageSpec::RESIZE_MODE_INBOUND_FIXEDRATIO);
|
||||||
$spec->setDimensions(375, 275);
|
$spec->setDimensions(375, 275);
|
||||||
|
|
||||||
$thumbPath = $app['phraseanet.registry']->getRegistry()->get('GV_RootPath') . 'tmp/lazaret/' . sprintf("thumb_%s", $row['filepath']);
|
$thumbPath = $app['phraseanet.registry']->get('GV_RootPath') . 'tmp/lazaret/' . sprintf("thumb_%s", $row['filepath']);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$app['media-alchemyst']
|
$app['media-alchemyst']
|
||||||
|
Reference in New Issue
Block a user