diff options
author | Wojciech Polak <polak@gnu.org> | 2005-03-29 20:32:22 +0000 |
---|---|---|
committer | Wojciech Polak <polak@gnu.org> | 2005-03-29 20:32:22 +0000 |
commit | 33672a806ebee9ac03b667184471dc19161dcfa3 (patch) | |
tree | 2689408ca14d538703d0b59351dbae971d12b039 | |
parent | 0a15e2898c33462bce44c9138c29eec97ee1d1a6 (diff) | |
download | blogright-33672a806ebee9ac03b667184471dc19161dcfa3.tar.gz blogright-33672a806ebee9ac03b667184471dc19161dcfa3.tar.bz2 |
bugfix
-rw-r--r-- | blog.php | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -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) { |