git://git.jankratochvil.net
/
www.energie.vellum.cz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
22a4058
)
Always display the LAST year content, not the current year (may not exist yet)
author
short
<>
Wed, 9 Jan 2002 20:43:41 +0000
(20:43 +0000)
committer
short
<>
Wed, 9 Jan 2002 20:43:41 +0000
(20:43 +0000)
index.php
patch
|
blob
|
history
diff --git
a/index.php
b/index.php
index
76bc201
..
ae49cda
100644
(file)
--- a/
index.php
+++ b/
index.php
@@
-20,8
+20,9
@@
<li><a href="title.php">V¹echny roèníky</a></li>
<?php
<li><a href="title.php">V¹echny roèníky</a></li>
<?php
- $getdate=getdate();
- $year=$getdate["year"];
+ // Current year may be different (higher) but when no such content exists
+ // yet, it is better to at least provide the last year.
+ $year=db_item("select max(year) from $tb_obsah");
$result=db_query("select distinct year from $tb_obsah order by year");
while (($row=mysql_fetch_array($result)))
$result=db_query("select distinct year from $tb_obsah order by year");
while (($row=mysql_fetch_array($result)))