I have a new MODx site, being developed on 0.9.6.3, yesterday
upgraded to 1.0.2
http://www2.aims.ac.za, almost done now.
We use CALx. If there is no &mois=12 in the URL, and you click
the forward month navigation in December, then the new URL is incorrectly
set to mois=13. The modulo 12 only works if there was already a URL
containing the month.
I cannot open the modx site, it hangs for me:
http://homeworks.dyndns.org/devcalx
Below is a patch to fix it.
0 jan@muizenberg:~$cat CALx.class.php_blank_url_month_modulo12_fix.patch
--- CALx.class.php.orig 2009-12-15 09:49:09.000000000 +0200
+++ CALx.class.php 2009-12-15 10:11:12.000000000 +0200
@@ -948,12 +948,12 @@
$strDayLink=’&jour=’.$this->jour;
}
$tempNextYear=$this->annee;
- if($navMonth==12){
+ if($nextMonth==13){
$nextMonth=1;
$tempNextYear = $nextYear;
}
$tempPrevYear=$this->annee;
- if($navMonth==1){
+ if($previousMonth==0){
$previousMonth=12;
$tempPrevYear = $previousYear;
}
@@ -1941,4 +1941,4 @@
return false;
}
}
-?>
\ No newline at end of file
+?>
I’m not sure what other effect this has on the code, but it seems OK to me.
Some other things I would like is to (easy) change the URL mois/anee to month/year in English,
and (harder?) preserve the friendly portion of the URL, whereas CALx changes the early part to index.php?id=168 URL
when navigating through dates.