diff --git a/src/applications/almanac/management/AlmanacManagementWorkflow.php b/src/applications/almanac/management/AlmanacManagementWorkflow.php index 0f1dd6d773..5d466293c4 100644 --- a/src/applications/almanac/management/AlmanacManagementWorkflow.php +++ b/src/applications/almanac/management/AlmanacManagementWorkflow.php @@ -1,45 +1,29 @@ setViewer($this->getViewer()) ->withNames($names) ->execute(); $services = mpull($services, null, 'getName'); foreach ($names as $name) { if (empty($services[$name])) { throw new PhutilArgumentUsageException( pht( 'Service "%s" does not exist or could not be loaded!', $name)); } } return $services; } - protected function updateServiceLock(AlmanacService $service, $lock) { - $almanac_phid = id(new PhabricatorAlmanacApplication())->getPHID(); - - $xaction = id(new AlmanacServiceTransaction()) - ->setTransactionType(AlmanacServiceTransaction::TYPE_LOCK) - ->setNewValue((int)$lock); - - $editor = id(new AlmanacServiceEditor()) - ->setActor($this->getViewer()) - ->setActingAsPHID($almanac_phid) - ->setContentSource($this->newContentSource()) - ->setContinueOnMissingFields(true); - - $editor->applyTransactions($service, array($xaction)); - } - } diff --git a/src/applications/almanac/storage/AlmanacServiceTransaction.php b/src/applications/almanac/storage/AlmanacServiceTransaction.php index a668f860fa..d357641cb6 100644 --- a/src/applications/almanac/storage/AlmanacServiceTransaction.php +++ b/src/applications/almanac/storage/AlmanacServiceTransaction.php @@ -1,49 +1,37 @@ getAuthorPHID(); $old = $this->getOldValue(); $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_NAME: if ($old === null) { return pht( '%s created this service.', $this->renderHandleLink($author_phid)); } else { return pht( '%s renamed this service from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); } break; - case self::TYPE_LOCK: - if ($new) { - return pht( - '%s locked this service.', - $this->renderHandleLink($author_phid)); - } else { - return pht( - '%s unlocked this service.', - $this->renderHandleLink($author_phid)); - } - break; } return parent::getTitle(); } }