#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->setEnviroment();
|
||||
if (is_file($this->statusFile)) {
|
||||
$r = array();
|
||||
$stat = file_get_contents($this->statusFile);
|
||||
if (strpos($stat,'fault|') !== false) {
|
||||
list($stat,$message) = explode('|',$stat);
|
||||
|
@ -119,7 +120,7 @@ class Restore {
|
|||
if ($stat=='fault') {
|
||||
$r['faultString'] = $message;
|
||||
}
|
||||
$r['token'] = $token;
|
||||
// $r['token'] = $token;
|
||||
return $r;
|
||||
} else {
|
||||
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:
|
||||
* <ul>
|
||||
* <li> status : hasharray - fields:
|
||||
* token: string - restore token
|
||||
* status: string - working | fault | success
|
||||
* faultString: string - description of fault</li>
|
||||
* <li> status : string - success | working | fault</li>
|
||||
* <li> faultString: string - description of fault</li>
|
||||
* </ul>
|
||||
*
|
||||
* On errors, returns an XML-RPC error response.
|
||||
|
@ -2017,9 +2015,10 @@ class XR_LocStor extends LocStor{
|
|||
" ".$res->getUserInfo()
|
||||
);
|
||||
}
|
||||
return new XML_RPC_Response(XML_RPC_encode(array(
|
||||
'status'=>$res,
|
||||
)));
|
||||
# return new XML_RPC_Response(XML_RPC_encode(array(
|
||||
# 'status'=>$res,
|
||||
# )));
|
||||
return new XML_RPC_Response(XML_RPC_encode($res));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2063,9 +2062,10 @@ class XR_LocStor extends LocStor{
|
|||
" ".$res->getUserInfo()
|
||||
);
|
||||
}
|
||||
return new XML_RPC_Response(XML_RPC_encode(array(
|
||||
'gunid'=>$res,
|
||||
)));
|
||||
# return new XML_RPC_Response(XML_RPC_encode(array(
|
||||
# 'gunid'=>$res,
|
||||
# )));
|
||||
return new XML_RPC_Response(XML_RPC_encode($res));
|
||||
}
|
||||
|
||||
/*========================================================== info methods */
|
||||
|
|
|
@ -146,13 +146,6 @@ $infos = array(
|
|||
"renderPlaylistToRSSClose" => array('m'=>"locstor.renderPlaylistToRSSClose",
|
||||
'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",
|
||||
'p'=>array('sessid', 'key'), 'r'=>'value'),
|
||||
"savePref" => array('m'=>"locstor.savePref",
|
||||
|
@ -186,6 +179,20 @@ $infos = array(
|
|||
"getSearchResults" => array('m'=>"locstor.getSearchResults",
|
||||
'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",
|
||||
'p'=>array('sessid', 'gunid'), 'r'=>'trtok'),
|
||||
|
|
Loading…
Reference in New Issue