Menu

#1 Bug in calendar: Used a wrong link in day<10

v1.0_(example)
open
nobody
5
2003-03-05
2003-03-05
No

If you klick in the calendar and the day is smaller
than 10, the details are missing.
reason: the Link is wrong, missing a "0"
(index.php?Year=2003&Month=03&Day=6).
Short help: inserted
if (($Day >= 1) && ($Day < 9)) { $Day = "0".$Day;}
in index.php, after $Day = $_GET["Day"];

But it would be nicer to change the link in the
JS-Calendar, but don't know how :-(

Discussion

  • Beate Paland

    Beate Paland - 2003-03-05
    • summary: Bug in calendar: Used a short link in day<10 --> Bug in calendar: Used a wrong link in day<10
     
  • Xavier Barnabé-Thériault

    Logged In: YES
    user_id=336078

    More robust to do both !

    - 1 - prepare good links (Here nobody (!) should be able to
    find them all.

    - 2 - stay suspicious about all arguments. Here is what I added:
    $Day = str_pad($Day, 2, &quot;0&quot;, STR_PAD_LEFT);
    $Month = str_pad($Month, 2, &quot;0&quot;, STR_PAD_LEFT);
    (str_pad available php4.0.1+)

     

Log in to post a comment.

MongoDB Logo MongoDB