Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11510
Modified Files:
serendipity_functions.inc.php NEWS
Log Message:
Fixed Bug #963248 - Calendar cannot calculate LastRow CSS class if there are more than 4 rows
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -d -r1.153 -r1.154
--- NEWS 18 Jun 2004 16:53:26 -0000 1.153
+++ NEWS 19 Jun 2004 19:28:52 -0000 1.154
@@ -3,6 +3,9 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * Fixed Bug #963248 - Calendar cannot calculate LastRow CSS class if
+ there are more than 4 rows (tomsommer)
+
* Use the right HTML code for trackback-link detection when using
markup plugins like Text_Wiki (garvinhicking)
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.296
retrieving revision 1.297
diff -u -d -r1.296 -r1.297
--- serendipity_functions.inc.php 18 Jun 2004 16:53:26 -0000 1.296
+++ serendipity_functions.inc.php 19 Jun 2004 19:28:51 -0000 1.297
@@ -474,6 +474,7 @@
<?php
// Print the calendar
$currDay = 1;
+ $nrOfRows = ceil(($nrOfDays+$firstDayWeekDay)/7);
$today_day = date('j');
$today_month = date('m');
$today_year = date('Y');
@@ -488,13 +489,13 @@
// Prepare row
for ($y = 0; $y < 7; $y++) {
// Be able to print borders nicely
- if ($x == 4 && $y == 6) {
+ if ($x == $nrOfRows-1 && $y == 6) {
$cellProp = 'LastInLastRow';
} else if ($y == 0) {
$cellProp = 'FirstInRow';
} else if ($y == 6) {
$cellProp = 'LastInRow';
- } else if ($x == 4) {
+ } else if ($x == $nrOfRows-1) {
$cellProp = 'LastRow';
} else {
$cellProp = '';
|