RecentAdditionsMessageGroup.php

Go to the documentation of this file.
00001 <?php
00015 class RecentAdditionsMessageGroup extends RecentMessageGroup {
00016     protected $groupInfoCache = array();
00017 
00018     public function getId() {
00019         return '!additions';
00020     }
00021 
00022     public function getLabel( IContextSource $context = null ) {
00023         $msg = wfMessage( 'translate-dynagroup-additions-label' );
00024         $msg = self::addContext( $msg, $context );
00025 
00026         return $msg->plain();
00027     }
00028 
00029     public function getDescription( IContextSource $context = null ) {
00030         $msg = wfMessage( 'translate-dynagroup-additions-desc' );
00031         $msg = self::addContext( $msg, $context );
00032 
00033         return $msg->plain();
00034     }
00035 
00036     protected function getQueryConditions() {
00037         global $wgTranslateMessageNamespaces;
00038         $db = wfGetDB( DB_SLAVE );
00039         $conds = array(
00040             'rc_title ' . $db->buildLike( $db->anyString(), '/en' ),
00041             'rc_namespace' => $wgTranslateMessageNamespaces,
00042             'rc_type != ' . RC_LOG,
00043             'rc_id > ' . $this->getRCCutoff(),
00044             'rc_user' => FuzzyBot::getUser()->getId(),
00045         );
00046 
00047         return $conds;
00048     }
00049 
00058     protected function matchingMessage( MessageHandle $handle ) {
00059         return MessageGroups::isTranslatableMessage( $handle );
00060     }
00061 }
Generated on Tue Oct 29 00:00:24 2013 for MediaWiki Translate Extension by  doxygen 1.6.3