Changeset View
Changeset View
Standalone View
Standalone View
resources/sql/autopatches/20140212.dx.1.armageddon.php
Show First 20 Lines • Show All 165 Lines • ▼ Show 20 Lines | foreach ($rows as $row) { | ||||
foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
// Generate a new PHID, if we don't already have one from the comment | // Generate a new PHID, if we don't already have one from the comment | ||||
// table. We pregenerated into the comment table to make this a little | // table. We pregenerated into the comment table to make this a little | ||||
// easier, so we only need to write to one table. | // easier, so we only need to write to one table. | ||||
$xaction_phid = idx($xaction, 'phid'); | $xaction_phid = idx($xaction, 'phid'); | ||||
if (!$xaction_phid) { | if (!$xaction_phid) { | ||||
$xaction_phid = PhabricatorPHID::generateNewPHID( | $xaction_phid = PhabricatorPHID::generateNewPHID( | ||||
PhabricatorApplicationTransactionPHIDTypeTransaction::TYPECONST, | PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST, | ||||
DifferentialPHIDTypeRevision::TYPECONST); | DifferentialRevisionPHIDType::TYPECONST); | ||||
} | } | ||||
unset($xaction['phid']); | unset($xaction['phid']); | ||||
$comment_phid = null; | $comment_phid = null; | ||||
$comment_version = 0; | $comment_version = 0; | ||||
if (idx($xaction, 'comment')) { | if (idx($xaction, 'comment')) { | ||||
$comment_phid = $xaction['comment']['phid']; | $comment_phid = $xaction['comment']['phid']; | ||||
$comment_version = 1; | $comment_version = 1; | ||||
Show All 39 Lines |