$autoblock->setTarget( $autoblockIP );
$autoblock->setBlocker( $this->getBlocker() );
$autoblock->mReason = wfMsgForContent( 'autoblocker', $this->getTarget(), $this->mReason );
- $autoblock->mTimestamp = wfTimestampNow();
+ $timestamp = wfTimestampNow();
+ $autoblock->mTimestamp = $timestamp;
$autoblock->mAuto = 1;
$autoblock->prevents( 'createaccount', $this->prevents( 'createaccount' ) );
# Continue suppressing the name if needed
$dbr = wfGetDB( DB_SLAVE );
if ( $this->mTimestamp == $dbr->getInfinity() ) {
# Original block was indefinite, start an autoblock now
- $autoblock->mExpiry = Block::getAutoblockExpiry( wfTimestampNow() );
+ $autoblock->mExpiry = Block::getAutoblockExpiry( $timestamp );
} else {
# If the user is already blocked with an expiry date, we don't
# want to pile on top of that.
- $autoblock->mExpiry = min( $this->mExpiry, Block::getAutoblockExpiry( wfTimestampNow() ) );
+ $autoblock->mExpiry = min( $this->mExpiry, Block::getAutoblockExpiry( $timestamp ) );
}
# Insert the block...
* @return Boolean
*/
public function isExpired() {
- wfDebug( "Block::isExpired() checking current " . wfTimestampNow() . " vs $this->mExpiry\n" );
+ $timestamp = wfTimestampNow();
+ wfDebug( "Block::isExpired() checking current " . $timestamp . " vs $this->mExpiry\n" );
if ( !$this->mExpiry ) {
return false;
} else {
- return wfTimestampNow() > $this->mExpiry;
+ return $timestamp > $this->mExpiry;
}
}
}
// show from this onward link
- $now = $wgLang->timeanddate( wfTimestampNow(), true );
+ $timestamp = wfTimestampNow();
+ $now = $wgLang->timeanddate( $timestamp, true );
$tl = $this->makeOptionsLink(
- $now, array( 'from' => wfTimestampNow() ), $nondefaults
+ $now, array( 'from' => $timestamp ), $nondefaults
);
$rclinks = wfMsgExt( 'rclinks', array( 'parseinline', 'replaceafter' ),
$wlInfo = '';
if( $values['days'] >= 1 ) {
+ $timestamp = wfTimestampNow();
$wlInfo = wfMsgExt( 'rcnote', 'parseinline',
$wgLang->formatNum( $numRows ),
$wgLang->formatNum( $values['days'] ),
- $wgLang->timeAndDate( wfTimestampNow(), true ),
- $wgLang->date( wfTimestampNow(), true ),
- $wgLang->time( wfTimestampNow(), true )
+ $wgLang->timeAndDate( $timestamp, true ),
+ $wgLang->date( $timestamp, true ),
+ $wgLang->time( $timestamp, true )
) . '<br />';
} elseif( $values['days'] > 0 ) {
$wlInfo = wfMsgExt( 'wlnote', 'parseinline',