resources; if (is_string($resources)) { $resources = array($resources); } foreach ($resources as $key => $res) { if ($res == $rid) { unset($resources[$key]); $collection->resources = $resources; $collection->needs_update = 1; $collection->save(); //updateCollectionTags($collection); setResourceStat($rid, 'collection', '-'); } } } forward("pg/waramu/edit_collection/".$collection_id); ?>