diff --git a/lib/classes/caption/interface.php b/lib/classes/caption/interface.php deleted file mode 100644 index 477b24e6ba..0000000000 --- a/lib/classes/caption/interface.php +++ /dev/null @@ -1,22 +0,0 @@ -app = $app; - $this->sbas_id = $record->getDataboxId(); $this->record = $record; $this->databox = $databox; } @@ -81,13 +74,11 @@ FROM metadatas m INNER JOIN metadatas_structure s ON s.id = m.meta_struct_id WHERE m.record_id = :record_id ORDER BY s.sorter ASC SQL; - $stmt = $this->databox->get_connection()->prepare($sql); - $stmt->execute([':record_id' => $this->record->getRecordId()]); - $fields = $stmt->fetchAll(PDO::FETCH_ASSOC); - $stmt->closeCursor(); - if ($fields) { - $this->set_data_to_cache($fields); - } + $fields = $this->databox->get_connection() + ->executeQuery($sql, [':record_id' => $this->record->getRecordId()]) + ->fetchAll(PDO::FETCH_ASSOC); + + $this->set_data_to_cache($fields); } $rec_fields = array();