Index: trunk/phase3/includes/SpecialValidate.php |
— | — | @@ -325,7 +325,16 @@ |
326 | 326 | $html .= "</table>\n" ; |
327 | 327 | return $html ; |
328 | 328 | } |
329 | | - |
| 329 | + |
| 330 | + function countUserValidations ( $userid ) |
| 331 | + { |
| 332 | + $sql = "SELECT count(DISTINCT val_title) AS num FROM validate WHERE val_user={$userid}" ; |
| 333 | + $res = wfQuery( $sql, DB_READ ); |
| 334 | + if ( $s = wfFetchObject( $res ) ) $num = $s->num ; |
| 335 | + else $num = 0 ; |
| 336 | + return $num ; |
| 337 | + } |
| 338 | + |
330 | 339 | } |
331 | 340 | |
332 | 341 | function wfSpecialValidate( $page = "" ) |
Index: trunk/phase3/includes/SpecialContributions.php |
— | — | @@ -142,6 +142,12 @@ |
143 | 143 | ucListEdit( $sk, $ns, $t, $ts, $topmark, $comment, ( $me > 0), $isnew, $usertext ); |
144 | 144 | } |
145 | 145 | $wgOut->addHTML( "</ul>\n" ); |
| 146 | + |
| 147 | + # Validations |
| 148 | + $val = new Validation ; |
| 149 | + $val = $val->countUserValidations ( $id ) ; |
| 150 | + $val = str_replace ( "$1" , $val , wfMsg ( 'val_user_validations' ) ) ; |
| 151 | + $wgOut->addHTML( $val ); |
146 | 152 | } |
147 | 153 | |
148 | 154 | |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -1280,6 +1280,7 @@ |
1281 | 1281 | 'val_stat_link_text' => 'Validation statistics for this article', |
1282 | 1282 | 'val_view_version' => 'View this version', |
1283 | 1283 | 'val_validate_version' => 'Validate this version', |
| 1284 | +'val_user_validations' => 'This user has validated $1 pages.', |
1284 | 1285 | |
1285 | 1286 | # Move page |
1286 | 1287 | # |