From cdd37110bbf4fb674ce57df32f39c260911966dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 29 Mar 2016 16:48:29 +0200 Subject: [PATCH] Remove useless interface --- lib/classes/caption/interface.php | 22 ---------------------- lib/classes/caption/record.php | 21 ++++++--------------- 2 files changed, 6 insertions(+), 37 deletions(-) delete mode 100644 lib/classes/caption/interface.php 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();