Minor - fixing PHP warning.
Adding group filter when deleting a doc see BT#7870