r92869 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92868‎ | r92869 | r92870 >
Date:17:39, 22 July 2011
Author:werdna
Status:ok
Tags:
Comment:
Add $wgMemc global
Modified paths:
  • /trunk/extensions/EditPageTracking/EditPageTracking.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EditPageTracking/EditPageTracking.php
@@ -39,7 +39,7 @@
4040 * Monitors edit page usage
4141 */
4242 public static function onEditForm( EditPage $editPage ) {
43 - global $wgUser, $wgEditPageTrackingRegistrationCutoff;
 43+ global $wgUser, $wgEditPageTrackingRegistrationCutoff, $wgMemc;
4444
4545 // Anonymous users
4646 if ( $wgUser->isAnon() ) {
@@ -74,7 +74,7 @@
7575 $dbw->insert( 'edit_page_tracking', $row, __METHOD__ );
7676
7777 $wgUser->mFirstEditPage = $timestamp;
78 -
 78+
7979 $cacheKey = wfMemcKey( 'first-edit-page', $wgUser->getId() );
8080 $wgMemc->set($cacheKey, $timestamp, 86400);
8181

Status & tagging log