#1708 fixed return struct of the restoreBackupCheck method
This commit is contained in:
parent
56d8e855e6
commit
fc866bbfb7
|
@ -111,6 +111,7 @@ class Restore {
|
||||||
$this->token = $token;
|
$this->token = $token;
|
||||||
$this->setEnviroment();
|
$this->setEnviroment();
|
||||||
if (is_file($this->statusFile)) {
|
if (is_file($this->statusFile)) {
|
||||||
|
$r = array();
|
||||||
$stat = file_get_contents($this->statusFile);
|
$stat = file_get_contents($this->statusFile);
|
||||||
if (strpos($stat,'fault|') !== false) {
|
if (strpos($stat,'fault|') !== false) {
|
||||||
list($stat,$message) = explode('|',$stat);
|
list($stat,$message) = explode('|',$stat);
|
||||||
|
@ -119,7 +120,7 @@ class Restore {
|
||||||
if ($stat=='fault') {
|
if ($stat=='fault') {
|
||||||
$r['faultString'] = $message;
|
$r['faultString'] = $message;
|
||||||
}
|
}
|
||||||
$r['token'] = $token;
|
// $r['token'] = $token;
|
||||||
return $r;
|
return $r;
|
||||||
} else {
|
} else {
|
||||||
return PEAR::raiseError('Restore::checkRestore: invalid token!');
|
return PEAR::raiseError('Restore::checkRestore: invalid token!');
|
||||||
|
|
|
@ -1986,10 +1986,8 @@ class XR_LocStor extends LocStor{
|
||||||
*
|
*
|
||||||
* On success, returns a XML-RPC struct with following fields:
|
* On success, returns a XML-RPC struct with following fields:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li> status : hasharray - fields:
|
* <li> status : string - success | working | fault</li>
|
||||||
* token: string - restore token
|
* <li> faultString: string - description of fault</li>
|
||||||
* status: string - working | fault | success
|
|
||||||
* faultString: string - description of fault</li>
|
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* On errors, returns an XML-RPC error response.
|
* On errors, returns an XML-RPC error response.
|
||||||
|
@ -2017,9 +2015,10 @@ class XR_LocStor extends LocStor{
|
||||||
" ".$res->getUserInfo()
|
" ".$res->getUserInfo()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return new XML_RPC_Response(XML_RPC_encode(array(
|
# return new XML_RPC_Response(XML_RPC_encode(array(
|
||||||
'status'=>$res,
|
# 'status'=>$res,
|
||||||
)));
|
# )));
|
||||||
|
return new XML_RPC_Response(XML_RPC_encode($res));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2063,9 +2062,10 @@ class XR_LocStor extends LocStor{
|
||||||
" ".$res->getUserInfo()
|
" ".$res->getUserInfo()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return new XML_RPC_Response(XML_RPC_encode(array(
|
# return new XML_RPC_Response(XML_RPC_encode(array(
|
||||||
'gunid'=>$res,
|
# 'gunid'=>$res,
|
||||||
)));
|
# )));
|
||||||
|
return new XML_RPC_Response(XML_RPC_encode($res));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*========================================================== info methods */
|
/*========================================================== info methods */
|
||||||
|
|
|
@ -146,13 +146,6 @@ $infos = array(
|
||||||
"renderPlaylistToRSSClose" => array('m'=>"locstor.renderPlaylistToRSSClose",
|
"renderPlaylistToRSSClose" => array('m'=>"locstor.renderPlaylistToRSSClose",
|
||||||
'p'=>array('token'), 'r'=>array('status')),
|
'p'=>array('token'), 'r'=>array('status')),
|
||||||
|
|
||||||
"createBackupOpen" => array('m'=>"locstor.createBackupOpen",
|
|
||||||
'p'=>array('sessid', 'criteria'), 'r'=>array('token')),
|
|
||||||
"createBackupCheck" => array('m'=>"locstor.createBackupCheck",
|
|
||||||
'p'=>array('token'), 'r'=>array('status', 'url', 'metafile')),
|
|
||||||
"createBackupClose" => array('m'=>"locstor.createBackupClose",
|
|
||||||
'p'=>array('token'), 'r'=>array('status')),
|
|
||||||
|
|
||||||
"loadPref" => array('m'=>"locstor.loadPref",
|
"loadPref" => array('m'=>"locstor.loadPref",
|
||||||
'p'=>array('sessid', 'key'), 'r'=>'value'),
|
'p'=>array('sessid', 'key'), 'r'=>'value'),
|
||||||
"savePref" => array('m'=>"locstor.savePref",
|
"savePref" => array('m'=>"locstor.savePref",
|
||||||
|
@ -186,6 +179,20 @@ $infos = array(
|
||||||
"getSearchResults" => array('m'=>"locstor.getSearchResults",
|
"getSearchResults" => array('m'=>"locstor.getSearchResults",
|
||||||
'p'=>array('trtok')),
|
'p'=>array('trtok')),
|
||||||
|
|
||||||
|
"createBackupOpen" => array('m'=>"locstor.createBackupOpen",
|
||||||
|
'p'=>array('sessid', 'criteria'), 'r'=>array('token')),
|
||||||
|
"createBackupCheck" => array('m'=>"locstor.createBackupCheck",
|
||||||
|
# 'p'=>array('token'), 'r'=>array('status', 'url', 'metafile', 'faultString')),
|
||||||
|
'p'=>array('token'), 'r'=>array('status', 'url', 'tmpfile')),
|
||||||
|
"createBackupClose" => array('m'=>"locstor.createBackupClose",
|
||||||
|
'p'=>array('token'), 'r'=>array('status')),
|
||||||
|
"restoreBackupOpen" => array('m'=>"locstor.restoreBackupOpen",
|
||||||
|
'p'=>array('sessid', 'filename'), 'r'=>array('token')),
|
||||||
|
"restoreBackupCheck" => array('m'=>"locstor.restoreBackupCheck",
|
||||||
|
'p'=>array('token'), 'r'=>array('status', 'faultString')),
|
||||||
|
"restoreBackupClose" => array('m'=>"locstor.restoreBackupClose",
|
||||||
|
'p'=>array('token'), 'r'=>array('status')),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
"uploadToArchive" => array('m'=>"locstor.uploadToArchive",
|
"uploadToArchive" => array('m'=>"locstor.uploadToArchive",
|
||||||
'p'=>array('sessid', 'gunid'), 'r'=>'trtok'),
|
'p'=>array('sessid', 'gunid'), 'r'=>'trtok'),
|
||||||
|
|
Loading…
Reference in New Issue