Environment: Drupal 4.6, Apache 1.3.x, PHP 4.3.x, MySQL 4
cvs header: $Id: rsvp.module,v 1.6 2005/03/25 06:51:25 crunchywelch Exp $

This is a pretty cool module. Thank you for building it!

RSVP for Drupal 4.6 doesn't make use of drupalcore's format_date() function, which breaks RSVP's date display on some systems (like mine). This patch modified rsvp.module to use drupal's format_date() function in "small" mode, so dates are shown using the user-selected small format from the drupal site's admin/settings page.

Comments

Travis’s picture

StatusFileSize
new412 bytes

Looks like I missed a spot. Another non-drupal date() call was in rsvp.theme, so this patch updates that file.

It's also worth mentioning that these patches fix a bug where rsvp displays the date of the epoch [ie. date(0);] instead of the date of the event because it tries to use the event's $node->start instead of $node->start_offset.

Travis’s picture

Two patches, one for the .module and one for the .theme

dtan’s picture

StatusFileSize
new6.49 KB

Here is the patch rolled into 1 with a slight localization fix to the strings where they are used.

HrlyKrs’s picture

Am I doing something wrong? I read through the post about Diff vs Patch

> pwd
/home/www/html/drupal/modules/rsvp
> patch -p0 -u < /home/public/Installs/drupal/rsvp.module.format_date.patch 
patch unexpectedly ends in middle of line
patch: **** Only garbage was found in the patch input.

I also tried just:

patch < /home/public/Installs/drupal/rsvp.module.format_date.patch

I even tried moving the patch into the same directory:

> patch < rsvp.module.format_date.patch 
patch unexpectedly ends in middle of line
patch: **** Only garbage was found in the patch input.
dtan’s picture

try patch --help and read the options. . . take note of the -p option. Also you might want to try patch [original_file] [patchfile]

HrlyKrs’s picture

I know what the problem was. i was retreving the file with wget, and it was coming in as one line. i downloaded the file, and transfered it over to my Linux box. i am now getting a different error:

> patch -b < rsvp.module.format_date.patch                   
patching file rsvp.module
patch: **** malformed patch at line 71: }
dtan’s picture

StatusFileSize
new6.49 KB

ya, my bad, well kinda. I used a bad naming scheme for the patch and the project/upload module added html to the patch. my apologies

HrlyKrs’s picture

I am getting the same error:

huey/home/www/drupal-4.6.2/modules/rsvp> patch -b < rsvp.module.format_date.patch 
patching file rsvp.module
patch: **** malformed patch at line 71: }

huey/home/www/drupal-4.6.2/modules/rsvp> 
HrlyKrs’s picture

please disregard my previous post. I was using the old file. the patch worked fine.

huey/home/www/drupal-4.6.2/modules/rsvp> patch -b < rsvp_module_format_date.patch 
patching file rsvp.module
patching file rsvp.theme
Carlos Miranda Levy’s picture

StatusFileSize
new41.02 KB

For those who can't patch (like myself), here is the rsvp.module file patched to fix the date display problem.
This is for the module dated March 24, 2005 for Drupal 4.6.

I did the patch by hand, since I have yet to find a patch tool that works on xp without crashing...

Carlos Miranda Levy’s picture

StatusFileSize
new1.95 KB

For those who can't patch (like myself), here is the rsvp.theme file patched to fix the date display problem.
This is for the module dated March 24, 2005 for Drupal 4.6.

I did the patch by hand, since I have yet to find a patch tool that works on xp without crashing...

ankur’s picture

Status: Needs review » Fixed

Applied to HEAD and DRUPAL-4-6 with crunchywelch's permission.

-Ankur

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)