Index: trunk/extensions/SocialProfile/UserStats/EditCount.php |
— | — | @@ -10,12 +10,12 @@ |
11 | 11 | $wgHooks['NewRevisionFromEditComplete'][] = 'incEditCount'; |
12 | 12 | |
13 | 13 | function incEditCount( $article, $revision, $baseRevId ) { |
14 | | - global $wgUser, $wgTitle, $wgNamespacesForEditPoints; |
| 14 | + global $wgUser, $wgNamespacesForEditPoints; |
15 | 15 | |
16 | 16 | // only keep tally for allowable namespaces |
17 | 17 | if ( |
18 | 18 | !is_array( $wgNamespacesForEditPoints ) || |
19 | | - in_array( $wgTitle->getNamespace(), $wgNamespacesForEditPoints ) |
| 19 | + in_array( $article->getTitle()->getNamespace(), $wgNamespacesForEditPoints ) |
20 | 20 | ) { |
21 | 21 | $stats = new UserStatsTrack( $wgUser->getID(), $wgUser->getName() ); |
22 | 22 | $stats->incStatField( 'edit' ); |
— | — | @@ -27,12 +27,12 @@ |
28 | 28 | $wgHooks['ArticleDelete'][] = 'removeDeletedEdits'; |
29 | 29 | |
30 | 30 | function removeDeletedEdits( &$article, &$user, &$reason ) { |
31 | | - global $wgTitle, $wgNamespacesForEditPoints; |
| 31 | + global $wgNamespacesForEditPoints; |
32 | 32 | |
33 | 33 | // only keep tally for allowable namespaces |
34 | 34 | if ( |
35 | 35 | !is_array( $wgNamespacesForEditPoints ) || |
36 | | - in_array( $wgTitle->getNamespace(), $wgNamespacesForEditPoints ) |
| 36 | + in_array( $article->getTitle()->getNamespace(), $wgNamespacesForEditPoints ) |
37 | 37 | ) { |
38 | 38 | $dbr = wfGetDB( DB_MASTER ); |
39 | 39 | $res = $dbr->select( |