Hi, On Thu, 7 Feb 2002, Negrea Mihai wrote: > I'm new to midgard and just testing some functionality.. I'm now trying to > test the calendar functions. I've created a topic (id=18) and an article in > that topic. Now I'm trying to get the $calendar object with > > $calendar = mgd_list_topic_calendar_all(); > > but with a print_r() I see that the object is empty. > > if i try to query mysql directly about that topic it gives me:
Look at http://www.midgard-project.org/manual/en/function.list-topic-calendar-all.php, for the correct syntax and parameters to this function. You need to specify the root-topic id. Also notice the User Contributed Note, that draws attention to the fact the the function doesn't deal with the CREATED field, but rather with the calstart and caldays fields. Looking at the mysql records you sent these are not set, so the function is correct in returning nothing in this case. Lastly, there are some known issues around the calendaring functions, as Pascal addressed a few weeks ago. This essentially means that the behaviour of the calendaring functions is currently inconsistent with what the manual states. See: http://marc.theaimsgroup.com/?l=midgard-dev&m=101209168530398&w=2 for a discussion held recently on the subject. A patch to address these issues was supposed to be presented on the dev-list by ... me. Oops. Current status being that I need to address the '24*60*60-1' issue that is discussed in the thread mentioned above in an elegant manner, it is a way to deal with the precision of timestamps stored in the mysql database field (it's a date field, not date-time). This shouldn't be too hard, but I need to get round to it. Should happen somewhere this weekend, but could just as well be next week :-( -- Envida http://www.envida.net/ Armand A. Verstappen Graadt van Roggenweg 328 [EMAIL PROTECTED] 3531 AH Utrecht tel: +31 (0)30 298 2255 Postbus 19127 fax: +31 (0)30 298 2111 3501 DC Utrecht --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
