Skip to content

Commit

Permalink
Update scenes.class.php
Browse files Browse the repository at this point in the history
Scenes fix
  • Loading branch information
sergejey committed May 15, 2021
1 parent e225082 commit 98879bd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions modules/scenes/scenes.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1167,14 +1167,16 @@ function getDynamicElements($qry = '1')
} elseif ($elements[$ie]['TYPE'] == 'device') {
$device_rec = SQLSelectOne("SELECT * FROM devices WHERE ID=" . (int)$elements[$ie]['DEVICE_ID']);
$state = array();
$state['ID'] = 'element_' . ($elements[$ie]['ID']);
$state['ELEMENT_ID'] = $elements[$ie]['ID'];
$state['MENU_ITEM_ID'] = 0;
$state['HOMEPAGE_ID'] = 0;
$state['OPEN_SCENE_ID'] = 0;
$state['TYPE'] = $elements[$ie]['TYPE'];
if (!$device_rec['ARCHIVED']) {
$state['ID'] = 'element_' . ($elements[$ie]['ID']);
$state['ELEMENT_ID'] = $elements[$ie]['ID'];
$state['HTML'] = getObjectClassTemplate($device_rec['LINKED_OBJECT'],$elements[$ie]['CLASS_TEMPLATE']);
$state['TYPE'] = $elements[$ie]['TYPE'];
$state['MENU_ITEM_ID'] = 0;
$state['HOMEPAGE_ID'] = 0;
$state['OPEN_SCENE_ID'] = 0;
} else {
$state['HTML']='';
}
$states = array($state);
} else {
Expand Down

0 comments on commit 98879bd

Please sign in to comment.