mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 12:33:26 +00:00
Refactor Appbox
This commit is contained in:
@@ -126,7 +126,7 @@ class collection implements cache_cacheableInterface
|
||||
|
||||
$this->is_active = true;
|
||||
$this->delete_data_from_cache();
|
||||
$appbox = appbox::get_instance();
|
||||
$appbox = appbox::get_instance(\bootstrap::getCore());
|
||||
$appbox->delete_data_from_cache(appbox::CACHE_LIST_BASES);
|
||||
$this->databox->delete_data_from_cache(databox::CACHE_COLLECTIONS);
|
||||
cache_databox::update($this->databox->get_sbas_id(), 'structure');
|
||||
@@ -142,7 +142,7 @@ class collection implements cache_cacheableInterface
|
||||
$stmt->closeCursor();
|
||||
$this->is_active = false;
|
||||
$this->delete_data_from_cache();
|
||||
$appbox = appbox::get_instance();
|
||||
$appbox = appbox::get_instance(\bootstrap::getCore());
|
||||
$appbox->delete_data_from_cache(appbox::CACHE_LIST_BASES);
|
||||
$this->databox->delete_data_from_cache(databox::CACHE_COLLECTIONS);
|
||||
cache_databox::update($this->databox->get_sbas_id(), 'structure');
|
||||
@@ -314,7 +314,7 @@ class collection implements cache_cacheableInterface
|
||||
$stmt->execute(array(':coll_id' => $this->get_coll_id()));
|
||||
$stmt->closeCursor();
|
||||
|
||||
$appbox = appbox::get_instance();
|
||||
$appbox = appbox::get_instance(\bootstrap::getCore());
|
||||
|
||||
$sql = "DELETE FROM bas WHERE base_id = :base_id";
|
||||
$stmt = $appbox->get_connection()->prepare($sql);
|
||||
@@ -481,7 +481,7 @@ class collection implements cache_cacheableInterface
|
||||
$conn = $appbox->get_connection();
|
||||
$new_bas = false;
|
||||
|
||||
$appbox = appbox::get_instance();
|
||||
$appbox = appbox::get_instance(\bootstrap::getCore());
|
||||
$session = $appbox->get_session();
|
||||
|
||||
$prefs = '<?xml version="1.0" encoding="UTF-8"?>
|
||||
@@ -555,7 +555,7 @@ class collection implements cache_cacheableInterface
|
||||
|
||||
public static function mount_collection($sbas_id, $coll_id, User_Adapter $user)
|
||||
{
|
||||
$appbox = appbox::get_instance();
|
||||
$appbox = appbox::get_instance(\bootstrap::getCore());
|
||||
$session = $appbox->get_session();
|
||||
|
||||
$sql = "INSERT INTO bas (base_id, active, server_coll_id, sbas_id, aliases)
|
||||
|
Reference in New Issue
Block a user