Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2892369
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
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 @@
<?php
abstract class AlmanacManagementWorkflow
extends PhabricatorManagementWorkflow {
protected function loadServices(array $names) {
if (!$names) {
return array();
}
$services = id(new AlmanacServiceQuery())
->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 @@
<?php
final class AlmanacServiceTransaction
extends AlmanacTransaction {
const TYPE_NAME = 'almanac:service:name';
- const TYPE_LOCK = 'almanac:service:lock';
public function getApplicationTransactionType() {
return AlmanacServicePHIDType::TYPECONST;
}
public function getTitle() {
$author_phid = $this->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();
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jan 19, 16:42 (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126586
Default Alt Text
(3 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment