src/generator/Analyzer.php 1 location
|
@@ 287-298 (lines=12) @@
|
| 284 |
|
} |
| 285 |
|
|
| 286 |
|
/** @return array Collection of navigation additional fields */ |
| 287 |
|
protected function navigationFields($navigationID) |
| 288 |
|
{ |
| 289 |
|
$return = array(); |
| 290 |
|
// TODO: Optimize queries make one single query with only needed data |
| 291 |
|
foreach ($this->database->fetch('SELECT * FROM `structurefield` WHERE `StructureID` = "' . $navigationID . '" AND `Active` = "1"') as $fieldStructureRow) { |
| 292 |
|
foreach ($this->database->fetch('SELECT * FROM `field` WHERE `FieldID` = "' . $fieldStructureRow['FieldID'] . '"') as $fieldRow) { |
| 293 |
|
$return[$fieldRow['FieldID']] = $fieldRow; |
| 294 |
|
} |
| 295 |
|
} |
| 296 |
|
|
| 297 |
|
return $return; |
| 298 |
|
} |
| 299 |
|
|
| 300 |
|
/** |
| 301 |
|
* Get correct field name. |
src/generator/Generator.php 1 location
|
@@ 287-298 (lines=12) @@
|
| 284 |
|
} |
| 285 |
|
|
| 286 |
|
/** @return array Collection of navigation additional fields */ |
| 287 |
|
protected function navigationFields($navigationID) |
| 288 |
|
{ |
| 289 |
|
$return = array(); |
| 290 |
|
// TODO: Optimize queries make one single query with only needed data |
| 291 |
|
foreach ($this->database->fetch('SELECT * FROM `structurefield` WHERE `StructureID` = "' . $navigationID . '" AND `Active` = "1"') as $fieldStructureRow) { |
| 292 |
|
foreach ($this->database->fetch('SELECT * FROM `field` WHERE `FieldID` = "' . $fieldStructureRow['FieldID'] . '"') as $fieldRow) { |
| 293 |
|
$return[$fieldRow['FieldID']] = $fieldRow; |
| 294 |
|
} |
| 295 |
|
} |
| 296 |
|
|
| 297 |
|
return $return; |
| 298 |
|
} |
| 299 |
|
|
| 300 |
|
/** |
| 301 |
|
* Get correct field name. |