Changeset 8160 for sites/trunk/common/includes/slack/trac/ticket.php
- Timestamp:
- 01/29/2019 12:21:55 PM (7 years ago)
- File:
-
- 1 edited
-
sites/trunk/common/includes/slack/trac/ticket.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/common/includes/slack/trac/ticket.php
r3097 r8160 40 40 41 41 $attachment['fields'] = self::get_ticket_fields( $this->data ); 42 $attachment['ts'] = strtotime( $this->data->created ); 43 44 $attachment['footer'] = sprintf( '<%s|%s>', $this->trac->get_url(), $this->trac->get_name() ); 45 $attachment['footer_icon'] = sprintf( '%s/chrome/common/trac.ico', $this->trac->get_url() ); 46 42 47 return $attachment; 43 48 } … … 53 58 } 54 59 55 $url = $this->get_url() . '?format=csv'; 60 $url = sprintf( 61 '%s/query?id=%s&col=id&col=summary&col=owner&col=type&col=cc&col=status&col=priority&col=milestone&col=component&col=version&col=severity&col=resolution&col=time&col=focuses&col=reporter&col=keywords&col=description&format=csv', 62 $this->trac->get_url(), 63 $this->id 64 ); 56 65 $contents = @file_get_contents( $url ); 57 66 if ( $contents === false ) { … … 64 73 $contents = explode( "\n", $contents, 2 ); 65 74 $ticket_info = array_combine( 66 str_getcsv( $contents[0], ',', '"', '"' ),75 str_getcsv( strtolower( $contents[0] ), ',', '"', '"' ), 67 76 str_getcsv( $contents[1], ',', '"', '"' ) 68 77 );
Note: See TracChangeset
for help on using the changeset viewer.