diff --git a/src/applications/draft/storage/PhabricatorVersionedDraft.php b/src/applications/draft/storage/PhabricatorVersionedDraft.php index 0daf13e8c5..58cdb67599 100644 --- a/src/applications/draft/storage/PhabricatorVersionedDraft.php +++ b/src/applications/draft/storage/PhabricatorVersionedDraft.php @@ -80,20 +80,17 @@ final class PhabricatorVersionedDraft extends PhabricatorDraftDAO { public static function purgeDrafts( $object_phid, - $viewer_phid, - $version) { + $viewer_phid) { $draft = new PhabricatorVersionedDraft(); $conn_w = $draft->establishConnection('w'); queryfx( $conn_w, - 'DELETE FROM %T WHERE objectPHID = %s AND authorPHID = %s - AND version <= %d', + 'DELETE FROM %T WHERE objectPHID = %s AND authorPHID = %s', $draft->getTableName(), $object_phid, - $viewer_phid, - $version); + $viewer_phid); } } diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php index ea3b987568..ea171a421c 100644 --- a/src/applications/transactions/editengine/PhabricatorEditEngine.php +++ b/src/applications/transactions/editengine/PhabricatorEditEngine.php @@ -1985,8 +1985,7 @@ abstract class PhabricatorEditEngine if (!$is_preview) { PhabricatorVersionedDraft::purgeDrafts( $object->getPHID(), - $viewer->getPHID(), - $this->loadDraftVersion($object)); + $viewer->getPHID()); $draft_engine = $this->newDraftEngine($object); if ($draft_engine) {