Changeset 1191
- Timestamp:
- 01/26/2015 07:48:28 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/common/includes/slack/announce/lib.php
r1121 r1191 40 40 $channels = get_whitelisted_channels_for_user( $user ) ; 41 41 if ( $channel === 'privategroup' ) { 42 echo "Any private group members can use @channelin this group.";43 #return;42 echo "Any private group members can use /announce in this group."; 43 return; 44 44 } elseif ( empty( $channels ) ) { 45 echo "You are not allowed to use @channel.";45 echo "You are not allowed to use /announce."; 46 46 } elseif ( in_array( $channel, $channels ) ) { 47 47 $channels = array_filter( $channels, function( $c ) use ( $channel ) { return $c !== $channel; } ); 48 48 if ( $channels ) { 49 printf( "You are allowed to use @channelin #%s (also %s).", $channel, '#' . implode( ' #', $channels ) );49 printf( "You are allowed to use /announce in #%s (also %s).", $channel, '#' . implode( ' #', $channels ) ); 50 50 } else { 51 echo "You are allowed to use @channelin #$channel.";51 echo "You are allowed to use /announce in #$channel."; 52 52 } 53 53 } else { 54 printf( "You are not allowed to use @channelin #%s, but you are in #%s.", $channel, implode( ' #', $channels ) );54 printf( "You are not allowed to use /announce in #%s, but you are in #%s.", $channel, implode( ' #', $channels ) ); 55 55 } 56 56
Note: See TracChangeset
for help on using the changeset viewer.