Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2890456
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/applications/repository/xaction/PhabricatorRepositoryDefaultBranchTransaction.php b/src/applications/repository/xaction/PhabricatorRepositoryDefaultBranchTransaction.php
index 23eebf60c8..949e394b91 100644
--- a/src/applications/repository/xaction/PhabricatorRepositoryDefaultBranchTransaction.php
+++ b/src/applications/repository/xaction/PhabricatorRepositoryDefaultBranchTransaction.php
@@ -1,39 +1,39 @@
<?php
final class PhabricatorRepositoryDefaultBranchTransaction
extends PhabricatorRepositoryTransactionType {
const TRANSACTIONTYPE = 'repo:default-branch';
public function generateOldValue($object) {
return $object->getDetail('default-branch');
}
public function applyInternalEffects($object, $value) {
$object->setDetail('default-branch', $value);
}
public function getTitle() {
$old = $this->getOldValue();
$new = $this->getNewValue();
- if (!strlen($new)) {
+ if (!phutil_nonempty_string($new)) {
return pht(
'%s removed %s as the default branch.',
$this->renderAuthor(),
$this->renderOldValue());
- } else if (!strlen($old)) {
+ } else if (!phutil_nonempty_string($old)) {
return pht(
'%s set the default branch to %s.',
$this->renderAuthor(),
$this->renderNewValue());
} else {
return pht(
'%s changed the default branch from %s to %s.',
$this->renderAuthor(),
$this->renderOldValue(),
$this->renderNewValue());
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jan 19, 13:37 (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1125127
Default Alt Text
(1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment