Here is the update to 4.7.

Comments

anarcat’s picture

I don't have a lot of experience in 4.7-conversions and I do not own this module, but this looks pretty good.

However, why comment out code instead of just removing it?

+  /*
   if ($_POST['op'] == 'send') {
     _citizenspeak_validate_participation($_POST['edit']);
+  }*/

this looks a bit weird to me, esp. since it effectively disables the form validation on view.

drumm’s picture

StatusFileSize
new38.59 KB

The commented code is now removed. The validation is done through formapi's hook-like system so it is not removing the validation step.

bdimaggio’s picture

Hello there -- I have been tinkering with a 4.7 site that I need to put up pretty soon, assuming that I can stick with 4.7 and still use CitizenSpeak... and then I read the last line of the current project description. So I tried to apply this patch to the CitizenSpeak version presently in CVS, and it barfed. Presumably that's because the patch was based on the version of CitizenSpeak that was current at the time the patch was written...? Anyway, the upshot here is that I'm wondering whether I should abandon my quixotic quest to use CS with Drupal 4.7, or whether there's hope. Anybody got ideas?
thanks!

gordon’s picture

StatusFileSize
new37.15 KB

Here is an updated version of citizenspeak.

I have some other ideas, and I think my client may pay to have me intergrate citizenspeak with my pdf letter creation modules so that letters can be printed out and posted.

jarea’s picture

I tried applying this patch and received the following failures:

-bash-2.05b$ patch < citizenspeak_update47.patch
patching file citizenspeak.lib.php
patching file citizenspeak.module
Hunk #7 FAILED at 238.
Hunk #8 succeeded at 293 (offset 34 lines).
Hunk #10 succeeded at 327 (offset 34 lines).
1 out of 10 hunks FAILED -- saving rejects to file citizenspeak.module.rej
patching file citizenspeak.node.php
Hunk #1 FAILED at 44.
1 out of 3 hunks FAILED -- saving rejects to file citizenspeak.node.php.rej
patching file citizenspeak.reports.php
patching file citizenspeak.theme.php
patching file citizenspeak.user.php

Contents of reject file are displayed below:

***************
*** 204,223 ****
   * @param $nid
   *   Node ID of the campaign
   */
- function citizenspeak_send($nid) {
-   $edit = $_POST['edit'];
-   
-   // Validate form
-   if (!_citizenspeak_validate_participation($edit)) {
-     drupal_goto('node/'.$nid);
-   }
-       
    // Log response
    $id = db_next_id('citizenspeak_participants');
-   db_query("INSERT INTO {citizenspeak_participants} (nid, id, name, organization, email, address, city, state, zip, phone, fax, personal_statement, sent_at) VALUES (%d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%05d', '%s', '%s', '%s', NOW())", $nid, $id, $edit['name'], $edit['organization'], $edit['email'], $edit['address'], $edit['city'], $edit['state'], $edit['zip'], $edit['phone'], $edit['fax'], $edit['personal_statement']); 
  
    // Make email content
-   $node = node_load(array("nid" => $nid));
    $participant = db_fetch_object(db_query("SELECT * FROM {citizenspeak_participants} WHERE id = %d", $id));
    $message = theme("citizenspeak_message", $node, $participant);
    $headers = theme("citizenspeak_message_headers", $node, $participant);
--- 238,250 ----
   * @param $nid
   *   Node ID of the campaign
   */
+ function citizenspeak_send_petition_submit($form_id, $edit) {
    // Log response
    $id = db_next_id('citizenspeak_participants');
+   db_query("INSERT INTO {citizenspeak_participants} (nid, id, name, organization, email, address, city, state, zip, phone, fax, personal_statement, sent_at) VALUES (%d, %d, '%s', '%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', NOW())", $edit['nid'], $id, $edit['name'], $edit['organization'], $edit['email'], $edit['address'], $edit['city'], $edit['state'], $edit['zip'], $edit['phone'], $edit['fax'], $edit['personal_statement']); 
  
    // Make email content
+   $node = node_load($edit['nid']);
    $participant = db_fetch_object(db_query("SELECT * FROM {citizenspeak_participants} WHERE id = %d", $id));
    $message = theme("citizenspeak_message", $node, $participant);
    $headers = theme("citizenspeak_message_headers", $node, $participant);
thierry_gd’s picture

It would also be nice to have a .install file for automating the creation of the DB tables in 4.7 version of drupal

thierry_gd’s picture

StatusFileSize
new35.86 KB

Just added a .install file for automatic installation of the DB tables ==> http://drupal.org/node/92566

Also corrected the problems with the patches which had been previously submitted ==> cf. attached file

Can't wait to see these files commited (don't have a CVS access for this module)

thierry_gd’s picture

Status: Needs review » Reviewed & tested by the community
patchak’s picture

Any chance to have a official 4.7 branch soon?

Thanks for the great work, can,t wait to test the 4.7 release!

ahneill’s picture

The 4.7 version is still not available at the citizenspeak module main page. Looking forward to testing the 4.7 version ASAP!

allanx’s picture

Is this module compatible with 5.1?

matt2000’s picture

Status: Reviewed & tested by the community » Closed (fixed)