fix style in functions.php
parent
22d45e772a
commit
74902953a6
@ -1,25 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
function createChannel($server, $name, $parent, $options) {
|
function createChannel($server, $name, $parent, $options) {
|
||||||
$id = $server->channelCreate(array(
|
$id = $server->channelCreate(array(
|
||||||
'channel_name' => $name,
|
'channel_name' => $name,
|
||||||
'channel_flag_semi_permanent' => TRUE,
|
'channel_flag_semi_permanent' => TRUE,
|
||||||
'cpid' => $parent->getId()
|
'cpid' => $parent->getId()
|
||||||
));
|
));
|
||||||
if($options['inherit_icons']) {
|
if($options['inherit_icons']) {
|
||||||
$icon = $parent->getProperty('channel_icon_id');
|
$icon = $parent->getProperty('channel_icon_id');
|
||||||
|
|
||||||
#check if parent channel actually has an icon
|
// check if parent channel actually has an icon
|
||||||
if($icon !== 0) {
|
if($icon !== 0) {
|
||||||
$server->channelPermAssign($id, "i_icon_id", $icon);
|
$server->channelPermAssign($id, "i_icon_id", $icon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function catchExceptions($name, $excpetions) {
|
function catchExceptions($name, $excpetions) {
|
||||||
foreach($excpetions as $exception) {
|
foreach($excpetions as $exception) {
|
||||||
if($name == $exception) {
|
if($name == $exception) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue