mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 22:13:13 +00:00
Fix latest merge
This commit is contained in:
@@ -664,20 +664,24 @@ class databox extends base
|
||||
try {
|
||||
$metaStructData = $this->get_data_from_cache(self::CACHE_META_STRUCT);
|
||||
} catch (\Exception $e) {
|
||||
$sql = 'SELECT id, name FROM metadatas_structure ORDER BY sorter ASC';
|
||||
$sql = 'SELECT id, `name` FROM metadatas_structure ORDER BY sorter ASC';
|
||||
$stmt = $this->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
|
||||
$metaStructData = $rs;
|
||||
$this->set_data_to_cache($metaStructData, self::CACHE_META_STRUCT);
|
||||
if ($rs) {
|
||||
$metaStructData = $rs;
|
||||
$this->set_data_to_cache($metaStructData, self::CACHE_META_STRUCT);
|
||||
}
|
||||
}
|
||||
|
||||
$this->meta_struct = new databox_descriptionStructure();
|
||||
|
||||
foreach ($metaStructData as $row) {
|
||||
$this->meta_struct->add_element(databox_field::get_instance($this->app, $this, $row['id']));
|
||||
if ($metaStructData) {
|
||||
foreach ($metaStructData as $row) {
|
||||
$this->meta_struct->add_element(databox_field::get_instance($this->app, $this, $row['id']));
|
||||
}
|
||||
}
|
||||
|
||||
return $this->meta_struct;
|
||||
|
Reference in New Issue
Block a user