Index: trunk/extensions/LiquidThreads/classes/SynchroniseThreadArticleDataJob.php |
— | — | @@ -0,0 +1,25 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +class SynchroniseThreadArticleDataJob extends Job { |
| 5 | + |
| 6 | + public function __construct( $title, $params ) { |
| 7 | + parent::__construct( 'synchroniseThreadArticleData', $title, $params ); |
| 8 | + } |
| 9 | + |
| 10 | + /** |
| 11 | + * Execute the job |
| 12 | + * |
| 13 | + * @return bool |
| 14 | + */ |
| 15 | + public function run() { |
| 16 | + $article = new Article( $this->title ); |
| 17 | + $limit = $this->params['limit']; |
| 18 | + $cascade = $this->params['cascade']; |
| 19 | + |
| 20 | + if ($article) |
| 21 | + Threads::synchroniseArticleData( $article, $limit, $cascade ); |
| 22 | + |
| 23 | + return true; |
| 24 | + } |
| 25 | + |
| 26 | +} |