Editing the archive Url from the gui.
This commit is contained in:
parent
d5ee603215
commit
20eacb439c
|
@ -68,6 +68,19 @@ $ui_fmask = array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'label' => 'Scheduler startup script',
|
'label' => 'Scheduler startup script',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'element' => 'archiveServerLocation',
|
||||||
|
'isPref' => TRUE,
|
||||||
|
'type' => 'text',
|
||||||
|
'label' => 'Archive server location URL',
|
||||||
|
'required' => false,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'rule' => 'regex',
|
||||||
|
'element' => 'archiveServerLocation',
|
||||||
|
'format' => UI_REGEX_URL,
|
||||||
|
'rulemsg' => 'archive server location seems not to be valid'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'element' => UI_SCRATCHPAD_MAXLENGTH_KEY,
|
'element' => UI_SCRATCHPAD_MAXLENGTH_KEY,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<div style="width: 574px;">
|
<div style="width: 574px;">
|
||||||
<div style="float: left;"><h1>##Playlist Editor## </h1></div>
|
<div style="float: left;"><h1>##Playlist Editor## </h1></div>
|
||||||
<div style="float: right;"><h1><a href="{$UI_BROWSER}?act=PL.editMetaData" style="color: #666666">{$PL->title} {getHour time=$PL->duration}##h## {getMinute time=$PL->duration}##m## {getSecond time=$PL->duration}##s##</a></h1></div>
|
<div style="float: right;"><h1><a href="{$UI_BROWSER}?act=PL.editMetaData" style="color: #666666">{$PL->title} {niceTime in=$PL->duration} </a></h1></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="head" style="width: 574px;">
|
<div class="head" style="width: 574px;">
|
||||||
|
|
|
@ -1633,10 +1633,32 @@ class Transport
|
||||||
{
|
{
|
||||||
global $CC_CONFIG;
|
global $CC_CONFIG;
|
||||||
$xrp = XML_RPC_encode($pars);
|
$xrp = XML_RPC_encode($pars);
|
||||||
$c = new XML_RPC_Client(
|
|
||||||
$CC_CONFIG['archiveUrlPath']."/".$CC_CONFIG['archiveXMLRPC'],
|
$group = 'StationPrefs';
|
||||||
$CC_CONFIG['archiveUrlHost'], $CC_CONFIG['archiveUrlPort']
|
$key = 'archiveServerLocation';
|
||||||
);
|
$archiveUrl = $pr->loadGroupPref(NULL/*sessid*/, $group, $key);
|
||||||
|
|
||||||
|
if($archiveUrl){
|
||||||
|
|
||||||
|
$archiveUrlInfo = parse_url($archiveUrl);
|
||||||
|
|
||||||
|
if($archiveUrlInfo['port']){
|
||||||
|
$port = $archiveUrlInfo['port'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$port = 80;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$c = new XML_RPC_Client($archiveUrlInfo['path'], $archiveUrlInfo['host'], $port);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$c = new XML_RPC_Client(
|
||||||
|
$CC_CONFIG['archiveUrlPath']."/".$CC_CONFIG['archiveXMLRPC'],
|
||||||
|
$CC_CONFIG['archiveUrlHost'], $CC_CONFIG['archiveUrlPort']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$f = new XML_RPC_Message($method, array($xrp));
|
$f = new XML_RPC_Message($method, array($xrp));
|
||||||
$r = $c->send($f);
|
$r = $c->send($f);
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
|
|
Loading…
Reference in New Issue