Menu

#138 CalendarList Pluging bug fixes

1.3.x
open
nobody
None
5
2015-02-11
2005-11-30
Anonymous
No

in 1.3.11.p1 CalendarList plugin fails if
month_offset!=0. There were a few other errors
discovered in the code. Sorry I don't have a diff:


        $t     = localtime($time, 1);

If $args['next_n_days'] then "n" counts days.

        if ($args['next_n_days']) {
            if ($n == $args['next_n_days']) return

$cal;
$n++;

If $args['next_n'] then "n" counts entries!

        } elseif ($args['next_n']) {
            if ($n == $args['next_n']) return $cal;
            if (!empty($success))
                $n++;

If $args['last_n_days'] then "n" counts days as well.

        } elseif ($args['last_n_days']) {

$done = ($t['tm_mday'] ==

$now['tm_mday']);
if ($n == $args['last_n_days']) return
$cal;
$n++;

In default mode we do one month. Since $time(and $t)

have moved, we wait

til we get around to the 1st of the month again.

        } else { // stop at next/prev month

$done = ($t['tm_mon'] != $now['tm_mon']);

            if ($t['tm_mday'] == 1) return $cal;
        }
    }

never reached.

    return $cal;
}

last_n_days and default mode are both bug fixes.

Best, Christopher T. Johnson <cjohnson AT="" cyberpaladin.com="">

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.