Changeset 13992
- Timestamp:
- 08/26/2024 02:12:20 AM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-components.php
r13880 r13992 36 36 function trac_url() { 37 37 return 'https://' . $this->trac . '.trac.wordpress.org'; 38 } 39 40 function get_component_url( $component ) { 41 if ( 'core' === $this->trac ) { 42 // Core has a rewrite for /component/(.+) to a report. 43 return $this->trac_url() . '/component/' . rawurlencode( $component ); 44 } elseif ( 'meta' === $this->trac ) { 45 // Meta has the same report, but with no rewrite 46 return $this->trac_url() . '/report/19?COMPONENT=' . rawurlencode( $component ); 47 } else { 48 // Otherwise, just query for open tickets. 49 return $this->trac_url() . '/query?status=!closed&component=' . rawurlencode( $component ); 50 } 38 51 } 39 52 … … 716 729 $open_tickets = array_sum( $this->breakdown_component_type[ $component ] ); 717 730 } 718 echo '<td class="right"><a href="' . $this->trac_url() . '/component/' . esc_attr( rawurlencode( $component ) ) . '">' . $open_tickets . '</a></td>';731 echo '<td class="right"><a href="' . esc_attr( $this->get_component_url( $component ) ) . '">' . $open_tickets . '</a></td>'; 719 732 if ( $history['change'] ) { 720 733 $count = sprintf( "%+d", $history['change'] );
Note: See TracChangeset
for help on using the changeset viewer.