Index: trunk/extensions/ArticleFeedback/SpecialArticleFeedback.php |
— | — | @@ -96,7 +96,8 @@ |
97 | 97 | $rows = array(); |
98 | 98 | foreach ( $this->getDailyHighsAndLows() as $page ) { |
99 | 99 | $row = array(); |
100 | | - $row['page'] = $page['page']; |
| 100 | + $pageTitle = Title::newFromText( $page['page'] ); |
| 101 | + $row['page'] = Linker::link( $pageTitle, $pageTitle->getPrefixedText() ); |
101 | 102 | foreach ( $page['ratings'] as $id => $value ) { |
102 | 103 | $row['rating-' . $id] = $value; |
103 | 104 | } |
— | — | @@ -126,7 +127,8 @@ |
127 | 128 | $rows = array(); |
128 | 129 | foreach ( $this->getWeeklyMostChanged() as $page ) { |
129 | 130 | $row = array(); |
130 | | - $row['page'] = $page['page']; |
| 131 | + $pageTitle = Title::newFromText( $page['page'] ); |
| 132 | + $row['page'] = Linker::link( $pageTitle, $pageTitle->getPrefixedText() ); |
131 | 133 | foreach ( $page['changes'] as $id => $value ) { |
132 | 134 | $row['rating-' . $id] = $value; |
133 | 135 | } |
— | — | @@ -154,7 +156,8 @@ |
155 | 157 | $rows = array(); |
156 | 158 | foreach ( $this->getRecentLows() as $page ) { |
157 | 159 | $row = array(); |
158 | | - $row['page'] = $page['page']; |
| 160 | + $pageTitle = Title::newFromText( $page['page'] ); |
| 161 | + $row['page'] = Linker::link( $pageTitle, $pageTitle->getPrefixedText() ); |
159 | 162 | foreach ( $wgArticleFeedbackRatings as $category ) { |
160 | 163 | $row[] = array( |
161 | 164 | 'attr' => in_array( $category, $page['categories'] ) |
— | — | @@ -196,13 +199,23 @@ |
197 | 200 | array( |
198 | 201 | 'page' => 'Main Page', |
199 | 202 | // List of ratings as the currently stand |
200 | | - 'ratings' => array( 1 => 4, 2 => 3, 3 => 2, 4 => 1 ), |
| 203 | + 'ratings' => array( |
| 204 | + 1 => 4, |
| 205 | + 2 => 3, |
| 206 | + 3 => 2, |
| 207 | + 4 => 1, |
| 208 | + ), |
201 | 209 | // Current average (considering historic averages of each rating) |
202 | 210 | 'average' => 2.5 |
203 | 211 | ), |
204 | 212 | array( |
205 | 213 | 'page' => 'Test Article', |
206 | | - 'ratings' => array( 1 => 1, 2 => 2, 3 => 3, 4 => 4 ), |
| 214 | + 'ratings' => array( |
| 215 | + 1 => 1, |
| 216 | + 2 => 2, |
| 217 | + 3 => 3, |
| 218 | + 4 => 4, |
| 219 | + ), |
207 | 220 | 'average' => 2.5 |
208 | 221 | ) |
209 | 222 | ); |
— | — | @@ -222,11 +235,21 @@ |
223 | 236 | array( |
224 | 237 | 'page' => 'Main Page', |
225 | 238 | // List of differences for each rating in the past 7 days |
226 | | - 'changes' => array( 1 => 1, 2 => -2, 3 => 0, 4 => 0 ), |
| 239 | + 'changes' => array( |
| 240 | + 1 => 1, |
| 241 | + 2 => 2, |
| 242 | + 3 => 0, |
| 243 | + 4 => 0, |
| 244 | + ), |
227 | 245 | ), |
228 | 246 | array( |
229 | 247 | 'page' => 'Test Article', |
230 | | - 'changes' => array( 1 => 0, 2 => 0, 3 => 1, 4 => 2 ), |
| 248 | + 'changes' => array( |
| 249 | + 1 => 0, |
| 250 | + 2 => 0, |
| 251 | + 3 => 1, |
| 252 | + 4 => 2, |
| 253 | + ), |
231 | 254 | ) |
232 | 255 | ); |
233 | 256 | } |
Index: trunk/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.startup.js |
— | — | @@ -6,11 +6,12 @@ |
7 | 7 | if ( |
8 | 8 | // Main namespace articles |
9 | 9 | mw.config.get( 'wgNamespaceNumber' ) === 0 |
| 10 | + // Existing pages |
| 11 | + && mw.config.get( 'wgArticleId', 0 ) > 0 |
10 | 12 | // View pages |
11 | | - && mw.config.get( 'wgAction' ) === 'view' |
| 13 | + && ( mw.config.get( 'wgAction' ) == 'view' || mw.config.get( 'wgAction' ) == 'view' ) |
12 | 14 | // Current revision |
13 | | - && mw.util.getParamValue( 'diff' ) === null |
14 | | - && mw.util.getParamValue( 'oldid' ) === null |
| 15 | + && ( mw.util.getParamValue( 'diff' ) == null && mw.util.getParamValue( 'oldid' ) == null ) |
15 | 16 | ) { |
16 | 17 | var trackingBucket = mw.user.bucket( |
17 | 18 | 'ext.articleFeedback-tracking', mw.config.get( 'wgArticleFeedbackTracking' ) |