Page MenuHomeWickedGov Phorge

purgeSeen.php
No OneTemporary

Size
989 B
Referenced Files
None
Subscribers
None

purgeSeen.php

<?php
namespace LoginNotify\Maintenance;
use LoginNotify\LoginNotify;
use MediaWiki\Maintenance\Maintenance;
// @codeCoverageIgnoreStart
$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) {
$IP = __DIR__ . '/../../..';
}
require_once "$IP/maintenance/Maintenance.php";
// @codeCoverageIgnoreEnd
class PurgeSeen extends Maintenance {
public function __construct() {
parent::__construct();
$this->addDescription( 'Purge expired user IP address information stored by LoginNotify' );
}
public function execute() {
$loginNotify = $this->getLoginNotify();
$minId = $loginNotify->getMinExpiredId();
for ( ; $minId !== null; $this->waitForReplication() ) {
$minId = $loginNotify->purgeSeen( $minId );
}
}
private function getLoginNotify(): LoginNotify {
return $this->getServiceContainer()->getService( 'LoginNotify.LoginNotify' );
}
}
// @codeCoverageIgnoreStart
$maintClass = PurgeSeen::class;
require_once RUN_MAINTENANCE_IF_MAIN;
// @codeCoverageIgnoreEnd

File Metadata

Mime Type
text/x-php
Expires
Oct 5 2026, 04:48 (6 w, 7 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c6/1e/afd6939026aa37cfe2047cc7b2b7
Default Alt Text
purgeSeen.php (989 B)

Event Timeline