mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Remove use of databox singleton
This commit is contained in:
@@ -856,7 +856,8 @@ class databox_field implements cache_cacheableInterface
|
||||
*/
|
||||
public function __wakeup()
|
||||
{
|
||||
$databox = databox::get_instance($this->sbas_id);
|
||||
$appbox = \appbox::get_instance(\bootstrap::getCore());
|
||||
$databox = $appbox->get_databox($this->sbas_id);
|
||||
$this->set_databox($databox);
|
||||
|
||||
return;
|
||||
|
@@ -61,6 +61,7 @@ class databox_status
|
||||
|
||||
$path = $url = false;
|
||||
|
||||
$appbox = \appbox::get_instance(\bootstrap::getCore());
|
||||
$sbas_params = phrasea::sbas_params();
|
||||
$registry = registry::get_instance();
|
||||
|
||||
@@ -71,7 +72,7 @@ class databox_status
|
||||
$path = $this->path = $registry->get('GV_RootPath') . "config/status/" . urlencode($sbas_params[$sbas_id]["host"]) . "-" . urlencode($sbas_params[$sbas_id]["port"]) . "-" . urlencode($sbas_params[$sbas_id]["dbname"]);
|
||||
$url = $this->url = "/custom/status/" . urlencode($sbas_params[$sbas_id]["host"]) . "-" . urlencode($sbas_params[$sbas_id]["port"]) . "-" . urlencode($sbas_params[$sbas_id]["dbname"]);
|
||||
|
||||
$databox = databox::get_instance((int) $sbas_id);
|
||||
$databox = $appbox->get_databox((int) $sbas_id);
|
||||
$xmlpref = $databox->get_structure();
|
||||
$sxe = simplexml_load_string($xmlpref);
|
||||
|
||||
@@ -244,6 +245,7 @@ class databox_status
|
||||
public static function deleteStatus($sbas_id, $bit)
|
||||
{
|
||||
$core = \bootstrap::getCore();
|
||||
$appbox = \appbox::get_instance($core);
|
||||
|
||||
$user = $core->getAuthenticatedUser();
|
||||
|
||||
@@ -256,7 +258,7 @@ class databox_status
|
||||
if (isset($status[$bit])) {
|
||||
$connbas = connection::getPDOConnection($sbas_id);
|
||||
|
||||
$databox = databox::get_instance((int) $sbas_id);
|
||||
$databox = $appbox->get_databox((int) $sbas_id);
|
||||
|
||||
$doc = $databox->get_dom_structure();
|
||||
if ($doc) {
|
||||
|
Reference in New Issue
Block a user