From 4c768cf0f8df39e052dae7b8821e48ccbf48a6ef Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Thu, 8 Jun 2017 11:19:49 -0700 Subject: [PATCH] Update the 2017 archive to always show everything. This also removes the $vevent appendix in print_news(), whereby we walked every category even if we'd already found our match to set $vevent, then didn't use it again because it wasn't needed in the new design. That should fix global warming. --- archive/2017.php | 2 +- include/layout.inc | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/archive/2017.php b/archive/2017.php index bc548dc6a..b33cf4580 100644 --- a/archive/2017.php +++ b/archive/2017.php @@ -18,7 +18,7 @@ site_header("News Archive - 2017"); \(.*\)<\/a>//g */ site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA)); diff --git a/include/layout.inc b/include/layout.inc index 3602781ac..e6ffbb0b3 100644 --- a/include/layout.inc +++ b/include/layout.inc @@ -406,18 +406,15 @@ function print_news($news, $dog, $max = 5, $onlyyear = null, $return = false) { $count = 0; $news = $news ? $news : array(); // default to empty array (if no news) foreach($news as $item) { - $vevent = ""; $ok = false; // Only print entries in the provided s/dog/cat/ egory - // If its a conference, use the hCalendar container + // If $dog is null, everything matches foreach($item["category"] as $category) { - if (in_array($category["term"], (array)$dog)) { + if (is_null($dog) || in_array($category["term"], (array)$dog)) { $ok = true; ++$count; - } - if ($category["term"] === "conferences" || $category["term"] === "cfp") { - $vevent = " vevent"; + break; } } if ($count > $max) {