Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1428513
createMessageIndex.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
createMessageIndex.php
View Options
<?php
/**
* Creates a database of keys in all groups, so that namespace and key can be
* used to get the group they belong to. This is used as a fallback when there
* is no other way to know which message group a message belongs to.
*
* @author Niklas Laxström
* @license GPL-2.0-or-later
* @file
*/
use
MediaWiki\Extension\Translate\MessageGroupProcessing\MessageGroups
;
use
MediaWiki\Extension\Translate\Services
;
// Standard boilerplate to define $IP
if
(
getenv
(
'MW_INSTALL_PATH'
)
!==
false
)
{
$IP
=
getenv
(
'MW_INSTALL_PATH'
);
}
else
{
$dir
=
__DIR__
;
$IP
=
"$dir/../../.."
;
}
require_once
"$IP/maintenance/Maintenance.php"
;
class
CreateMessageIndex
extends
Maintenance
{
public
function
__construct
()
{
parent
::
__construct
();
$this
->
addDescription
(
'Creates or updates a message index.'
);
$this
->
requireExtension
(
'Translate'
);
}
public
function
execute
()
{
MessageGroups
::
singleton
()->
recache
();
Services
::
getInstance
()->
getMessageIndex
()->
rebuild
();
}
}
$maintClass
=
CreateMessageIndex
::
class
;
require_once
RUN_MAINTENANCE_IF_MAIN
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 16:20 (13 h, 43 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f9/3d/7bed4b712d41e272945cf2fec229
Default Alt Text
createMessageIndex.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment