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

Change subject: Insert new proposals against the currently active campaign
......................................................................


Insert new proposals against the currently active campaign

Bug:T90605
Change-Id: I3fc93b091d9f6a10b3270c34f40a31346c47eb6e
---
M src/App.php
M src/Controllers/Proposals/Edit.php
2 files changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/src/App.php b/src/App.php
index 7fa5ecb..cbd434f 100644
--- a/src/App.php
+++ b/src/App.php
@@ -225,6 +225,12 @@
                        );
                } );
 
+               // Fetch ID of currently active campaign
+               $container->singleton( 'activeCampaign', function ( $c ) {
+                       $campaign = $c->campaignsDao->activeCampaign();
+                       return $campaign['id'];
+               } );
+
                // Replace default logger with monolog
                $container->singleton( 'log', function ( $c ) {
                        // Convert string level to Monolog integer value
diff --git a/src/Controllers/Proposals/Edit.php 
b/src/Controllers/Proposals/Edit.php
index fb1d824..de94f1e 100644
--- a/src/Controllers/Proposals/Edit.php
+++ b/src/Controllers/Proposals/Edit.php
@@ -99,6 +99,7 @@
                                'amount' => $this->form->get( 'amount' ),
                                'theme' => $this->form->get( 'theme' ),
                                'notes' => $this->form->get( 'notes' ),
+                               'campaign' => $this->activeCampaign
                        );
 
                        if ( is_numeric( $id ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3fc93b091d9f6a10b3270c34f40a31346c47eb6e
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/iegreview
Gerrit-Branch: master
Gerrit-Owner: Niharika29 <niharikakohl...@gmail.com>
Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to