1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42:41 +01:00

Correct transaction strengths after inconsitent scaling by 100 vs 1000

Summary:
See D20540. I mistakenly multiplied some strenghts by 100 and others by 1000 when converting them to integers for `PhutilSortVector`.

Multiply them all by 100 (that is, divide the ones which were multiplied by 1000 by 10) to put things back the way they were.

Test Plan: quick mafs

Reviewers: amckinley, richardvanvelzen

Reviewed By: richardvanvelzen

Differential Revision: https://secure.phabricator.com/D20622
This commit is contained in:
epriestley 2019-06-26 06:57:09 -07:00
parent 987e104610
commit 159fd44203

View file

@ -1375,16 +1375,16 @@ abstract class PhabricatorApplicationTransaction
public function getActionStrength() {
if ($this->isInlineCommentTransaction()) {
return 250;
return 25;
}
switch ($this->getTransactionType()) {
case PhabricatorTransactions::TYPE_COMMENT:
return 500;
return 50;
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
if ($this->isSelfSubscription()) {
// Make this weaker than TYPE_COMMENT.
return 250;
return 25;
}
if ($this->isApplicationAuthor()) {
@ -1396,14 +1396,14 @@ abstract class PhabricatorApplicationTransaction
// In other cases, subscriptions are more interesting than comments
// (which are shown anyway) but less interesting than any other type of
// transaction.
return 750;
return 75;
case PhabricatorTransactions::TYPE_MFA:
// We want MFA signatures to render at the top of transaction groups,
// on top of the things they signed.
return 10000;
return 1000;
}
return 1000;
return 100;
}
public function isCommentTransaction() {