TTMServerMessageUpdateJob.php

Go to the documentation of this file.
00001 <?php
00016 class TTMServerMessageUpdateJob extends Job {
00021     public static function newJob( MessageHandle $handle ) {
00022         $job = new self( $handle->getTitle() );
00023 
00024         return $job;
00025     }
00026 
00027     function __construct( $title, $params = array(), $id = 0 ) {
00028         parent::__construct( __CLASS__, $title, $params, $id );
00029     }
00030 
00034     function run() {
00035         $handle = new MessageHandle( $this->title );
00036         $translations = ApiQueryMessageTranslations::getTranslations( $handle );
00037         foreach ( $translations as $page => $data ) {
00038             $tTitle = Title::makeTitle( $this->title->getNamespace(), $page );
00039             $tHandle = new MessageHandle( $tTitle );
00040             TTMServer::onChange( $tHandle, $data[0], $tHandle->isFuzzy() );
00041         }
00042 
00043         return true;
00044     }
00045 }
Generated on Tue Oct 29 00:00:25 2013 for MediaWiki Translate Extension by  doxygen 1.6.3