Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/contentsource/PhabricatorUnknownContentSource.php
<?php | <?php | ||||
final class PhabricatorUnknownContentSource | final class PhabricatorUnknownContentSource | ||||
extends PhabricatorContentSource { | extends PhabricatorContentSource { | ||||
const SOURCECONST = 'unknown'; | const SOURCECONST = 'unknown'; | ||||
public function getSourceName() { | public function getSourceName() { | ||||
$source = $this->getSource(); | $source = $this->getSource(); | ||||
if (strlen($source)) { | if ($source !== null && strlen($source)) { | ||||
return pht('Unknown ("%s")', $source); | return pht('Unknown ("%s")', $source); | ||||
} else { | } else { | ||||
return pht('Unknown'); | return pht('Unknown'); | ||||
} | } | ||||
} | } | ||||
public function getSourceDescription() { | public function getSourceDescription() { | ||||
return pht('Content with no known source.'); | return pht('Content with no known source.'); | ||||
} | } | ||||
} | } |