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