Changeset View
Changeset View
Standalone View
Standalone View
resources/sql/patches/20130703.legalpaddocdenorm.php
Show All 18 Lines | if (!$document->getTitle()) { | ||||
echo "Added title: $title\n"; | echo "Added title: $title\n"; | ||||
} else { | } else { | ||||
echo "-\n"; | echo "-\n"; | ||||
} | } | ||||
if (!$document->getContributorCount() || | if (!$document->getContributorCount() || | ||||
!$document->getRecentContributorPHIDs()) { | !$document->getRecentContributorPHIDs()) { | ||||
$updated = true; | $updated = true; | ||||
$type = PhabricatorEdgeConfig::TYPE_OBJECT_HAS_CONTRIBUTOR; | $type = PhabricatorObjectHasContributorEdgeType::EDGECONST; | ||||
$contributors = PhabricatorEdgeQuery::loadDestinationPHIDs( | $contributors = PhabricatorEdgeQuery::loadDestinationPHIDs( | ||||
$document->getPHID(), | $document->getPHID(), | ||||
$type); | $type); | ||||
$document->setRecentContributorPHIDs(array_slice($contributors, 0, 3)); | $document->setRecentContributorPHIDs(array_slice($contributors, 0, 3)); | ||||
echo "Added recent contributor phids.\n"; | echo "Added recent contributor phids.\n"; | ||||
$document->setContributorCount(count($contributors)); | $document->setContributorCount(count($contributors)); | ||||
echo "Added contributor count.\n"; | echo "Added contributor count.\n"; | ||||
} | } | ||||
Show All 11 Lines |