mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-22 20:51:10 +01:00
Rename the Differential "hasBroadcast" flag to "shouldBroadcast"
Summary: Depends on D19282. Ref T13110. I want to introduce "Changes Planned + Still A Draft" and "Abandoned + Still A Draft" states, at a minimum. I think the "hasBroadcast" flag is effectively identical to a hypothetical "stillADraft" flag, so rename it to "shouldBroadcast" to better match its intended behavior. This just changes labels, not any behavior. Test Plan: Grepped for `hasBroadcast` and `HAS_BROADCAST`. Maniphest Tasks: T13110 Differential Revision: https://secure.phabricator.com/D19283
This commit is contained in:
parent
f350b9e464
commit
3b5a7d1c88
2 changed files with 9 additions and 7 deletions
|
@ -1597,13 +1597,13 @@ final class DifferentialTransactionEditor
|
|||
$was_draft = $this->wasDraft;
|
||||
|
||||
if (!$object->isDraft() && ($was_draft || $is_new)) {
|
||||
if (!$object->getHasBroadcast()) {
|
||||
if (!$object->getShouldBroadcast()) {
|
||||
// Mark this as the first broadcast we're sending about the revision
|
||||
// so mail can generate specially.
|
||||
$this->firstBroadcast = true;
|
||||
|
||||
$object
|
||||
->setHasBroadcast(true)
|
||||
->setShouldBroadcast(true)
|
||||
->save();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ final class DifferentialRevision extends DifferentialDAO
|
|||
|
||||
const PROPERTY_CLOSED_FROM_ACCEPTED = 'wasAcceptedBeforeClose';
|
||||
const PROPERTY_DRAFT_HOLD = 'draft.hold';
|
||||
const PROPERTY_HAS_BROADCAST = 'draft.broadcast';
|
||||
const PROPERTY_SHOULD_BROADCAST = 'draft.broadcast';
|
||||
const PROPERTY_LINES_ADDED = 'lines.added';
|
||||
const PROPERTY_LINES_REMOVED = 'lines.removed';
|
||||
const PROPERTY_BUILDABLES = 'buildables';
|
||||
|
@ -717,12 +717,14 @@ final class DifferentialRevision extends DifferentialDAO
|
|||
return $this->setProperty(self::PROPERTY_DRAFT_HOLD, $hold);
|
||||
}
|
||||
|
||||
public function getHasBroadcast() {
|
||||
return $this->getProperty(self::PROPERTY_HAS_BROADCAST, false);
|
||||
public function getShouldBroadcast() {
|
||||
return $this->getProperty(self::PROPERTY_SHOULD_BROADCAST, false);
|
||||
}
|
||||
|
||||
public function setHasBroadcast($has_broadcast) {
|
||||
return $this->setProperty(self::PROPERTY_HAS_BROADCAST, $has_broadcast);
|
||||
public function setShouldBroadcast($should_broadcast) {
|
||||
return $this->setProperty(
|
||||
self::PROPERTY_SHOULD_BROADCAST,
|
||||
$should_broadcast);
|
||||
}
|
||||
|
||||
public function setAddedLineCount($count) {
|
||||
|
|
Loading…
Reference in a new issue