Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F450359
DiffusionRepositoryURIsIndexEngineExtension.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
808 B
Referenced Files
None
Subscribers
None
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
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 4, 8:34 PM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
67767
Default Alt Text
DiffusionRepositoryURIsIndexEngineExtension.php (808 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment