r95004 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95003‎ | r95004 | r95005 >
Date:15:03, 19 August 2011
Author:yuvipanda
Status:deferred
Tags:
Comment:
Removed unneccessary param to AssessmentsExtractor
Modified paths:
  • /trunk/extensions/GPoC/AssessmentsExtractor.php (modified) (history)
  • /trunk/extensions/GPoC/GPoC.hooks.php (modified) (history)
  • /trunk/extensions/GPoC/templates/FilterRatingsTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GPoC/GPoC.hooks.php
@@ -47,7 +47,7 @@
4848 if( $title->getNamespace() == NS_TALK && $revision ) {
4949 // All conditions to minimize the situations we've to run the job to update the data
5050 $preparedText = $article->prepareTextForEdit( $text )->output->getText();
51 - $extractor = new AssessmentsExtractor( $article, $preparedText );
 51+ $extractor = new AssessmentsExtractor( $preparedText );
5252 $assessments = $extractor->extractAssessments();
5353 GPoCHooks::updateDatabase( $title, $assessments, $revision );
5454 }
Index: trunk/extensions/GPoC/AssessmentsExtractor.php
@@ -5,12 +5,10 @@
66 **/
77 class AssessmentsExtractor
88 {
9 - private $mArticle;
109 private $mText;
1110
12 - function __construct( $article, $preparedText ) {
 11+ function __construct( $preparedText ) {
1312 $this->mText = $preparedText;
14 - $this->mArticle = $article;
1513 }
1614
1715 public function extractAssessments() {
Index: trunk/extensions/GPoC/templates/FilterRatingsTemplate.php
@@ -59,7 +59,7 @@
6060 selection: selection
6161 }, function(raw_data) {
6262 var data = $.parseJSON(raw_data);
63 - $("#notice").html("Added to selection <a href='" + data.selection_url + "'>" + selection + "</a>");
 63+ $("#notice").hide().html("Added to selection <a href='" + data.selection_url + "'>" + selection + "</a>").fadeIn();
6464 });
6565 return false;
6666 });

Status & tagging log