Anil, I committed my code to trunk, so please take a look at the latest code in the WeblogCalendarModel, I had to add two queries and a new argument to the getWeblogEntries() method to allow both descending and ascending sort order.
- Dave On 12/13/06, Anil Gangolli <[EMAIL PROTECTED]> wrote:
OK. Allen had already noted that weblog.dateCreated tends to be inaccurate. I had considered something along the lines of your approach in (2) but discarded that due to worries about performance impact. I'm curious how you approached this. I was considering an alternative where we would maintain the earliest ever publish date (the earliest publish date ever written --even it if is moved forward or deleted later) but sticking with the existing "strict prev: approach. I'm fine with backing out for 3.1 so we have more time to determine the right approach for 3.2. --a. ----- Original Message ----- From: "Dave" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Tuesday, December 12, 2006 1:48 PM Subject: Re: svn commit: r482704 - /incubator/roller/branches/roller_3.1/src/org/apache/roller/ui/core/tags/calendar/CalendarTag.java > Actually, my fix requires more extensive changes than I'd like to add > to 3.1 so what I'm planning to do is to back out the r482704 change > for 3.1 and commit my code so we can have a fix for 3.2. I'll start by > committing my code to trunk. > > - Dave > > > > On 12/12/06, Dave <[EMAIL PROTECTED]> wrote: >> Thanks for this important fix Anil, but there are two small problems: >> >> 1) I've found that weblog.dateCreated is not very reliable. Since it >> is a timestamp, it gets updated anytime somebody makes a change to the >> WEBSITE table via SQL UPDATE (unless they are careful to use >> updatetime=updatetime). I know our dateCreated information is >> unreliable because of that. We rolled out the "3.2" codebase recently >> and got some bug reports because of this. >> >> 2) Users don't want to click prev, prev, prev to go hunting back in >> time for the previous month of entries. We don't just want to link to >> the chronologically previous and previous months, we want to link to >> the next and previous non-empty months. That's better for usability >> and spidering reduction too. >> >> I have a fix ready to commit that addresses both of these issues. >> >> - Dave >> >> >> >> On 12/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> > Author: gangolli >> > Date: Tue Dec 5 08:37:49 2006 >> > New Revision: 482704 >> > >> > URL: http://svn.apache.org/viewvc?view=rev&rev=482704 >> > Log: >> > Fix for ROL-1312 integrated from the mainline. >> > >> > Modified: >> > >> > incubator/roller/branches/roller_3.1/src/org/apache/roller/ui/core/tags/calendar/CalendarTag.java >> > >> > Modified: >> > incubator/roller/branches/roller_3.1/src/org/apache/roller/ui/core/tags/calendar/CalendarTag.java >> > URL: >> > http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.1/src/org/apache/roller/ui/core/tags/calendar/CalendarTag.java?view=diff&rev=482704&r1=482703&r2=482704 >> > ============================================================================== >> > --- >> > incubator/roller/branches/roller_3.1/src/org/apache/roller/ui/core/tags/calendar/CalendarTag.java >> > (original) >> > +++ >> > incubator/roller/branches/roller_3.1/src/org/apache/roller/ui/core/tags/calendar/CalendarTag.java >> > Tue Dec 5 08:37:49 2006 >> > @@ -163,8 +163,9 @@ >> > day = DateUtil.getNoonOfDay(day, cal); >> > cal.set( Calendar.DAY_OF_MONTH, >> > cal.getMinimum(Calendar.DAY_OF_MONTH) ); >> > >> > - // go back to sunday before that: the first sunday in the >> > calendar >> > - while ( cal.get( Calendar.DAY_OF_WEEK ) != >> > Calendar.SUNDAY ) { >> > + // Go back to first day of week before that (Sunday in US, >> > Monday in France, e.g.) >> > + // in the calendar >> > + while ( cal.get( Calendar.DAY_OF_WEEK ) != >> > cal.getFirstDayOfWeek() ) { >> > cal.add( Calendar.DATE, -1 ); >> > } >> > >> > >> > >> > >> >
