Refactor Appbox

This commit is contained in:
Romain Neutron
2012-02-21 16:06:01 +01:00
parent 375fd3d493
commit e576989c7f
15 changed files with 90 additions and 114 deletions

View File

@@ -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)