diff --git a/upcoming.php b/upcoming.php index 31fa385a9..bfa6c932b 100644 --- a/upcoming.php +++ b/upcoming.php @@ -155,17 +155,12 @@ function print_upcoming_event ( $e, $date ) { $popupid = 'pop' . $e->getId() . '-' . $date; - $private = $confidential = false; // Access: P=Public, R=Private, C=Confidential - if ( $e->getAccess() == 'R' ) { - // not a public event, so we will just display "Private" - $private = true; - } - else if ( $e->getAccess() == 'C' ) { - // not a public event, so we will just display "Confidential" - $confidential = true; - } - + // not a public event, just "Private" + $private = ( $e->getAccess() == 'R' ); + // not a public event, just "Confidential" + $confidential = ( $e->getAccess() == 'C' ); + if ( ! empty ( $SERVER_URL ) && ! $private && ! $confidential) { echo "
\n"; if ( $display_link ) { @@ -195,7 +190,7 @@ function print_upcoming_event ( $e, $date ) { $link .= 'category icon'; } } - echo "$link"; + echo $link; } } if ( $private ) {