Now save the connection value selected and remove when not needed

This commit is contained in:
laf
2015-06-27 17:41:31 +01:00
parent aed0fedf02
commit 4bef35c90a
3 changed files with 7 additions and 3 deletions
+2
View File
@@ -63,6 +63,8 @@ function GenGroupSQL($pattern,$search='') {
*/
function GetDevicesFromGroup($group_id) {
$pattern = dbFetchCell("SELECT pattern FROM device_groups WHERE id = ?",array($group_id));
$pattern = rtrim($pattern,'&&');
$pattern = rtrim($pattern,'||');
if( !empty($pattern) ) {
return dbFetchRows(GenGroupSQL($pattern));
}