r103828 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103827‎ | r103828 | r103829 >
Date:19:46, 21 November 2011
Author:petrb
Status:ok
Tags:
Comment:
improved check for timestamp
Modified paths:
  • /trunk/extensions/InteractiveBlockMessage/InteractiveBlockMessageHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/InteractiveBlockMessage/InteractiveBlockMessageHooks.php
@@ -52,7 +52,7 @@
5353 // so we enable cache for shorter time only so that we can recheck later
5454 // if they weren't already unblocked - if there is a better way to do that, fix me
5555 $expiry = $user->getBlock()->mExpiry;
56 - if ( $expiry != 'infinityinfinity' ) { // this definitely needs fix :P
 56+ if ( is_numeric ($expiry) ) {
5757 $expiry = wfTimestamp( TS_UNIX, $expiry ) - wfTimestamp( TS_UNIX );
5858 if ( $expiry > 0 ) {
5959 // just to make sure

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r103809Introduced cache time and yes that comparison of infinity time really suck ho...petrb14:11, 21 November 2011

Status & tagging log