Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93662424
DiffusionRepositoryURIsIndexEngineExtension.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 30, 13:17
Size
808 B
Mime Type
text/x-php
Expires
Mon, Dec 2, 13:17 (1 d, 19 h)
Engine
blob
Format
Raw Data
Handle
22680757
Attached To
rPH Phabricator
DiffusionRepositoryURIsIndexEngineExtension.php
View Options
<?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
();
}
}
Event Timeline
Log In to Comment