mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 06:23:18 +00:00
Avoid cache requests on subdef already in cache.
This commit is contained in:
@@ -565,14 +565,14 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
|||||||
{
|
{
|
||||||
$name = strtolower($name);
|
$name = strtolower($name);
|
||||||
|
|
||||||
if (!in_array($name, $this->get_available_subdefs())) {
|
|
||||||
throw new Exception_Media_SubdefNotFound(sprintf("subdef `%s` not found", $name));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($this->subdefs[$name])) {
|
if (isset($this->subdefs[$name])) {
|
||||||
return $this->subdefs[$name];
|
return $this->subdefs[$name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!in_array($name, $this->get_available_subdefs())) {
|
||||||
|
throw new Exception_Media_SubdefNotFound(sprintf("subdef `%s` not found", $name));
|
||||||
|
}
|
||||||
|
|
||||||
if (!$this->subdefs) {
|
if (!$this->subdefs) {
|
||||||
$this->subdefs = [];
|
$this->subdefs = [];
|
||||||
}
|
}
|
||||||
@@ -1583,7 +1583,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return set_selection
|
* @return set_selection|record_adapter[]
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @throws \Doctrine\DBAL\DBALException
|
* @throws \Doctrine\DBAL\DBALException
|
||||||
* @deprecated use {@link self::getChildren} instead.
|
* @deprecated use {@link self::getChildren} instead.
|
||||||
@@ -1593,6 +1593,11 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
|||||||
return $this->getChildren();
|
return $this->getChildren();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return set_selection|record_adapter[]
|
||||||
|
* @throws Exception
|
||||||
|
* @throws \Doctrine\DBAL\DBALException
|
||||||
|
*/
|
||||||
public function getChildren()
|
public function getChildren()
|
||||||
{
|
{
|
||||||
if (!$this->isStory()) {
|
if (!$this->isStory()) {
|
||||||
|
Reference in New Issue
Block a user