Skip to forum content
CutePHP Forums
Dear CuteNews Users! Please feel free to contact us via our new Feedback Form and please send information about bugs to our bug tracker.
CutePHP Forums
You are not logged in. Please login or register.
Active topics Unanswered topics
Search options
The line of code that Ipstenu suggested fixes the problem except for the fact that it casues CuteNews to autoarchive every time there is more than 1 post. Instead of using the code he wrote, use the one below, it is exactly the same except a >= was changed to >.
if ( ($now[year] > (int)$last_archived[year]) or ($now[year] == (int)$last_archived[year] and $now[month] > (int)$last_archived[month]) ) {
'She' wrote
Yes, well .. *ahem* Awesome catch! As I said before I don't actually use the auto-archive so there were some aspects I wasn't suited to test 
That looks fine for people who've always had archiveing and need it fixed, but it doesn't fully address the possibilities of someone who turned off archving in 2005 and wants to turn it on in 2006...
Assumptions:
1) No matter what, if you've turned on archiving and the last run was last year, you want it to run.
2) If you've always had archiving run, and it hasn't run 'this month' then run.
Maybe ...
if ( ($now[year] >= (int)$last_archived[year]) or ($now[year] == (int)$last_archived[year] and $now[month] > (int)$last_archived[month]) ) {
Posts found: 2