Differential D15206 Diff 36708 src/applications/project/editor/PhabricatorProjectTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/editor/PhabricatorProjectTransactionEditor.php
Show First 20 Lines • Show All 625 Lines • ▼ Show 20 Lines | foreach ($xactions as $xaction) { | ||||
case PhabricatorTransactions::TYPE_EDGE: | case PhabricatorTransactions::TYPE_EDGE: | ||||
switch ($xaction->getMetadataValue('edge:type')) { | switch ($xaction->getMetadataValue('edge:type')) { | ||||
case PhabricatorProjectProjectHasMemberEdgeType::EDGECONST: | case PhabricatorProjectProjectHasMemberEdgeType::EDGECONST: | ||||
$materialize = true; | $materialize = true; | ||||
break; | break; | ||||
} | } | ||||
break; | break; | ||||
case PhabricatorProjectTransaction::TYPE_PARENT: | case PhabricatorProjectTransaction::TYPE_PARENT: | ||||
case PhabricatorProjectTransaction::TYPE_MILESTONE: | |||||
$materialize = true; | $materialize = true; | ||||
$new_parent = $object->getParentProject(); | $new_parent = $object->getParentProject(); | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
if ($new_parent) { | if ($new_parent) { | ||||
// If we just created the first subproject of this parent, we want to | // If we just created the first subproject of this parent, we want to | ||||
Show All 22 Lines | protected function applyFinalEffects( | ||||
// TODO: We should dump an informational transaction onto the parent | // TODO: We should dump an informational transaction onto the parent | ||||
// project to show that we created the sub-thing. | // project to show that we created the sub-thing. | ||||
if ($materialize) { | if ($materialize) { | ||||
id(new PhabricatorProjectsMembershipIndexEngineExtension()) | id(new PhabricatorProjectsMembershipIndexEngineExtension()) | ||||
->rematerialize($object); | ->rematerialize($object); | ||||
} | } | ||||
if ($new_parent) { | |||||
id(new PhabricatorProjectsMembershipIndexEngineExtension()) | |||||
->rematerialize($new_parent); | |||||
} | |||||
return parent::applyFinalEffects($object, $xactions); | return parent::applyFinalEffects($object, $xactions); | ||||
} | } | ||||
private function addSlug(PhabricatorProject $project, $slug, $force) { | private function addSlug(PhabricatorProject $project, $slug, $force) { | ||||
$slug = PhabricatorSlug::normalizeProjectSlug($slug); | $slug = PhabricatorSlug::normalizeProjectSlug($slug); | ||||
$table = new PhabricatorProjectSlug(); | $table = new PhabricatorProjectSlug(); | ||||
$project_phid = $project->getPHID(); | $project_phid = $project->getPHID(); | ||||
▲ Show 20 Lines • Show All 179 Lines • Show Last 20 Lines |