]> git.mjollnir.org Git - s9y.git/commitdiff
Show category name when browsing calendar
authorgarvinhicking <garvinhicking>
Wed, 19 Apr 2006 08:29:43 +0000 (08:29 +0000)
committergarvinhicking <garvinhicking>
Wed, 19 Apr 2006 08:29:43 +0000 (08:29 +0000)
index.php

index 92a1af7bd46b89c9b780f74cdcd9b63a80645985..96f5a3da7c13cc1f16f9f53148939276006d89b1 100644 (file)
--- a/index.php
+++ b/index.php
@@ -197,7 +197,11 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
     $serendipity['range'] = array($ts, $te);
 
     if ($serendipity['GET']['action'] == 'read') {
-        $serendipity['head_subtitle'] = sprintf(ENTRIES_FOR, $date);
+        if ($serendipity['GET']['category']) {
+            $cInfo = serendipity_fetchCategoryInfo($serendipity['GET']['category']);
+            $serendipity['head_title']    = $cInfo['category_name'];
+        }
+        $serendipity['head_subtitle'] .= sprintf(ENTRIES_FOR, $date);
     }
 
     ob_start();