Changeset 2024 for sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-notifications.php
- Timestamp:
- 11/01/2015 08:39:57 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-notifications.php
r2023 r2024 197 197 exit; 198 198 } 199 $ticket = $this->api->get_trac_ticket( $ticket_id ); 200 if ( ! $ticket ) { 201 exit; 202 } 203 204 $focuses = explode( ', ', $this->api->get_trac_ticket_focuses( $ticket_id ) ); 205 206 $notifications = $this->api->get_trac_notifications_for_user( $username ); 207 208 $ticket_sub = $this->api->get_trac_ticket_subscription_status_for_user( $ticket_id, $username ); 209 210 $ticket_subscriptions = $this->api->get_trac_ticket_subscriptions( $ticket_id ); 199 200 $meta = $this->api->get_trac_notifications_info( $ticket_id, $username ); 201 if ( ! $meta ) { 202 exit; 203 } 204 205 $ticket = $meta['get_trac_ticket']; 206 $focuses = $meta['get_trac_ticket_focuses']; 207 $notifications = $meta['get_trac_ticket_focuses']; 208 $ticket_sub = $meta['get_trac_ticket_subscription_status_for_user']; 209 $ticket_subscriptions = $meta['get_trac_ticket_subscriptions']; 210 $participants = $meta['get_trac_ticket_participants']; 211 212 $focuses = explode( ', ', $focuses ); 211 213 $stars = $ticket_subscriptions['starred']; 212 214 $star_count = count( $stars ); 213 214 $participants = $this->api->get_trac_ticket_participants( $ticket_id );215 215 216 216 $unblocked_participants = array_diff( $participants, $ticket_subscriptions['blocked'] ); … … 312 312 </div> 313 313 <?php 314 $this->ticket_notes( $ticket, $username );314 $this->ticket_notes( $ticket, $username, $meta ); 315 315 $send = array( 'notifications-box' => ob_get_clean() ); 316 316 if ( isset( $this->components ) ) { … … 321 321 } 322 322 323 function ticket_notes( $ticket, $username ) {323 function ticket_notes( $ticket, $username, $meta ) { 324 324 if ( $username == $ticket->reporter ) { 325 325 return; 326 326 } 327 327 328 $activity = $ this->api->get_reporter_past_activity( $ticket->reporter, $ticket->id );328 $activity = $meta['get_reporter_last_activity']; 329 329 330 330 if ( count( $activity['tickets'] ) >= 5 ) {
Note: See TracChangeset
for help on using the changeset viewer.