From b5963179f2b3187fe9cce96bbb1a0e26e63c414c Mon Sep 17 00:00:00 2001 From: Vasil Kolev Date: Fri, 24 Oct 2014 14:00:33 +0300 Subject: [PATCH] don't display speakerless events --- load-program.php | 14 ++++++++++---- load-workshops.php | 14 ++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/load-program.php b/load-program.php index 7731ab1..430b5b0 100644 --- a/load-program.php +++ b/load-program.php @@ -95,8 +95,13 @@ while ($row = pg_fetch_object($prg)) { $spkbg = implode(", ", $spkbgarr); $spken = implode(", ", $spkenarr); - $event->spken = $spken; - $event->spkbg = $spkbg; + if (count($spkbgarr)>0) { + $event->spken = '('.$spken.')'; + $event->spkbg = '('.$spkbg.')'; + } else { + $event->spken = ''; + $event->spkbg = ''; + } $events[] = $event; @@ -143,8 +148,9 @@ while ($row = pg_fetch_object($prg)) { foreach ($events as $k => $event) { + if ($event->spkbg=='') continue; $bg .= '
'; - $bg .= '

'.$event->title.' ('.$event->spkbg.')

'; + $bg .= '

'.$event->title.' '.$event->spkbg.'

'; if (strlen($event->subtitle)>2) $bg .= '

'.htmlentities($event->subtitle).'

'; $bg .= '

'.htmlentities($event->abstract).'

'; # $bg .= '

'.htmlentities($event->description).'

'; @@ -153,7 +159,7 @@ while ($row = pg_fetch_object($prg)) { $bg .= '
'; $en .= '
'; - $en .= '

'.$event->title.' ('.$event->spken.')

'; + $en .= '

'.$event->title.' '.$event->spken.'

'; if (strlen($event->subtitle)>2) $en .= '

'.htmlentities($event->subtitle).'

'; $en .= '

'.htmlentities($event->abstract).'

'; # $en .= '

'.htmlentities($event->description).'

'; diff --git a/load-workshops.php b/load-workshops.php index bc1f9bb..d251906 100644 --- a/load-workshops.php +++ b/load-workshops.php @@ -95,8 +95,13 @@ while ($row = pg_fetch_object($prg)) { $spkbg = implode(", ", $spkbgarr); $spken = implode(", ", $spkenarr); - $event->spken = $spken; - $event->spkbg = $spkbg; + if (count($spkbgarr)>0) { + $event->spken = '('.$spken.')'; + $event->spkbg = '('.$spkbg.')'; + } else { + $event->spken = ''; + $event->spkbg = ''; + } $events[] = $event; @@ -143,8 +148,9 @@ while ($row = pg_fetch_object($prg)) { foreach ($events as $k => $event) { + if ($event->spkbg=='') continue; $bg .= '
'; - $bg .= '

'.$event->title.' ('.$event->spkbg.')

'; + $bg .= '

'.$event->title.' '.$event->spkbg.'

'; if (strlen($event->subtitle)>2) $bg .= '

'.htmlentities($event->subtitle).'

'; $bg .= '

'.htmlentities($event->abstract).'

'; # $bg .= '

'.htmlentities($event->description).'

'; @@ -153,7 +159,7 @@ while ($row = pg_fetch_object($prg)) { $bg .= '
'; $en .= '
'; - $en .= '

'.$event->title.' ('.$event->spken.')

'; + $en .= '

'.$event->title.' '.$event->spken.'

'; if (strlen($event->subtitle)>2) $en .= '

'.htmlentities($event->subtitle).'

'; $en .= '

'.htmlentities($event->abstract).'

'; # $en .= '

'.htmlentities($event->description).'

';