mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Replace phraseanet.appbox by getApplicationBox() method calls.
This commit is contained in:
10
lib/classes/cache/databox.php
vendored
10
lib/classes/cache/databox.php
vendored
@@ -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);
|
||||
|
Reference in New Issue
Block a user