From 9a87850a382b8dd300ccae5912679e528dd7d526 Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Thu, 14 Apr 2011 22:08:27 -0600 Subject: [PATCH] tabs.php: Made it so that sub-pages get same tab-overline treatment as top-level ones --- tabs.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tabs.php b/tabs.php index 2acb09c..e865bbf 100644 --- a/tabs.php +++ b/tabs.php @@ -11,7 +11,12 @@ $base_domain = $_SERVER['HTTP_HOST'] == "aclindsay.com"; foreach ($tabs as $name => $url) { - if ($base_domain && $url == $_SERVER['REQUEST_URI']) + if ($url == "/") { + if ($_SERVER['REQUEST_URI'] == "/") + echo "
  • Home
  • "; + else + echo "
  • Home
  • "; + } else if ($base_domain && strncmp($url, $_SERVER['REQUEST_URI'], strlen($url)) == 0) echo "
  • ".$name."
  • "; else echo "
  • ".$name."
  • ";