mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 13:03:20 +00:00
Changes on SubdefGroup reflected in using clients
This commit is contained in:
@@ -44,11 +44,9 @@ class DatafileController extends AbstractDelivery
|
||||
|
||||
if ($subdef != 'thumbnail') {
|
||||
$all_access = false;
|
||||
$subdefStruct = $databox->get_subdef_structure();
|
||||
|
||||
if ($subdefStruct->getSubdefGroup($record->get_type())) {
|
||||
foreach ($subdefStruct->getSubdefGroup($record->get_type()) as $subdefObj) {
|
||||
/** @var \databox_subdef $subdefObj */
|
||||
$subdefGroup = $databox->get_subdef_structure()->getSubdefGroup($record->getType());
|
||||
if ($subdefGroup) {
|
||||
foreach ($subdefGroup as $subdefObj) {
|
||||
if ($subdefObj->get_name() == $subdef) {
|
||||
if ($subdefObj->get_class() == 'thumbnail') {
|
||||
$all_access = true;
|
||||
@@ -75,7 +73,7 @@ class DatafileController extends AbstractDelivery
|
||||
try {
|
||||
$subdef_class = $databox
|
||||
->get_subdef_structure()
|
||||
->get_subdef($record->get_type(), $subdef)
|
||||
->get_subdef($record->getType(), $subdef)
|
||||
->get_class();
|
||||
} catch (\Exception_Databox_SubdefNotFound $e) {
|
||||
|
||||
|
@@ -73,7 +73,7 @@ class ToolsController extends Controller
|
||||
continue;
|
||||
}
|
||||
|
||||
$label = $databoxSubdefs[$subdefName]->get_label($this->app['locale']);
|
||||
$label = $databoxSubdefs->getSubdef($subdefName)->get_label($this->app['locale']);
|
||||
}
|
||||
$recordAccessibleSubdefs[] = array(
|
||||
'name' => $subdef->get_name(),
|
||||
|
@@ -50,6 +50,7 @@ class SubdefGenerator
|
||||
{
|
||||
if (null === $subdefs = $record->getDatabox()->get_subdef_structure()->getSubdefGroup($record->getType())) {
|
||||
$this->logger->info(sprintf('Nothing to do for %s', $record->getType()));
|
||||
$subdefs = [];
|
||||
}
|
||||
|
||||
$this->dispatch(
|
||||
|
Reference in New Issue
Block a user