Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/315838
Change subject: Move Aff|LegalContactPages to MetaContactPages ...................................................................... Move Aff|LegalContactPages to MetaContactPages Don't need two includes for one set of similar config like this Change-Id: I8feeec7c3292b44035ff0c8dafa6354b07bb34e3 --- M docroot/noc/createTxtFileSymlinks.sh D wmf-config/AffComContactPages.php M wmf-config/CommonSettings.php R wmf-config/MetaContactPages.php 4 files changed, 81 insertions(+), 81 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/38/315838/1 diff --git a/docroot/noc/createTxtFileSymlinks.sh b/docroot/noc/createTxtFileSymlinks.sh index eefbcca..30a7724 100755 --- a/docroot/noc/createTxtFileSymlinks.sh +++ b/docroot/noc/createTxtFileSymlinks.sh @@ -25,8 +25,7 @@ interwiki.php jobqueue.php jobqueue-labs.php - LegalContactPages.php - AffComContactPages.php + MetaContactPages.php liquidthreads.php logging.php logging-labs.php diff --git a/wmf-config/AffComContactPages.php b/wmf-config/AffComContactPages.php deleted file mode 100644 index b07bdaa..0000000 --- a/wmf-config/AffComContactPages.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php -/** - * Configuration for [[:meta:Special:Contact/affcomusergroup]] - * - * @see T95789 - */ - -$wgHooks['ContactForm'][] = function ( - &$to, $reply, &$subject, &$text, $par, $data -) { - if ( $par === 'affcomusergroup' ) { - $subject = "User group request: {$data['GroupName']}"; - } - return true; -}; - -$wgContactConfig['affcomusergroup'] = [ - 'RecipientUser' => 'Usergroups', - 'SenderName' => 'User group contact form on ' . $wgSitename, - 'SenderEmail' => null, - 'RequireDetails' => true, - 'IncludeIP' => false, - 'DisplayFormat' => 'vform', - 'RLStyleModules' => [ - 'ext.wikimediamessages.contactpage.affcomusergroup', - ], - 'AdditionalFields' => [ - 'GroupName' => [ - 'label-message' => 'contactpage-affcom-user-group-name-label', - 'contactpage-email-label' => 'Group name', - 'type' => 'text' - ], - 'GroupDescription' => [ - 'label-message' => 'contactpage-affcom-user-group-description-label', - 'contactpage-email-label' => 'Group description', - 'type' => 'textarea', - 'rows' => 10 - - ], - 'GroupWikiPage' => [ - 'label-message' => 'contactpage-affcom-user-group-wikipage-label', - 'contactpage-email-label' => 'Group wiki page', - 'type' => 'text' - ], - 'GroupLocation' => [ - 'label-message' => 'contactpage-affcom-user-group-location-label', - 'contactpage-email-label' => 'Group location', - 'type' => 'text' - ], - 'GroupLeaders' => [ - 'label-message' => 'contactpage-affcom-user-group-leaders-label', - 'contactpage-email-label' => 'Active Wikimedians', - 'type' => 'textarea', - 'rows' => 10 - ], - 'GroupLogo' => [ - 'label-message' => 'contactpage-affcom-user-group-logo-label', - 'contactpage-email-label' => 'Logo', - 'type' => 'radio', - 'options-messages' => [ - 'contactpage-affcom-user-group-logo-community' => 'Wikimedia community', - 'contactpage-affcom-user-group-logo-affiliate' => 'Wikipedia affiliate' - ] - ], - 'Rules' => [ - 'label-message' => 'contactpage-affcom-user-group-rules-label', - 'type' => 'info', - ], - 'Terms' => [ - 'label-message' => 'contactpage-affcom-user-group-terms-label', - 'contactpage-email-label' => 'Terms', - 'type' => 'check', - 'required' => true, - 'validation-callback' => function ( $value ) { return !!$value; } - ] - ] -]; diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 0a1dfb0..c06db61 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -982,8 +982,7 @@ $wgContactConfig['default'] = array_merge( $wgContactConfig['default'], $wmgContactPageConf ); if ( $wgDBname === 'metawiki' ) { - include( "$wmfConfigDir/LegalContactPages.php" ); - include( "$wmfConfigDir/AffComContactPages.php" ); + include( "$wmfConfigDir/MetaContactPages.php" ); $wgContactConfig['stewards'] = [ // T98625 'RecipientUser' => 'Wikimedia Stewards', 'SenderEmail' => $wmgNotificationSender, diff --git a/wmf-config/LegalContactPages.php b/wmf-config/MetaContactPages.php similarity index 63% rename from wmf-config/LegalContactPages.php rename to wmf-config/MetaContactPages.php index eca8500..e37d71c 100644 --- a/wmf-config/LegalContactPages.php +++ b/wmf-config/MetaContactPages.php @@ -1,5 +1,84 @@ <?php +/** + * Configuration for [[:meta:Special:Contact/affcomusergroup]] + * + * @see T95789 + */ +$wgHooks['ContactForm'][] = function ( + &$to, $reply, &$subject, &$text, $par, $data +) { + if ( $par === 'affcomusergroup' ) { + $subject = "User group request: {$data['GroupName']}"; + } + return true; +}; + +$wgContactConfig['affcomusergroup'] = [ + 'RecipientUser' => 'Usergroups', + 'SenderName' => 'User group contact form on ' . $wgSitename, + 'SenderEmail' => null, + 'RequireDetails' => true, + 'IncludeIP' => false, + 'DisplayFormat' => 'vform', + 'RLStyleModules' => [ + 'ext.wikimediamessages.contactpage.affcomusergroup', + ], + 'AdditionalFields' => [ + 'GroupName' => [ + 'label-message' => 'contactpage-affcom-user-group-name-label', + 'contactpage-email-label' => 'Group name', + 'type' => 'text' + ], + 'GroupDescription' => [ + 'label-message' => 'contactpage-affcom-user-group-description-label', + 'contactpage-email-label' => 'Group description', + 'type' => 'textarea', + 'rows' => 10 + + ], + 'GroupWikiPage' => [ + 'label-message' => 'contactpage-affcom-user-group-wikipage-label', + 'contactpage-email-label' => 'Group wiki page', + 'type' => 'text' + ], + 'GroupLocation' => [ + 'label-message' => 'contactpage-affcom-user-group-location-label', + 'contactpage-email-label' => 'Group location', + 'type' => 'text' + ], + 'GroupLeaders' => [ + 'label-message' => 'contactpage-affcom-user-group-leaders-label', + 'contactpage-email-label' => 'Active Wikimedians', + 'type' => 'textarea', + 'rows' => 10 + ], + 'GroupLogo' => [ + 'label-message' => 'contactpage-affcom-user-group-logo-label', + 'contactpage-email-label' => 'Logo', + 'type' => 'radio', + 'options-messages' => [ + 'contactpage-affcom-user-group-logo-community' => 'Wikimedia community', + 'contactpage-affcom-user-group-logo-affiliate' => 'Wikipedia affiliate' + ] + ], + 'Rules' => [ + 'label-message' => 'contactpage-affcom-user-group-rules-label', + 'type' => 'info', + ], + 'Terms' => [ + 'label-message' => 'contactpage-affcom-user-group-terms-label', + 'contactpage-email-label' => 'Terms', + 'type' => 'check', + 'required' => true, + 'validation-callback' => function ( $value ) { return !!$value; } + ] + ] +]; + +/** + * Configuration for legal contact forms (license stuff) + */ $trademark = [ 'type' => 'multiselect', 'options-messages' => [ -- To view, visit https://gerrit.wikimedia.org/r/315838 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8feeec7c3292b44035ff0c8dafa6354b07bb34e3 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad <ch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits