private static function _deleteListingBySID($listing_sid) { SJB_Event::dispatch('beforeListingDelete', $listing_sid); $gallery = SJB_ObjectMother::createListingGallery(); $gallery->setListingSID($listing_sid); $gallery->deleteImages(); SJB_UploadFileManager::deleteUploadedFilesByListingSID($listing_sid); SJB_CommentManager::deleteCommentsToListing($listing_sid); SJB_ListingManager::deleteListingIDFromSendedNotificationsTable($listing_sid); //delete listing keywords SJB_ListingDBManager::deleteListingKeywords($listing_sid); SJB_Cache::getInstance()->clean('matchingAnyTag', array(SJB_Cache::TAG_LISTINGS)); SJB_ListingDBManager::deleteListingBySID($listing_sid); }