Differential D15174 Diff 36642 src/applications/project/storage/PhabricatorProjectColumnPosition.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/storage/PhabricatorProjectColumnPosition.php
Show All 35 Lines | final class PhabricatorProjectColumnPosition extends PhabricatorProjectDAO | ||||
} | } | ||||
public function attachColumn(PhabricatorProjectColumn $column) { | public function attachColumn(PhabricatorProjectColumn $column) { | ||||
$this->column = $column; | $this->column = $column; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getOrderingKey() { | public function getOrderingKey() { | ||||
if (!$this->getID()) { | |||||
return 0; | |||||
} | |||||
// Low sequence numbers go above high sequence numbers. | // Low sequence numbers go above high sequence numbers. | ||||
// High position IDs go above low position IDs. | // High position IDs go above low position IDs. | ||||
// Broadly, this makes newly added stuff float to the top. | // Broadly, this makes newly added stuff float to the top. | ||||
return sprintf( | return sprintf( | ||||
'~%012d%012d', | '~%012d%012d', | ||||
$this->getSequence(), | $this->getSequence(), | ||||
((1 << 31) - $this->getID())); | ((1 << 31) - $this->getID())); | ||||
Show All 26 Lines |