Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5952396
PopulateSiteStatsTask.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
847 B
Referenced Files
None
Subscribers
None
PopulateSiteStatsTask.php
View Options
<?php
namespace
MediaWiki\Installer\Task
;
use
MediaWiki\Status\Status
;
/**
* Insert an initial row into the site_stats table
*
* @internal For use by the installer
*/
class
PopulateSiteStatsTask
extends
Task
{
public
function
getName
()
{
return
'stats'
;
}
public
function
getDependencies
()
{
return
'tables'
;
}
public
function
execute
():
Status
{
$status
=
$this
->
getConnection
(
ITaskContext
::
CONN_CREATE_TABLES
);
if
(
!
$status
->
isOK
()
)
{
return
$status
;
}
$status
->
getDB
()->
newInsertQueryBuilder
()
->
insertInto
(
'site_stats'
)
->
ignore
()
->
row
(
[
'ss_row_id'
=>
1
,
'ss_total_edits'
=>
0
,
'ss_good_articles'
=>
0
,
'ss_total_pages'
=>
0
,
'ss_users'
=>
0
,
'ss_active_users'
=>
0
,
'ss_images'
=>
0
,
]
)
->
caller
(
__METHOD__
)
->
execute
();
return
Status
::
newGood
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 3 2026, 01:26 (4 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
07/89/ab2067926b7c1e93d29462f9c7aa
Default Alt Text
PopulateSiteStatsTask.php (847 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment