Translate extension for MediaWiki
Loading...
Searching...
No Matches
createMessageIndex.php
Go to the documentation of this file.
1
<?php
12
// Standard boilerplate to define $IP
13
if
( getenv(
'MW_INSTALL_PATH'
) !==
false
) {
14
$IP = getenv(
'MW_INSTALL_PATH'
);
15
}
else
{
16
$dir = __DIR__;
17
$IP =
"$dir/../../.."
;
18
}
19
require_once
"$IP/maintenance/Maintenance.php"
;
20
21
class
CreateMessageIndex
extends
Maintenance {
22
public
function
__construct() {
23
parent::__construct();
24
$this->addDescription(
'Creates or updates a message index.'
);
25
$this->requireExtension(
'Translate'
);
26
}
27
28
public
function
execute() {
29
MessageGroups::singleton()->recache();
30
MessageIndex::singleton()->rebuild();
31
}
32
}
33
34
$maintClass = CreateMessageIndex::class;
35
require_once RUN_MAINTENANCE_IF_MAIN;
CreateMessageIndex
Definition
createMessageIndex.php:21
scripts
createMessageIndex.php
Generated by
1.10.0