From 56a2a82c0f2ec17833c829cbe0364f399c1cceb3 Mon Sep 17 00:00:00 2001 From: addshore Date: Thu, 6 Aug 2015 18:53:50 +0100 Subject: [PATCH] Remove use of deprecated wfRunHooks Change-Id: I4035e65662a7e8c82d68f8559a6634a81eea674c --- ContactPage_body.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ContactPage_body.php b/ContactPage_body.php index 721b9b0..c0b524a 100644 --- a/ContactPage_body.php +++ b/ContactPage_body.php @@ -223,7 +223,7 @@ class SpecialContact extends UnlistedSpecialPage { $form->loadData(); // Stolen from Special:EmailUser - if ( !wfRunHooks( 'EmailUserForm', array( &$form ) ) ) { + if ( !Hooks::run( 'EmailUserForm', array( &$form ) ) ) { return; } @@ -407,11 +407,11 @@ class SpecialContact extends UnlistedSpecialPage { // Stolen from Special:EmailUser $error = ''; - if ( !wfRunHooks( 'EmailUser', array( &$contactRecipientAddress, &$senderAddress, &$subject, &$text, &$error ) ) ) { + if ( !Hooks::run( 'EmailUser', array( &$contactRecipientAddress, &$senderAddress, &$subject, &$text, &$error ) ) ) { return $error; } - if( !wfRunHooks( 'ContactForm', array( &$contactRecipientAddress, &$replyTo, &$subject, &$text, $this->formType, $formData ) ) ) { + if( !Hooks::run( 'ContactForm', array( &$contactRecipientAddress, &$replyTo, &$subject, &$text, $this->formType, $formData ) ) ) { return false; // TODO: Need to do some proper error handling here } @@ -430,7 +430,7 @@ class SpecialContact extends UnlistedSpecialPage { // unless they are emailing themselves, in which case one copy of the message is sufficient. if( $formData['CCme'] && $fromAddress ) { $cc_subject = wfMessage( 'emailccsubject', $contactRecipientUser->getName(), $subject )->text(); - if( wfRunHooks( 'ContactForm', + if( Hooks::run( 'ContactForm', array( &$senderAddress, &$contactSender, &$cc_subject, &$text, $this->formType, $formData ) ) ) { wfDebug( __METHOD__ . ': sending cc mail from ' . $contactSender->toString() . @@ -448,7 +448,7 @@ class SpecialContact extends UnlistedSpecialPage { } } - wfRunHooks( 'ContactFromComplete', array( $contactRecipientAddress, $replyTo, $subject, $text ) ); + Hooks::run( 'ContactFromComplete', array( $contactRecipientAddress, $replyTo, $subject, $text ) ); return true; }