function execute( $par = null ) { global $wgOut, $wgRequest, $wgUser; $this->setHeaders(); if ( $wgUser->isAllowed( 'sigadmin' ) ) { $this->mDocumentId = (int) $wgRequest->getVal( 'doc', null ); if ( $this->mDocumentId && !is_null( $wgRequest->getVal( 'viewsigs' ) ) ) { $tmp = new SignatureViewer(); $tmp->execute(); return; } if ( $this->mDocumentId == null ) $this->showSelectDocument(); elseif ( !$wgRequest->wasPosted() ) { $this->mCurrentSig = SignDocumentSignature::newBasic(); $this->showSignForm(); } else { $this->dealWithPost(); } } else { $wgOut->permissionRequired( 'sigadmin' ); } }