fix error of multiple function declerations

master
lub 10 years ago
parent cf1be9740a
commit 49fb97f955

@ -1,5 +1,6 @@
<?php <?php
require_once('config.inc.php'); require_once('config.inc.php');
require_once('functions.php');
require_once($framework); require_once($framework);
if(__FILE__ != get_included_files()[0]) { if(__FILE__ != get_included_files()[0]) {
@ -45,23 +46,3 @@ foreach($roots as $root) {
} }
} }
} }
function createChannel($server, $name, $parent, $options) {
$id = $server->channelCreate(array(
'channel_name' => $name,
'channel_flag_permanent' => TRUE,
'cpid' => $parent->getId()
));
if($options['inherit_icons']) {
$channel = $server->channelGetById($id);
$channel->modify(array('channel_icon_id' => $parent->getProperty('channel_icon_id')));
}
}
function catchExceptions($name, $excpetions) {
foreach($excpetions as $exception) {
if($name == $exception) {
return true;
}
}
return false;
}

@ -0,0 +1,21 @@
<?php
function createChannel($server, $name, $parent, $options) {
$id = $server->channelCreate(array(
'channel_name' => $name,
'channel_flag_permanent' => TRUE,
'cpid' => $parent->getId()
));
if($options['inherit_icons']) {
$channel = $server->channelGetById($id);
$channel->modify(array('channel_icon_id' => $parent->getProperty('channel_icon_id')));
}
}
function catchExceptions($name, $excpetions) {
foreach($excpetions as $exception) {
if($name == $exception) {
return true;
}
}
return false;
}
Loading…
Cancel
Save