Skip to content

Commit 2e320f3

Browse files
committed
table_names outside loop, see #216 and #217
1 parent ea61344 commit 2e320f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,11 +2260,11 @@ protected function swagger($settings) {
22602260
$this->db->close($result);
22612261
}
22622262

2263+
$table_names = array_map(function($v){ return $v['name'];},$tables);
22632264
foreach ($tables as $t=>$table) {
22642265
$table_list = array($table['name']);
22652266
$table_fields = $this->findFields($table_list,false,false,false,$database);
2266-
$table_names = array_map(function($v){ return $v['name'];},$tables);
2267-
2267+
22682268
// extensions
22692269
$result = $this->db->query($this->db->getSql('reflect_belongs_to'),array($table_list[0],$table_names,$database,$database));
22702270
while ($row = $this->db->fetchRow($result)) {

0 commit comments

Comments
 (0)