r108277 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108276‎ | r108277 | r108278 >
Date:20:11, 6 January 2012
Author:rsterbin
Status:ok
Tags:
Comment:
Doc block comments for Special page; fixed a missing @return in one of the js doc blocks
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
@@ -179,6 +179,8 @@
180180 * When a next-page load is requested, it appends the new responses; on a
181181 * sort or filter change, the existing responses are removed from the view
182182 * and replaced.
 183+ *
 184+ * @param resetContents bool whether to remove the existing responses
183185 */
184186 $.articleFeedbackv5special.loadFeedback = function ( resetContents ) {
185187 $.ajax( {
Index: trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php
@@ -1,9 +1,33 @@
22 <?php
 3+/**
 4+ * SpecialArticleFeedbackv5 class
 5+ *
 6+ * @package ArticleFeedback
 7+ * @subpackage Special
 8+ * @author Greg Chiasson <gchiasson@omniti.com>
 9+ * @version $Id$
 10+ */
 11+
 12+/**
 13+ * This is the Special page the shows the feedback dashboard
 14+ *
 15+ * @package ArticleFeedback
 16+ * @subpackage Special
 17+ */
318 class SpecialArticleFeedbackv5 extends SpecialPage {
 19+
 20+ /**
 21+ * Constructor
 22+ */
423 public function __construct() {
524 parent::__construct( 'ArticleFeedbackv5' );
625 }
726
 27+ /**
 28+ * Executes the special page
 29+ *
 30+ * @param $param string the parameter passed in the url
 31+ */
832 public function execute( $param ) {
933 $out = $this->getOutput();
1034 $title = Title::newFromText( $param );
@@ -103,18 +127,23 @@
104128 * Takes an associative array of label to value and converts the message
105129 * names into localized strings
106130 *
107 - * @param array $options
108 - * @return array
 131+ * @param $options array the options, indexed by label
 132+ * @return array the options, indexed by localized and escaped text
109133 */
110134 private function selectMsg( array $options ) {
111135 $newOpts = array();
112136 foreach ( $options as $label => $value ) {
113137 $newOpts[$this->msg( $label )->escaped()] = $value;
114138 }
115 -
116139 return $newOpts;
117140 }
118141
 142+ /**
 143+ * Grabs the overall rating for a page
 144+ *
 145+ * @param $pageId int the page id
 146+ * @return array the overall rating, as array (found => %, rating => avg)
 147+ */
119148 private function fetchOverallRating( $pageId ) {
120149 $rv = array();
121150 $dbr = wfGetDB( DB_SLAVE );
@@ -144,4 +173,6 @@
145174
146175 return $rv;
147176 }
 177+
148178 }
 179+

Status & tagging log