#1698 resetStorage return structure updated

This commit is contained in:
tomash 2006-06-19 22:15:19 +00:00
parent efe9be1741
commit f0c3ed37d0

View file

@ -1711,7 +1711,7 @@ class BasicStor extends Alib{
$tr->resetData(); $tr->resetData();
} }
$res = array( $res = array(
'audioclips'=>array(), 'playlists'=>array(), 'webstreams'=>array() 'cnt'=>0, 'results'=>array(),
); );
if(!$loadSampleData) return $res; if(!$loadSampleData) return $res;
$rootHD = $this->getObjId('root', $this->storId); $rootHD = $this->getObjId('root', $this->storId);
@ -1740,9 +1740,14 @@ class BasicStor extends Alib{
$media, $xml, $gunid, $type $media, $xml, $gunid, $type
); );
if(PEAR::isError($r)){ return $r; } if(PEAR::isError($r)){ return $r; }
$res["{$type}s"][] = $this->_gunidFromId($r); #$gunid = $this->_gunidFromId($r);
#$res['results'][] = array('gunid' => $gunid, 'type' => $type);
#$res['cnt']++;
} }
return $res; return $this->bsLocalSearch(
array('filetype'=>'all', 'conditions'=>array())
);
#return $res;
} }
/** /**