We are already tracking pageviews and with following change we should be able
to answer the following questions:
* Of the users who land on this page, what percentage of users actually
mute or unmute someone
* Of the users who mute a user, which option(s) did they check/uncheck in order
to mute/unmute the user
EventLogging Schema: https://meta.wikimedia.org/wiki/Schema:SpecialMuteSubmit
Bug: T224958
Change-Id: I655dbd999fd5d3d8f792c4f53b7cc502fe05afd5
$sp: SpecialPage object, for context
&$fields: Current HTMLForm fields descriptors
$sp: SpecialPage object, for context
&$fields: Current HTMLForm fields descriptors
+'SpecialMuteSubmit': DEPRECATED since 1.34! Used only for instrumentation on SpecialMute
+$data: Array containing information about submitted options on SpecialMute form
+
'SpecialNewpagesConditions': Called when building sql query for
Special:NewPages.
&$special: NewPagesPager object (subclass of ReverseChronologicalPager)
'SpecialNewpagesConditions': Called when building sql query for
Special:NewPages.
&$special: NewPagesPager object (subclass of ReverseChronologicalPager)
* @return bool
*/
public function onSubmit( array $data, HTMLForm $form = null ) {
* @return bool
*/
public function onSubmit( array $data, HTMLForm $form = null ) {
foreach ( $data as $userOption => $value ) {
foreach ( $data as $userOption => $value ) {
+ $hookData[$userOption]['before'] = $this->isTargetBlacklisted( $userOption );
if ( $value ) {
$this->muteTarget( $userOption );
} else {
$this->unmuteTarget( $userOption );
}
if ( $value ) {
$this->muteTarget( $userOption );
} else {
$this->unmuteTarget( $userOption );
}
+ $hookData[$userOption]['after'] = (bool)$value;
+ // NOTE: this hook is temporary
+ Hooks::run( 'SpecialMuteSubmit', [ $hookData ] );
+