return $this->mAddress != "";
}
- function updateTimestamp() {
-
- $this->mTimestamp = wfTimestampNow();
- $this->mExpiry = Block::getAutoblockExpiry( $this->mTimestamp );
-
- wfQuery( "UPDATE ipblocks SET " .
- "ipb_timestamp='" . $this->mTimestamp . "', " .
- "ipb_expiry='" . $this->mExpiry . "' " .
- "WHERE ipb_address='" . wfStrencode( $this->mAddress ) . "'", DB_WRITE, "Block::updateTimestamp" );
-
- $this->clearCache();
+ function updateTimestamp()
+ {
+ if ( $this->mAuto ) {
+ $this->mTimestamp = wfTimestampNow();
+ $this->mExpiry = Block::getAutoblockExpiry( $this->mTimestamp );
+
+ wfQuery( "UPDATE ipblocks SET " .
+ "ipb_timestamp='" . $this->mTimestamp . "', " .
+ "ipb_expiry='" . $this->mExpiry . "' " .
+ "WHERE ipb_address='" . wfStrencode( $this->mAddress ) . "'", DB_WRITE, "Block::updateTimestamp" );
+
+ $this->clearCache();
+ }
}
/* private */ function clearCache()