Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phriction/editor/PhrictionTransactionEditor.php
Show First 20 Lines • Show All 446 Lines • ▼ Show 20 Lines | final class PhrictionTransactionEditor | ||||
public function validateAncestry( | public function validateAncestry( | ||||
PhabricatorLiskDAO $object, | PhabricatorLiskDAO $object, | ||||
$type, | $type, | ||||
PhabricatorApplicationTransaction $xaction, | PhabricatorApplicationTransaction $xaction, | ||||
$verb) { | $verb) { | ||||
$errors = array(); | $errors = array(); | ||||
// NOTE: We use the ominpotent user for these checks because policy | // NOTE: We use the omnipotent user for these checks because policy | ||||
// doesn't matter; existence does. | // doesn't matter; existence does. | ||||
$other_doc_viewer = PhabricatorUser::getOmnipotentUser(); | $other_doc_viewer = PhabricatorUser::getOmnipotentUser(); | ||||
$ancestral_slugs = PhabricatorSlug::getAncestry($object->getSlug()); | $ancestral_slugs = PhabricatorSlug::getAncestry($object->getSlug()); | ||||
if ($ancestral_slugs) { | if ($ancestral_slugs) { | ||||
$ancestors = id(new PhrictionDocumentQuery()) | $ancestors = id(new PhrictionDocumentQuery()) | ||||
->setViewer($other_doc_viewer) | ->setViewer($other_doc_viewer) | ||||
->withSlugs($ancestral_slugs) | ->withSlugs($ancestral_slugs) | ||||
->execute(); | ->execute(); | ||||
▲ Show 20 Lines • Show All 158 Lines • Show Last 20 Lines |