function diasalsa_content_expunge(&$pObject) { global $gBitSystem; if ($gBitSystem->isPackageActive('diasalsa')) { if ($pObject->isValid()) { // unlink action if it exists $action = new SalsaAction(); if ($action_content_id = $action->getActionLink($pObject->mContentId)) { $action = new SalsaAction(NULL, $action_content_id); $action->load(); $action->mDb->StartTrans(); $action->expungeContentLink($pObject->mContentId); $action->mDb->CompleteTrans(); } } } }