- Timestamp:
- 08/02/2015 01:26:10 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/dotorg/trac/mentions-handler.php
r1187 r1801 28 28 $search_text = preg_replace( "/^>.*\n\n/sm", '', $search_text ); 29 29 $user_login = $payload->author; 30 } elseif ( $payload->trac === 'security' ) { 31 // Security Trac only handles comments. 32 // Ticket data is found via a HTTP request, comments are from parsing the email. 33 exit; 30 34 } else { 31 35 $search_text = $payload->summary . ' ' . $payload->description; … … 54 58 } 55 59 60 function wporg_mentions_limit_to_security_team( $usernames, $data ) { 61 require_once dirname( __DIR__ ) . '/slack/security-team.php'; 62 $team = \Dotorg\Slack\Security_Team\get_security_team(); 63 64 if ( ! empty( $data['object']->cc ) ) { 65 // Add single ticket access users. 66 $ccs = explode( ", ", $data['object']->cc ); 67 $team = array_merge( $team, $ccs ); 68 } 69 70 return $team; 71 } 72 56 73 if ( ! wporg_user_has_visited_trac( $user_login ) ) { 57 74 $wpdb->insert( 'trac_users', compact( 'user_login' ) ); 75 } 76 77 if ( $payload->trac === 'security' ) { 78 add_filter( 'wporg_notifications_notifiable_usernames', 'wporg_mentions_limit_to_security_team', 10, 2 ); 58 79 } 59 80
Note: See TracChangeset
for help on using the changeset viewer.