#1661 dummy return value fixed
This commit is contained in:
parent
d80fc758ba
commit
c12f102b7b
2 changed files with 21 additions and 1 deletions
|
@ -3122,9 +3122,27 @@ class XR_LocStor extends LocStor{
|
|||
function xr_getSearchResults($input) {
|
||||
list($ok, $r) = $this->_xr_getPars($input);
|
||||
if(!$ok) return $r;
|
||||
// DUMMY
|
||||
$trtok = $r['trtok'];
|
||||
if($trtok != '123456789abcdefe'){
|
||||
$res = PEAR::raiseError(
|
||||
"Transport::getSearchResults:".
|
||||
" invalid transport token ($trtok)", TRERR_TOK
|
||||
);
|
||||
}
|
||||
$res = array(
|
||||
'audioClipResults' => array('0000000000010001', '0000000000010002'),
|
||||
'audioClipCnt' => 2,
|
||||
'webstreamResults' => array(),
|
||||
'webstreamCnt' => 0,
|
||||
'playlistResults' => array('0000000000000001'),
|
||||
'playlistCnt' => 1,
|
||||
);
|
||||
/*
|
||||
require_once '../Transport.php';
|
||||
$tr =& new Transport($this);
|
||||
$res = $tr->getSearchResults($r['trtok']); // *** search results format differs between GB and XML_RPC ifaces
|
||||
*/
|
||||
if(PEAR::isError($res)){
|
||||
$ec0 = intval($res->getCode());
|
||||
$ec = (
|
||||
|
|
|
@ -206,7 +206,7 @@ $infos = array(
|
|||
"globalSearch" => array('m'=>"locstor.globalSearch",
|
||||
'p'=>array('sessid', 'criteria'), 'r'=>array('trtok')),
|
||||
"getSearchResults" => array('m'=>"locstor.getSearchResults",
|
||||
'p'=>array('trtok'), 'r'=>array()),
|
||||
'p'=>array('trtok')),
|
||||
|
||||
/*
|
||||
"uploadToArchive" => array('m'=>"locstor.uploadToArchive",
|
||||
|
@ -222,6 +222,7 @@ $infos = array(
|
|||
|
||||
switch($method){
|
||||
case"searchMetadata":
|
||||
case"globalSearch":
|
||||
case"createBackupOpen":
|
||||
$parr = array(
|
||||
'sessid'=>$pars[0],
|
||||
|
@ -314,6 +315,7 @@ if(isset($infos[$method]['r'])){
|
|||
}else{
|
||||
switch($method){
|
||||
case"searchMetadata":
|
||||
case"getSearchResults":
|
||||
echo
|
||||
"AC({$resp['audioClipCnt']}): ".
|
||||
join(", ", $resp['audioClipResults']).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue