Niharika29 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/195039
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(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/iegreview
refs/changes/39/195039/1
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: newchange
Gerrit-Change-Id: I3fc93b091d9f6a10b3270c34f40a31346c47eb6e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/iegreview
Gerrit-Branch: master
Gerrit-Owner: Niharika29 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits