Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
RecentAdditionsMessageGroup.php
Go to the documentation of this file.
1<?php
11use MediaWiki\Context\IContextSource;
13use MediaWiki\MediaWikiServices;
14
20 public function getId() {
21 return '!additions';
22 }
23
24 public function getLabel( ?IContextSource $context = null ) {
25 $msg = wfMessage( 'translate-dynagroup-additions-label' );
26 $msg = self::addContext( $msg, $context );
27
28 return $msg->plain();
29 }
30
31 public function getDescription( ?IContextSource $context = null ) {
32 $msg = wfMessage( 'translate-dynagroup-additions-desc' );
33 $msg = self::addContext( $msg, $context );
34
35 return $msg->plain();
36 }
37
38 protected function getQueryConditions() {
39 global $wgTranslateMessageNamespaces;
40 $db = MediaWikiServices::getInstance()->getDBLoadBalancer()->getConnection( DB_REPLICA );
41 return [
42 'rc_title ' . $db->buildLike( $db->anyString(), '/en' ),
43 'rc_namespace' => $wgTranslateMessageNamespaces,
44 'rc_type != ' . RC_LOG,
45 'rc_id > ' . $this->getRCCutoff(),
46 'rc_actor' => FuzzyBot::getUser()->getActorId()
47 ];
48 }
49}
FuzzyBot - the misunderstood workhorse.
Definition FuzzyBot.php:15
getDescription(?IContextSource $context=null)
Returns a longer description about the group.
getQueryConditions()
Allows subclasses to partially customize the query.
getLabel(?IContextSource $context=null)