Page MenuHomeWickedGov Phorge

RecentAdditionsMessageGroup.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

RecentAdditionsMessageGroup.php

<?php
/**
* This file contains an unmanaged message group implementation.
*
* @file
* @author Niklas Laxström
* @copyright Copyright © 2012-2013, Niklas Laxström
* @license GPL-2.0-or-later
*/
use MediaWiki\Context\IContextSource;
use MediaWiki\Extension\Translate\SystemUsers\FuzzyBot;
use MediaWiki\MediaWikiServices;
use MediaWiki\RecentChanges\RecentChange;
/**
* @since 2012-11-01
* @ingroup MessageGroup
*/
class RecentAdditionsMessageGroup extends RecentMessageGroup {
/** @inheritDoc */
public function getId() {
return '!additions';
}
/** @inheritDoc */
public function getLabel( ?IContextSource $context = null ) {
$msg = wfMessage( 'translate-dynagroup-additions-label' );
$msg = self::addContext( $msg, $context );
return $msg->plain();
}
/** @inheritDoc */
public function getDescription( ?IContextSource $context = null ) {
$msg = wfMessage( 'translate-dynagroup-additions-desc' );
$msg = self::addContext( $msg, $context );
return $msg->plain();
}
protected function getQueryConditions(): array {
global $wgTranslateMessageNamespaces;
$db = MediaWikiServices::getInstance()->getDBLoadBalancer()->getConnection( DB_REPLICA );
return [
'rc_title ' . $db->buildLike( $db->anyString(), '/en' ),
'rc_namespace' => $wgTranslateMessageNamespaces,
$db->expr( 'rc_source', '!=', RecentChange::SRC_LOG ),
'rc_id > ' . $this->getRCCutoff(),
'rc_actor' => FuzzyBot::getUser()->getActorId()
];
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, Oct 3, 07:41 (1 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
55/01/dbcb8c03d7a5e05d3f93f40e0032
Default Alt Text
RecentAdditionsMessageGroup.php (1 KB)

Event Timeline