Replace phraseanet.appbox by getApplicationBox() method calls.

This commit is contained in:
Benoît Burnichon
2015-07-01 12:56:27 +02:00
parent 19b8d41dcd
commit f920e8354a
61 changed files with 209 additions and 209 deletions

View File

@@ -36,7 +36,7 @@ class cache_databox
$last_update = null;
try {
$last_update = $app['phraseanet.appbox']->get_data_from_cache('memcached_update_' . $sbas_id);
$last_update = $app->getApplicationBox()->get_data_from_cache('memcached_update_' . $sbas_id);
} catch (\Exception $e) {
}
@@ -101,8 +101,8 @@ class cache_databox
break;
case 'structure':
$app['phraseanet.appbox']->delete_data_from_cache(\appbox::CACHE_LIST_BASES);
$app['phraseanet.appbox']->delete_data_from_cache(\appbox::CACHE_SBAS_IDS);
$app->getApplicationBox()->delete_data_from_cache(\appbox::CACHE_LIST_BASES);
$app->getApplicationBox()->delete_data_from_cache(\appbox::CACHE_SBAS_IDS);
$sql = 'DELETE FROM memcached
WHERE site_id = :site_id AND type="structure" AND value = :value';
@@ -122,9 +122,9 @@ class cache_databox
$date = new \DateTime();
$now = $date->format(DATE_ISO8601);
$app['phraseanet.appbox']->set_data_to_cache($now, 'memcached_update_' . $sbas_id);
$app->getApplicationBox()->set_data_to_cache($now, 'memcached_update_' . $sbas_id);
$conn = $app['phraseanet.appbox']->get_connection();
$conn = $app->getApplicationBox()->get_connection();
$sql = 'UPDATE sitepreff SET memcached_update = :date';
$stmt = $conn->prepare($sql);