aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2005-03-29 20:32:22 +0000
committerWojciech Polak <polak@gnu.org>2005-03-29 20:32:22 +0000
commit33672a806ebee9ac03b667184471dc19161dcfa3 (patch)
tree2689408ca14d538703d0b59351dbae971d12b039
parent0a15e2898c33462bce44c9138c29eec97ee1d1a6 (diff)
downloadblogright-33672a806ebee9ac03b667184471dc19161dcfa3.tar.gz
blogright-33672a806ebee9ac03b667184471dc19161dcfa3.tar.bz2
bugfix
-rw-r--r--blog.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/blog.php b/blog.php
index f6f5f4d..4a4803c 100644
--- a/blog.php
+++ b/blog.php
@@ -189,6 +189,8 @@ if (!isset ($search_y) && isset ($recent))
/////////////////////////////
+$year_array = array (); // Array of years for copyright purposes
+
if (isset ($RSS) || isset ($_REQUEST['rss']))
{
$pubDate = date ("D, d M Y H:i:s O", filemtime ($include_files[0]));
@@ -275,11 +277,16 @@ else // HTML
// Calculate a copyright footnote.
$copyrightYear = '';
- $year_array = array_unique ($year_array);
- sort ($year_array);
- foreach ($year_array as $y)
- $copyrightYear .= "$y, ";
- $copyrightYear = substr ($copyrightYear, 0, -2);
+ if (count ($year_array))
+ {
+ $year_array = array_unique ($year_array);
+ sort ($year_array);
+ foreach ($year_array as $y)
+ $copyrightYear .= "$y, ";
+ $copyrightYear = substr ($copyrightYear, 0, -2);
+ }
+ else
+ $copyrightYear = date ('Y');
@include ($datadir.$footer_file);
@@ -411,8 +418,6 @@ function printer ($data, $string)
/////////////////////////////
-$year_array = array (); // Array of years for copyright purposes
-
// HTML output
function include_file ($file)
{

Return to:

Send suggestions and report system problems to the System administrator.