fix icon inheritance

master
lub 5 years ago
parent 92160fd812
commit 22d45e772a

@ -6,8 +6,12 @@ function createChannel($server, $name, $parent, $options) {
'cpid' => $parent->getId()
));
if($options['inherit_icons']) {
$channel = $server->channelGetById($id);
$channel->modify(array('channel_icon_id' => $parent->getProperty('channel_icon_id')));
$icon = $parent->getProperty('channel_icon_id');
#check if parent channel actually has an icon
if($icon !== 0) {
$server->channelPermAssign($id, "i_icon_id", $icon);
}
}
}

Loading…
Cancel
Save