jenkins-bot has submitted this change and it was merged.

Change subject: Pass context to HTMLForm, don't use HTMLForm::setTitle
......................................................................


Pass context to HTMLForm, don't use HTMLForm::setTitle

Change-Id: I5d6539bb316c82e4e1f0b09ce03265d02000bc76
---
M SpecialCommunityHiring.php
1 file changed, 18 insertions(+), 19 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/SpecialCommunityHiring.php b/SpecialCommunityHiring.php
index 7c67ada..77e783c 100644
--- a/SpecialCommunityHiring.php
+++ b/SpecialCommunityHiring.php
@@ -4,10 +4,10 @@
        function __construct() {
                parent::__construct( 'CommunityHiring' );
        }
-       
+
        function execute( $par ) {
                $this->getOutput()->setPageTitle( $this->msg( 
'communityhiring-header' ) );
-               
+
                $formDescriptor = array(
                        'about-intro' => array(
                                'type' => 'info',
@@ -62,7 +62,7 @@
                                'section' => 'aboutyou',
                                'validation-callback' => array( $this, 
'validateRequired' ),
                        ),
-                       
+
                        // Pararaph answers
                        'paragraph-intro' => array(
                                'type' => 'info',
@@ -103,7 +103,7 @@
                                'rows' => 10,
                                'vertical-label' => 1,
                        ),
-                       
+
                        // Demonstrative info
                        'languages' => array(
                                'type' => 'textarea',
@@ -114,7 +114,7 @@
                                'vertical-label' => 1,
                                'validation-callback' => array( $this, 
'validateRequired' ),
                        ),
-                       
+
                        'contributor' => array(
                                'type' => 'radio',
                                'label-message' => 
'communityhiring-contributor',
@@ -148,7 +148,7 @@
                                'cols' => '20',
                                'vertical-label' => 1,
                        ),
-                       
+
                        // Availability
                        'availability-time' => array(
                                'type' => 'text',
@@ -176,7 +176,7 @@
                                                'It would be hard, but maybe I 
would' => 'maybe'
                                                ),
                        ),
-                       
+
                        // Quick research question
                        'research' => array(
                                'type' => 'textarea',
@@ -186,37 +186,36 @@
                                'validation-callback' => array( $this, 
'validateRequired' ),
                        ),
                );
-               
-               $form = new HTMLForm( $formDescriptor, 'communityhiring' );
-               
+
+               $form = new HTMLForm( $formDescriptor, $this->getContext(), 
'communityhiring' );
+
                $form->setIntro( $this->msg( 'communityhiring-intro' 
)->parseAsBlock() );
                $form->setSubmitCallback( array( $this, 'submit' ) );
-               $form->setTitle( $this->getPageTitle() );
-               
+
                $form->show();
        }
-       
+
        function submit( $info ) {
                global $wgCommunityHiringDatabase;
-               
+
                $dbw = wfGetDB( DB_MASTER, array(), $wgCommunityHiringDatabase 
);
-               
+
                $dbw->insert( 'community_hiring_application',
                                array( 'ch_data' => json_encode($info),
                                        'ch_ip' => wfGetIP(),
                                        'ch_timestamp' => wfTimestampNow(TS_DB) 
),
                                __METHOD__ );
-                               
+
                $this->getOutput()->addWikiMsg( 'communityhiring-done' );
-               
+
                return true;
        }
-       
+
        function validateRequired( $input ) {
                if (!$input) {
                        return $this->msg( 'communityhiring-field-required' 
)->parse();
                }
-               
+
                return true;
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/105957
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d6539bb316c82e4e1f0b09ce03265d02000bc76
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CommunityHiring
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: IAlex <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: PleaseStand <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to