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