var sections = uci.sections('firewall', 'zone');
for (var i = 0; i < sections.length; i++)
- if (L.toArray(sections[i].network || sections[i].name).indexOf(network) != -1)
+ if (L.toArray(sections[i].network).indexOf(network) != -1)
return new Zone(sections[i]['.name']);
return null;
if (sections[i].name != oldName)
continue;
- if (L.toArray(sections[i].network).length == 0)
- uci.set('firewall', sections[i]['.name'], 'network', oldName);
-
uci.set('firewall', sections[i]['.name'], 'name', newName);
found = true;
}