[geeklog-cvs] geeklog: Don't provide links to future months
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Feb 7 11:04:06 EST 2010
changeset 7712:c5484e960d88
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/c5484e960d88
user: Dirk Haun <dirk at haun-online.de>
date: Sun Feb 07 13:39:50 2010 +0100
description:
Don't provide links to future months
diffstat:
public_html/directory.php | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 2673f0a770e9 -r c5484e960d88 public_html/directory.php
--- a/public_html/directory.php Sun Feb 07 11:18:29 2010 +0100
+++ b/public_html/directory.php Sun Feb 07 13:39:50 2010 +0100
@@ -153,7 +153,7 @@
*/
function DIR_navBar ($topic, $year, $month = 0)
{
- global $_CONF, $_TABLES, $LANG05, $LANG_DIR,$_DB_dbms;
+ global $_CONF, $_TABLES, $LANG05, $LANG_DIR;
$retval = '';
@@ -183,10 +183,16 @@
$prevyear = 0;
}
- $currentyear = date ('Y', time ());
+ $currentyear = date('Y', time());
if ($nextyear > $currentyear) {
$nextyear = 0;
}
+ if (($month > 0) && ($nextyear > 0) && ($nextyear >= $currentyear)) {
+ $currentmonth = date('n', time());
+ if ($nextmonth > $currentmonth) {
+ $nextyear = 0;
+ }
+ }
if ($prevyear > 0) {
$url = $_CONF['site_url'] . '/' . THIS_SCRIPT . '?topic='
More information about the geeklog-cvs
mailing list