r72611 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72610‎ | r72611 | r72612 >
Date:21:41, 8 September 2010
Author:kaldari
Status:resolved (Comments)
Tags:
Comment:
fixing html comments and wfMemc per comments at r72177
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialBannerLoader.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialBannerLoader.php
@@ -35,12 +35,12 @@
3636 $content = $this->getHtmlNotice( $bannerName, $standAlone );
3737 if ( strlen( $content ) == 0 ) {
3838 // Hack for IE/Mac 0-length keepalive problem, see RawPage.php
39 - echo "/* Empty */";
 39+ echo "<!-- Empty -->";
4040 } else {
4141 echo $content;
4242 }
4343 } else {
44 - echo "/* No banner specified */";
 44+ echo "<!-- No banner specified -->";
4545 }
4646 }
4747
@@ -146,7 +146,7 @@
147147 private function getDonationAmount() {
148148 global $wgNoticeCounterSource, $wgMemc;
149149 // Pull short-cached amount
150 - $count = intval( $wgMemc->get( 'centralnotice:counter' ) );
 150+ $count = intval( wfMemcKey( 'centralnotice', 'counter' ) );
151151 if ( !$count ) {
152152 // Pull from dynamic counter
153153 wfSuppressWarnings();
@@ -154,7 +154,7 @@
155155 wfRestoreWarnings();
156156 if ( !$count ) {
157157 // Pull long-cached amount
158 - $count = intval( $wgMemc->get( 'centralnotice:counter:fallback' ) );
 158+ $count = intval( wfMemcKey( 'centralnotice', 'counter', 'fallback' ) );
159159 if ( !$count ) {
160160 // Return hard-coded amount if all else fails
161161 return 1100000; // Update as needed during fundraiser

Follow-up revisions

RevisionCommit summaryAuthorDate
r72992fixing memc call for set methods per comment at r72611kaldari16:49, 14 September 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72177initial version of BannerLoaderkaldari23:18, 1 September 2010

Comments

#Comment by Nikerabbit (talk | contribs)   15:25, 9 September 2010

You still want to keep $wgMemc->get()

#Comment by Ryan Kaldari (WMF) (talk | contribs)   17:59, 9 September 2010

Ah, got it! Still learning my way around the memcache code :) fixed in r72666 (I hope).

#Comment by Catrope (talk | contribs)   15:03, 14 September 2010

Doesn't handle the set() calls.

#Comment by Kaldari (talk | contribs)   16:50, 14 September 2010

fixed in r72992.

Status & tagging log