Index: trunk/extensions/EditPageTracking/EditPageTracking.php |
— | — | @@ -39,15 +39,13 @@ |
40 | 40 | * Monitors edit page usage |
41 | 41 | */ |
42 | 42 | public static function onEditForm( EditPage $editPage ) { |
43 | | - global $wgUser; |
| 43 | + global $wgUser, $wgEditPageTrackingRegistrationCutoff; |
44 | 44 | |
45 | 45 | // Anonymous users |
46 | 46 | if ( $wgUser->isAnon() ) { |
47 | 47 | return true; |
48 | 48 | } |
49 | 49 | |
50 | | - global $wgEditPageTrackingRegistrationCutoff; |
51 | | - |
52 | 50 | if ( $wgEditPageTrackingRegistrationCutoff && |
53 | 51 | $wgUser->getRegistration() < $wgEditPageTrackingRegistrationCutoff ) |
54 | 52 | { |
— | — | @@ -87,6 +85,8 @@ |
88 | 86 | * false for an anonymous user, null for a user who has never opened an edit page. |
89 | 87 | */ |
90 | 88 | public static function getFirstEditPage( $user ) { |
| 89 | + global $wgMemc; |
| 90 | + |
91 | 91 | if ( isset($user->mFirstEditPage) ) { |
92 | 92 | return $user->mFirstEditPage; |
93 | 93 | } |
— | — | @@ -95,7 +95,6 @@ |
96 | 96 | return false; |
97 | 97 | } |
98 | 98 | |
99 | | - global $wgMemc; |
100 | 99 | $cacheKey = wfMemcKey( 'first-edit-page', $user->getId() ); |
101 | 100 | $cacheVal = $wgMemc->get($cacheKey); |
102 | 101 | |