~ubuntu-branches/ubuntu/raring/webcalendar/raring

« back to all changes in this revision

Viewing changes to debian/patches/15_mktime-php-5.2.8.diff

  • Committer: Bazaar Package Importer
  • Author(s): Rafael Laboissiere
  • Date: 2009-06-09 06:26:24 UTC
  • mfrom: (18.2.3 karmic)
  • Revision ID: james.westby@ubuntu.com-20090609062624-9n9xea2ftpipmg38
Tags: 1.2.0+dfsg-4
* debian/patches/06_send-reminder-paths.diff: Adjust patch to help
  translate.php to find the translation files under /etc/webcalendar.
  Thanks to Dale and Cheryl Schroeder for the help on debugging this
  (really, closes: #531312).
* debian/patches/16_no-blink-public-access-title.diff: New patch for
  avoiding the blinking title when changing the Public Access title in
  English-US.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
This patch fixes Bug#530842, which has already been reported upstream [1].  The patch that
 
2
fixes the problem is really trivial and is already in SVN upstream [2].
 
3
 
 
4
1: http://sourceforge.net/tracker/index.php?func=detail&aid=2534090&group_id=3870&atid=303870
 
5
2: http://webcalendar.cvs.sourceforge.net/viewvc/webcalendar/webcalendar/includes/functions.php?r1=1.568&r2=1.569
 
6
 
 
7
This is the description of the patch:
 
8
 
 
9
    PHP 5.2.8/Seg fault/blank page/Internal Server Error/untimed - ID: 2534090
 
10
 
 
11
    Details:
 
12
        This patch fixes the problem that many people are recently
 
13
        experiencing with WebCalendar 1.2.0 when their servers get
 
14
        upgraded to PHP 5.2.8.
 
15
 
 
16
        The problem manifests as a Segmentation fault / blank pages /
 
17
        Internal Server Error when a user has Untimed Events or events
 
18
        spanning midnight on their calendar.
 
19
 
 
20
        It is caused by a change to the behavior of mktime(), so that
 
21
        it no longer accepts numbers such as 109 as the year 2009.
 
22
 
 
23
        This patch will work with all versions of PHP 4 and 5.
 
24
 
 
25
    Submitted:
 
26
        kc1 ( kevencook ) - 2009-01-25 00:18
 
27
 
 
28
 -- Rafael Laboissiere <rafael@debian.org>  Sat, 06 Jun 2009 11:08:47 +0200
 
29
 
 
30
--- a/includes/functions.php
 
31
+++ b/includes/functions.php
 
32
@@ -3050,7 +3050,7 @@
 
33
   $recurse = 0;
 
34
 
 
35
   $midnight = gmmktime ( - ( date ( 'Z', $item->getDateTimeTS () ) / 3600 ),
 
36
-    0, 0, $lt[4] + 1, $lt[3] + 1, $lt[5] );
 
37
+    0, 0, $lt[4] + 1, $lt[3] + 1, 1900 + $lt[5] );
 
38
   if ( $parent ) {
 
39
     $realEndTS = $item->getEndDateTimeTS ();
 
40
     $originalDate = $item->getDate ();