Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js |
— | — | @@ -179,6 +179,8 @@ |
180 | 180 | * When a next-page load is requested, it appends the new responses; on a |
181 | 181 | * sort or filter change, the existing responses are removed from the view |
182 | 182 | * and replaced. |
| 183 | + * |
| 184 | + * @param resetContents bool whether to remove the existing responses |
183 | 185 | */ |
184 | 186 | $.articleFeedbackv5special.loadFeedback = function ( resetContents ) { |
185 | 187 | $.ajax( { |
Index: trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php |
— | — | @@ -1,9 +1,33 @@ |
2 | 2 | <?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 | + */ |
3 | 18 | class SpecialArticleFeedbackv5 extends SpecialPage { |
| 19 | + |
| 20 | + /** |
| 21 | + * Constructor |
| 22 | + */ |
4 | 23 | public function __construct() { |
5 | 24 | parent::__construct( 'ArticleFeedbackv5' ); |
6 | 25 | } |
7 | 26 | |
| 27 | + /** |
| 28 | + * Executes the special page |
| 29 | + * |
| 30 | + * @param $param string the parameter passed in the url |
| 31 | + */ |
8 | 32 | public function execute( $param ) { |
9 | 33 | $out = $this->getOutput(); |
10 | 34 | $title = Title::newFromText( $param ); |
— | — | @@ -103,18 +127,23 @@ |
104 | 128 | * Takes an associative array of label to value and converts the message |
105 | 129 | * names into localized strings |
106 | 130 | * |
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 |
109 | 133 | */ |
110 | 134 | private function selectMsg( array $options ) { |
111 | 135 | $newOpts = array(); |
112 | 136 | foreach ( $options as $label => $value ) { |
113 | 137 | $newOpts[$this->msg( $label )->escaped()] = $value; |
114 | 138 | } |
115 | | - |
116 | 139 | return $newOpts; |
117 | 140 | } |
118 | 141 | |
| 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 | + */ |
119 | 148 | private function fetchOverallRating( $pageId ) { |
120 | 149 | $rv = array(); |
121 | 150 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -144,4 +173,6 @@ |
145 | 174 | |
146 | 175 | return $rv; |
147 | 176 | } |
| 177 | + |
148 | 178 | } |
| 179 | + |