public function removeAllAttachments($pageId)
{
if (empty($pageId)) {
throw new Wicked_Exception('Cannot delete all attachments of all pages at once');
}
$vfs = $this->getVFS();
if (!$vfs->isFolder(Wicked::VFS_ATTACH_PATH, $pageId)) {
return;
}
try {
$vfs->deleteFolder(Wicked::VFS_ATTACH_PATH, $pageId, true);
} catch (Horde_Vfs_Exception $e) {
throw new Wicked_Exception($e);
}
}