Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
808 B · 34 lines
PHP
1234567891011121314151617181920212223242526272829303132333435<?php
final class DiffusionRepositoryURIsIndexEngineExtension extends PhabricatorIndexEngineExtension {
const EXTENSIONKEY = 'diffusion.repositories.uri';
public function getExtensionName() { return pht('Repository URIs'); }
public function shouldIndexObject($object) { return ($object instanceof PhabricatorRepository); }
public function indexObject( PhabricatorIndexEngine $engine, $object) {
// Reload the repository to pick up URIs, which we need in order to update // the URI index. $object = id(new PhabricatorRepositoryQuery()) ->setViewer(PhabricatorUser::getOmnipotentUser()) ->withPHIDs(array($object->getPHID())) ->needURIs(true) ->executeOne(); if (!$object) { return; }
$object->updateURIIndex(); }
}