/**
* Get/create the delete token.
*
* @param boolean $create Create token if it doesn't exist?
*
* @return string The delete token, or null if it doesn't exist.
*/
protected function _getDeleteToken($create = false)
{
$md = $this->_atc->getMetadata();
if (is_null($md->dtoken)) {
if (!$create) {
return null;
}
$md->dtoken = strval(new Horde_Support_Uuid());
try {
$this->_atc->saveMetadata($md);
} catch (Exception $e) {
}
}
return $md->dtoken;
}