"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "inc/dropdowntranslation.class.php" between
glpi-9.3.3.tgz and glpi-9.4.0.tgz

About: GLPI is an IT and asset management software (Information Resource Manager).

dropdowntranslation.class.php  (glpi-9.3.3.tgz):dropdowntranslation.class.php  (glpi-9.4.0.tgz)
skipping to change at line 726 skipping to change at line 726
* *
* @param $language language * @param $language language
* *
* @return array of table / field translated item * @return array of table / field translated item
**/ **/
static function getAvailableTranslations($language) { static function getAvailableTranslations($language) {
global $DB; global $DB;
$tab = []; $tab = [];
if (self::isDropdownTranslationActive()) { if (self::isDropdownTranslationActive()) {
$query = "SELECT DISTINCT `itemtype`, `field` $iterator = $DB->request([
FROM `".self::getTable()."` 'SELECT DISTINCT' => 'itemtype',
WHERE `language` = '$language'"; 'FIELDS' => 'field',
foreach ($DB->request($query) as $data) { 'FROM' => self::getTable(),
'WHERE' => ['language' => $language]
]);
while ($data = $iterator->next()) {
$tab[$data['itemtype']][$data['field']] = $data['field']; $tab[$data['itemtype']][$data['field']] = $data['field'];
} }
} }
return $tab; return $tab;
} }
} }
 End of changes. 1 change blocks. 
4 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)