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 (phutil_nonempty_string($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.'); | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0