r105241 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105240‎ | r105241 | r105242 >
Date:23:02, 5 December 2011
Author:krinkle
Status:ok (Comments)
Tags:
Comment:
[HarvardResearch][CentralNotice] Fix wgNoticeBanner_Harvard2011
* Since we're using memcached directly now instead of session, adapt to this (proper global and no-cache is false instead of null)
* Follows-up r105239
Modified paths:
  • /trunk/extensions/CentralNotice/CentralNotice.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/CentralNotice.php
@@ -247,7 +247,7 @@
248248 */
249249 function efCentralNoticeDefaults( &$vars ) {
250250 // Using global $wgUser for compatibility with 1.18
251 - global $wgNoticeProject, $wgUser, $wgRequest;
 251+ global $wgNoticeProject, $wgUser, $wgMemc;
252252
253253 // Initialize global Javascript variables. We initialize Geo with empty values so if the geo
254254 // IP lookup fails we don't have any surprises.
@@ -264,7 +264,7 @@
265265 $data = $wgMemc->get( $cacheKey );
266266
267267 // Cached ?
268 - if ( is_null( $data ) ) {
 268+ if ( !$data ) {
269269 /**
270270 * To be eligible, the user must match all of the following:
271271 * - have an account

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r105239[HarvardResearch][CentralNotice] Temporary wgNoticeBanner_Harvard2011 data....krinkle22:54, 5 December 2011

Comments

#Comment by Krinkle (talk | contribs)   23:04, 5 December 2011

Requires r104622, r104622

Status & tagging log