Merge "Enable users to watch category membership changes #2"
[lhc/web/wiklou.git] / includes / changes / RecentChange.php
index 3599f50..9025736 100644 (file)
@@ -324,15 +324,21 @@ class RecentChange {
                        $editor = $this->getPerformer();
                        $title = $this->getTitle();
 
-                       if ( Hooks::run( 'AbortEmailNotification', array( $editor, $title, $this ) ) ) {
-                               # @todo FIXME: This would be better as an extension hook
-                               $enotif = new EmailNotification();
-                               $enotif->notifyOnPageChange( $editor, $title,
-                                       $this->mAttribs['rc_timestamp'],
-                                       $this->mAttribs['rc_comment'],
-                                       $this->mAttribs['rc_minor'],
-                                       $this->mAttribs['rc_last_oldid'],
-                                       $this->mExtra['pageStatus'] );
+                       // Never send an RC notification email about categorization changes
+                       if ( $this->mAttribs['rc_type'] != RC_CATEGORIZE ) {
+                               if ( Hooks::run( 'AbortEmailNotification', array( $editor, $title, $this ) ) ) {
+                                       # @todo FIXME: This would be better as an extension hook
+                                       $enotif = new EmailNotification();
+                                       $enotif->notifyOnPageChange(
+                                               $editor,
+                                               $title,
+                                               $this->mAttribs['rc_timestamp'],
+                                               $this->mAttribs['rc_comment'],
+                                               $this->mAttribs['rc_minor'],
+                                               $this->mAttribs['rc_last_oldid'],
+                                               $this->mExtra['pageStatus']
+                                       );
+                               }
                        }
                }