| 1 | <?php |
| 2 | |
| 3 | namespace LoginNotify; |
| 4 | |
| 5 | use MediaWiki\Title\Title; |
| 6 | |
| 7 | class PurgeSeenJob extends \Job { |
| 8 | private LoginNotify $loginNotify; |
| 9 | |
| 10 | public function __construct( Title $title, array $params, LoginNotify $loginNotify ) { |
| 11 | parent::__construct( 'LoginNotifyPurgeSeen', $title, $params ); |
| 12 | $this->loginNotify = $loginNotify; |
| 13 | } |
| 14 | |
| 15 | public function run() { |
| 16 | $minId = $this->getParams()['minId']; |
| 17 | $this->loginNotify->purgeSeen( $minId ); |
| 18 | return true; |
| 19 | } |
| 20 | } |