Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/242193

Change subject: Make default appeal configurable
......................................................................

Make default appeal configurable

Not hardcoded to Appeal-default

Change-Id: I6d0ea951f8c7d566f85323c40a21a56cb913d418
---
M DonationInterface.php
M gateway_forms/Mustache.php
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/93/242193/1

diff --git a/DonationInterface.php b/DonationInterface.php
index 8115b2b..91991d1 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -145,6 +145,8 @@
  * $appeal and $language will be substituted before transclusion
  */
 $wgDonationInterfaceAppealWikiTemplate = 
'LanguageSwitch|2011FR/$appeal/text|$language';
+// Used as the value for $appeal when nothing is given in query string
+$wgDonationInterfaceDefaultAppeal = 'JimmyQuote';
 
 // Email address used when donor enters nothing
 $wgDonationInterfaceDefaultEmail = 'nob...@wikimedia.org';
diff --git a/gateway_forms/Mustache.php b/gateway_forms/Mustache.php
index b632039..ad5dbad 100644
--- a/gateway_forms/Mustache.php
+++ b/gateway_forms/Mustache.php
@@ -85,7 +85,8 @@
                $data['has_no_script_redirect'] = isset( $redirect ); // grr
 
                $appealWikiTemplate = $this->gateway->getGlobal( 
'AppealWikiTemplate' );
-               $appeal = $this->make_safe( $request->getText( 'appeal', 
'Appeal-default' ) );
+               $defaultAppeal = $this->gateway->getGlobal( 'DefaultAppeal' );
+               $appeal = $this->make_safe( $request->getText( 'appeal', 
$defaultAppeal ) );
                $appealWikiTemplate = str_replace( '$appeal', $appeal, 
$appealWikiTemplate );
                $appealWikiTemplate = str_replace( '$language', 
$data['language'], $appealWikiTemplate );
                $data['appeal_text'] = $output->parse( '{{' . 
$appealWikiTemplate . '}}' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d0ea951f8c7d566f85323c40a21a56cb913d418
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

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

Reply via email to