2011-08-14 20:29:56 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class DifferentialHostFieldSpecification
|
|
|
|
extends DifferentialFieldSpecification {
|
|
|
|
|
|
|
|
public function shouldAppearOnRevisionView() {
|
2012-08-16 07:35:45 +02:00
|
|
|
return PhabricatorEnv::getEnvConfig('differential.show-host-field');
|
2011-08-14 20:29:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function renderLabelForRevisionView() {
|
|
|
|
return 'Host:';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function renderValueForRevisionView() {
|
2012-08-18 02:46:16 +02:00
|
|
|
$diff = $this->getManualDiff();
|
2011-08-14 20:29:56 +02:00
|
|
|
$host = $diff->getSourceMachine();
|
|
|
|
if (!$host) {
|
|
|
|
return null;
|
|
|
|
}
|
2013-01-29 20:01:47 +01:00
|
|
|
return $host;
|
2011-08-14 20:29:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|