Changeset 3055
- Timestamp:
- 05/01/2016 10:27:41 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/common/includes/slack/trac/trac.php
r1803 r3055 94 94 $ns = __NAMESPACE__ . '\\Tracs\\'; 95 95 96 $class = $ns . $trac; 96 $class = $ns . $trac; 97 97 if ( class_exists( $class ) ) { 98 98 return new $class; … … 103 103 return new $class; 104 104 } 105 105 106 106 if ( preg_match( '~([a-z]+).trac.wordpress.org~', $trac, $match ) ) { 107 107 $class = $ns . $match[1]; … … 252 252 253 253 if ( isset( $ticket->component ) && isset( $this->ticket_component_filters[ $ticket->component ] ) ) { 254 $channels = array_merge( $channels, (array) $this->ticket_component_filters[ $ticket->component ] ); 254 if ( is_string( $this->ticket_component_filters[ $ticket->component ] ) ) { 255 $channels = array_merge( $channels, array( $this->ticket_component_filters[ $ticket->component ] => true ) ); 256 } else { 257 $channels = array_merge( $channels, $this->ticket_component_filters[ $ticket->component ] ); 258 } 255 259 } 256 260 257 261 if ( isset( $ticket->focuses ) ) { 258 262 foreach ( explode( ', ', $ticket->focuses ) as $focus ) { 259 if ( isset( $this->ticket_component_filters[ $focus ] ) ) { 260 $channels = array_merge( $channels, (array) $this->ticket_component_filters[ $focus ] ); 263 if ( ! isset( $this->ticket_component_filters[ $focus ] ) ) { 264 continue; 265 } 266 if ( is_string( $this->ticket_component_filters[ $focus ] ) ) { 267 $channels = array_merge( $channels, array( $this->ticket_component_filters[ $focus ] => true ) ); 268 } else { 269 $channels = array_merge( $channels, $this->ticket_component_filters[ $focus ] ); 261 270 } 262 271 } … … 277 286 if ( $channel === $this->primary_channel ) { 278 287 return $this->primary_channel_ticket_format; 279 } 288 } 280 289 return 'description'; 281 290 } … … 284 293 $text = str_replace( "\r\n", "\n", $text ); 285 294 $text = trim( str_replace( 286 array( "\n{{{\n", "\n}}}\n", '{{{', '}}}' ), 295 array( "\n{{{\n", "\n}}}\n", '{{{', '}}}' ), 287 296 array( "\n```\n", "\n```\n", '`', '`' ), 288 297 "\n$text\n"
Note: See TracChangeset
for help on using the changeset viewer.