Skip to content

Commit

Permalink
a little shorter
Browse files Browse the repository at this point in the history
Missed the closing anchor lower down, still don't need 2 close tags.
Also, delete un needed if/else.
  • Loading branch information
bbannon committed Apr 19, 2024
1 parent 2dbc1b4 commit eb1b832
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions upcoming.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<div class=\"vevent\">\n";
if ( $display_link ) {
Expand Down Expand Up @@ -195,7 +190,7 @@ function print_upcoming_event ( $e, $date ) {
$link .= '<img src="' . $catIcon . '" alt="category icon">';
}
}
echo "$link</a>";
echo $link;
}
}
if ( $private ) {
Expand Down

0 comments on commit eb1b832

Please sign in to comment.