mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Refactor databox_field :: name generation
This commit is contained in:
@@ -75,7 +75,7 @@ class databox_descriptionStructure implements IteratorAggregate
|
||||
|
||||
/**
|
||||
*
|
||||
* @param <type> $name
|
||||
* @param int $id
|
||||
* @return databox_field
|
||||
*/
|
||||
public function get_element($id)
|
||||
@@ -93,6 +93,8 @@ class databox_descriptionStructure implements IteratorAggregate
|
||||
*/
|
||||
public function get_element_by_name($name)
|
||||
{
|
||||
$name = databox_field::generateName($name);
|
||||
|
||||
if (isset($this->cache_name_id[$name]))
|
||||
|
||||
return $this->elements[$this->cache_name_id[$name]];
|
||||
|
Reference in New Issue
Block a user