Perform a permission check on the title when changing the page language
[lhc/web/wiklou.git] / includes / specials / SpecialEmailInvalidate.php
index b5c66ff..c54abad 100644 (file)
@@ -39,12 +39,15 @@ class EmailInvalidation extends UnlistedSpecialPage {
        function execute( $code ) {
                // Ignore things like master queries/connections on GET requests.
                // It's very convenient to just allow formless link usage.
-               Profiler::instance()->getTransactionProfiler()->resetExpectations();
+               $trxProfiler = Profiler::instance()->getTransactionProfiler();
 
                $this->setHeaders();
                $this->checkReadOnly();
                $this->checkPermissions();
+
+               $old = $trxProfiler->setSilenced( true );
                $this->attemptInvalidate( $code );
+               $trxProfiler->setSilenced( $old );
        }
 
        /**
@@ -53,7 +56,7 @@ class EmailInvalidation extends UnlistedSpecialPage {
         *
         * @param string $code Confirmation code
         */
-       function attemptInvalidate( $code ) {
+       private function attemptInvalidate( $code ) {
                $user = User::newFromConfirmationCode( $code, User::READ_LATEST );
                if ( !is_object( $user ) ) {
                        $this->getOutput()->addWikiMsg( 'confirmemail_invalid' );