Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/phid/HeraldRulePHIDType.php
Show All 32 Lines | foreach ($handles as $phid => $handle) { | ||||
$rule = $objects[$phid]; | $rule = $objects[$phid]; | ||||
$monogram = $rule->getMonogram(); | $monogram = $rule->getMonogram(); | ||||
$name = $rule->getName(); | $name = $rule->getName(); | ||||
$handle->setName($monogram); | $handle->setName($monogram); | ||||
$handle->setFullName("{$monogram} {$name}"); | $handle->setFullName("{$monogram} {$name}"); | ||||
$handle->setURI("/{$monogram}"); | $handle->setURI("/{$monogram}"); | ||||
if ($rule->getIsDisabled()) { | |||||
$handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED); | |||||
} | |||||
} | } | ||||
} | } | ||||
public function canLoadNamedObject($name) { | public function canLoadNamedObject($name) { | ||||
return preg_match('/^H\d*[1-9]\d*$/i', $name); | return preg_match('/^H\d*[1-9]\d*$/i', $name); | ||||
} | } | ||||
public function loadNamedObjects( | public function loadNamedObjects( | ||||
Show All 25 Lines |