From 2639d55a79ec89c521308dd7bc79c6830967127b Mon Sep 17 00:00:00 2001 From: "stevesoudersorg@gmail.com" Date: Thu, 7 Feb 2013 23:57:15 +0000 Subject: [PATCH] only show downloads for crawls labelled "All" in the archive field git-svn-id: http://httparchive.googlecode.com/svn/trunk@1120 fc7d47d3-c008-acd5-f51f-d19787b8a02f --- downloads.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/downloads.php b/downloads.php index 5789b5f3..8762fd3a 100644 --- a/downloads.php +++ b/downloads.php @@ -25,10 +25,14 @@ function listFiles($hFiles) { $aKeys = array_keys($hFiles); sort($aKeys, SORT_NUMERIC); foreach( array_reverse($aKeys) as $epoch ) { - $sHtml .= "
  • " . date("M j, Y", $epoch) . ": " . - ( array_key_exists('IE', $hFiles[$epoch]) ? "
      " . $hFiles[$epoch]['IE'] : "" ) . - ( array_key_exists('iPhone', $hFiles[$epoch]) ? "
      " . $hFiles[$epoch]['iPhone'] : "" ) . - "\n"; + $label = date("M j Y", $epoch); + $crawl = getCrawl($label); + if ( "All" === $crawl['archive'] ) { + $sHtml .= "
  • $label: " . + ( array_key_exists('IE', $hFiles[$epoch]) ? "
      " . $hFiles[$epoch]['IE'] : "" ) . + ( array_key_exists('iPhone', $hFiles[$epoch]) ? "
      " . $hFiles[$epoch]['iPhone'] : "" ) . + "\n"; + } } return $sHtml;