getSubtype() == "collection" && $collection->canEdit()) { $resources = $collection->resources; if (is_string($resources)) $resources = array($resources); $rows_affected = $collection->delete(); if ($rows_affected > 0) { foreach ($resources as $resource) { setResourceStat($resource, 'collection', '-'); } /*translation:Collection deleted*/ system_message(elgg_echo("koolielu:collection_deleted")); } else { /*translation:Collection could not be deleted*/ register_error(elgg_echo("koolielu:collection_del_err")); } forward("pg/waramu/collections/"); } ?>