- if ( !$wgUser->isAllowed( 'purge' ) )
- $this->dieUsageMsg( array( 'cantpurge' ) );
- if ( !isset( $params['titles'] ) )
- $this->dieUsageMsg( array( 'missingparam', 'titles' ) );
+ if ( !$wgUser->isAllowed( 'purge' ) && !$this->getMain()->isInternalMode() &&
+ !$this->getMain()->getRequest()->wasPosted() ) {
+ $this->dieUsageMsg( array( 'mustbeposted', $this->getModuleName() ) );
+ }