getItems(); $ids = array_keys($items); $qstr = "?resourceId=".implode('&resourceId=', $ids); setResourceStat($rid, "url"); foreach ($ids as $i) setResourceStat($i, "url"); $w = waramu_get(); $idef = $w->Identify(); $bu = $idef['identity'][0]['baseweburl'][0][0]; $url = $bu."multidownload".$qstr; forward($url); } else { if ( $aid ) { $w = waramu_get(); $idef = $w->Identify(); $bu = $idef['identity'][0]['baseweburl'][0][0]; $url = $bu."downloader?resourceId=".$rid."&attachmentId=".$aid; setResourceStat($rid, "url"); forward($url); } else { $obj = waramu_getResource('', $rid); if ( $obj ) { $url = $obj->getURL(); if ( $url ) { setResourceStat($rid, 'url'); return header("Location: {$url}"); } } else { //print " viga "; } } } } ?>