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