? donation_280102_0.patch
? donation_d6.patch
Index: donation.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/donation/donation.info,v
retrieving revision 1.2
diff -u -p -r1.2 donation.info
--- donation.info 18 Jun 2007 22:53:36 -0000 1.2
+++ donation.info 14 Mar 2009 20:21:42 -0000
@@ -1,3 +1,6 @@
-name = Donation
+name = "Donation"
description = "Enables donations to be tracked online."
-dependencies = simple_paypal
+dependencies[] = simple_paypal
+core = 6.x
+version = "6.x-1.x-dev"
+
Index: donation.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/donation/donation.install,v
retrieving revision 1.1
diff -u -p -r1.1 donation.install
--- donation.install 10 Jun 2007 15:59:41 -0000 1.1
+++ donation.install 14 Mar 2009 20:21:42 -0000
@@ -1,50 +1,52 @@
array(
+ 'did' => array('type' => 'serial', 'not null' => TRUE, 'disp-width' => '10'),
+ 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 1, 'disp-width' => '2'),
+ 'name' => array('type' => 'varchar', 'length' => '128', 'not null' => FALSE),
+ 'mail' => array('type' => 'varchar', 'length' => '128', 'not null' => FALSE),
+ 'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '11'),
+ 'amount' => array('type' => 'float', 'not null' => FALSE),
+ 'currency' => array('type' => 'varchar', 'length' => '5', 'not null' => FALSE, 'default' => 'USD'),
+ 'uid' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
+ 'donor_name' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
+ 'donor_url' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
+ 'donor_memo' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
+ 'paypal_txn_id' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
+ 'donor_comment' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE)),
+ 'primary key' => array('did'),
+ 'indexes' => array(
+ 'donations_mail_idx' => array('mail'),
+ 'donations_timestamp_idx' => array('timestamp'),
+ 'donations_uid_idx' => array('uid')),
+ );
+ return $schema;
}
-function donation_update_1() {
- switch ($GLOBALS['db_type']) {
- case 'mysql':
- case 'mysqli':
- // Update the existing data to derive the user id from the email address
- $ret[] = update_sql("UPDATE {donations} d INNER JOIN {users} u USING(mail) SET d.uid = u.uid WHERE d.uid = 0");
- return $ret;
- }
-}
+
+
+/**
+* Implementation of hook_uninstall().
+*/
+function donation_uninstall() {
+ drupal_uninstall_schema('donations');
+}
\ No newline at end of file
Index: donation.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/donation/donation.module,v
retrieving revision 1.2
diff -u -p -r1.2 donation.module
--- donation.module 24 Jul 2007 23:21:29 -0000 1.2
+++ donation.module 14 Mar 2009 20:21:43 -0000
@@ -1,127 +1,146 @@
Donate now or learn about donating.This page lists all donors. Donation amounts exclude transaction fees charged by Paypal.
If you wish to edit your donor name, you may do so from your profile page.'));
+define('DONATION_EMAIL', 'donation_email');
+define('DONATION_STATE', 'donation_state');
+define('DONATION_THANKS_TITLE', 'donation_thanks_title');
+define('DONATION_THANKS_DEFAULT_TITLE', t('Thank You'));
+define('DONATION_THANKS_TEXT', 'donation_thanks_text');
+define('DONATION_THANKS_DEFAULT_TEXT', t('Thank you for your donation.'));
+define('DONATION_DONORS_TEXT', 'donation_donors_text');
+define('DONATION_DONORS_DEFAULT_TEXT', t(''));
+define ('DONATION_DONATE_MESSAGE', 'donation_donate_message');
+define ('DONATION_DONATE_MESSAGE_DEFAULT_TEXT', t('Please make a donation.'));
+define ('DONATION_CURRENCY_TEXT', 'donation_currency_text');
+define ('DONATION_CURRENCY_DEFAULT_TEXT', t('We accept payments in these currencies.'));
+define ('DONATION_AMOUNT_TEXT', 'donation_amount_text');
+define ('DONATION_AMOUNT_DEFAULT_TEXT', t('Enter the amount you wish to donate.'));
+define ('DONATION_SUBMIT_TEXT', 'donation_submit_text');
+define ('DONATION_SUBMIT_DEFAULT_TEXT', t('Proceed to paypal.com for payment'));
+define ('DONATION_MEMO_TEXT', 'donation_memo_text');
+define ('DONATION_MEMO_DEFAULT_TEXT', t('Website Donation'));
+define ('DONATION_PAGE_TITLE', 'donation_page_title');
+define ('DONATION_DEFAULT_PAGE_TITLE', t('Donate'));
+define ('DONATION_DEFAULT_EMAIL', t('webmaster@localhost'));
+/**
+ * Implementation of hook_perm().
+ */
function donation_perm() {
return array('administer donations');
}
-function donation_menu($may_cache) {
+/**
+ * Implementation of hook_menu().
+ */
+function donation_menu() {
$items = array();
- if ($may_cache) {
- $access = user_access('administer site configuration');
+ $access = array('administer site configuration');
- $items[] = array(
- 'path' => 'ipn/donation',
- 'callback' => 'donation_ipn',
- 'access' => TRUE,
+ $items['ipn/donation'] = array(
+ 'page callback' => 'donation_ipn',
'type' => MENU_CALLBACK,
+ 'access callback' => TRUE,
);
- $items[] = array(
- 'path' => 'donation/thanks',
- 'title' => t('Thank you'),
- 'callback' => 'donation_thanks',
- 'access' => TRUE,
+ $items['donation/thanks'] = array(
+ 'title' => variable_get(DONATION_THANKS_TITLE, DONATION_THANKS_DEFAULT_TITLE),
+ 'page callback' => 'donation_thanks',
'type' => MENU_CALLBACK,
+ 'access callback' => TRUE,
);
- $items[] = array(
- 'path' => 'admin/settings/donations',
- 'title' => t('Donations'),
- 'callback' => 'drupal_get_form',
- 'callback arguments' => array('donation_settings'),
- 'description' => t('Administer donations'),
- 'access' => $access,
- );
- $items[] = array(
- 'path' => 'admin/build/donations',
- 'title' => t('Donations'),
- 'access' => $access,
- 'callback' => 'donation_admin',
- 'description' => t('Manages donations to your site via Paypal'),
- );
- $items[] = array(
- 'path' => 'admin/build/donations/list',
- 'title' => t('List'),
- 'access' => $access,
+ $items['admin/settings/donations'] = array(
+ 'title' => 'Donations',
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array('donation_settings'),
+ 'description' => 'Administer donations',
+ 'access arguments' => $access,
+ );
+ $items['admin/build/donations'] = array(
+ 'title' => 'Donations',
+ 'access arguments' => $access,
+ 'page callback' => 'donation_admin',
+ 'description' => 'Manages donations to your site via Paypal',
+ );
+ $items['admin/build/donations/list'] = array(
+ 'title' => 'List',
+ 'access arguments' => $access,
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
- $items[] = array(
- 'path' => 'admin/build/donations/add',
- 'title' => t('Add donation'),
- 'access' => $access,
- 'callback' => 'drupal_get_form',
- 'callback arguments' => array('donation_edit', 'add'),
+ $items['admin/build/donations/add'] = array(
+ 'title' => 'Add donation',
+ 'access arguments' => $access,
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array('donation_edit', 'add'),
'type' => MENU_LOCAL_TASK,
);
- $items[] = array(
- 'path' => 'admin/build/donations/edit',
- 'title' => t('Edit donation'),
- 'access' => $access,
- 'callback' => 'drupal_get_form',
- 'callback arguments' => array('donation_edit', 'edit'),
+ $items['admin/build/donations/edit'] = array(
+ 'title' => 'Edit donation',
+ 'access arguments' => $access,
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array('donation_edit', 'edit'),
'type' => MENU_CALLBACK,
);
- $items[] = array(
- 'path' => 'admin/build/donations/delete',
- 'title' => t('Delete donation'),
- 'access' => $access,
- 'callback' => 'drupal_get_form',
- 'callback arguments' => array('donation_edit', 'delete'),
+ $items['admin/build/donations/delete'] = array(
+ 'title' => 'Delete donation',
+ 'access arguments' => $access,
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array('donation_edit', 'delete'),
'type' => MENU_CALLBACK,
);
- $items[] = array(
- 'path' => 'admin/build/donations/import',
- 'title' => t('Import'),
- 'access' => $access,
- 'callback' => 'drupal_get_form',
- 'callback arguments' => array('donation_import'),
- 'type' => MENU_LOCAL_TASK,
+ $items['admin/build/donations/import'] = array(
+ 'title' => 'Import',
+ 'access arguments' => $access,
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array('donation_import'),
+ 'type' => MENU_CALLBACK,
);
- $items[] = array(
- 'path' => 'donate',
- 'title' => t('Donate'),
- 'access' => TRUE,
- 'callback' => 'drupal_get_form',
- 'callback arguments' => array('donation_form_build'),
+ $items['donate'] = array(
+ 'title' => variable_get(DONATION_PAGE_TITLE, DONATION_DEFAULT_PAGE_TITLE),
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array('donation_form_build'),
'type' => MENU_CALLBACK,
+ 'access callback' => TRUE,
);
- $items[] = array(
- 'path' => 'donations',
- 'title' => t('Donations'),
- 'access' => TRUE,
- 'callback' => 'donation_public_page',
+ $items['hiddendonations'] = array(
+ 'title' => 'Donations',
+ 'page callback' => 'donation_public_page',
'type' => MENU_CALLBACK,
+ 'access callback' => TRUE,
);
- }
return $items;
}
+/**
+ * Implementation of hook_settings().
+ */
function donation_settings() {
- $form[DONATION_EMAIL] = array(
+ $form['general'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('General Settings'),
+ '#collapsible' => TRUE,
+ '#collapsed' => FALSE,
+ );
+ $form['general'][DONATION_EMAIL] = array(
'#type' => 'textfield',
'#title' => t('Donations email address'),
- '#default_value' => variable_get(DONATION_EMAIL, 'donations@drupal.org'),
+ '#default_value' => variable_get(DONATION_EMAIL, DONATION_DEFAULT_EMAIL),
'#description' => t('Only donations to this email address are considered by this module.'),
);
- $form[DONATION_STATE] = array(
+ $form['general'][DONATION_STATE] = array(
'#type' => 'select',
'#title' => t('Default donation state'),
'#default_value' => variable_get(DONATION_STATE, DONATION_PUBLIC),
@@ -132,14 +151,79 @@ function donation_settings() {
'#description' => t('Select whether donations will be public or private for this site.'),
);
- $form[DONATION_DONORS_TEXT] = array(
+ $form['general'][DONATION_MEMO_TEXT] = array(
+ '#type' => 'textfield',
+ '#title' => t('Text for the PayPal memo field'),
+ '#default_value' => variable_get(DONATION_MEMO_TEXT, DONATION_MEMO_DEFAULT_TEXT),
+ '#description' => t('This text will be sent to PayPal in the memo field.'),
+ '#collapsible' => TRUE,
+ '#collapsed' => FALSE,
+ );
+
+ $form['donate_page'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Donate Page'),
+ '#collapsible' => TRUE,
+ '#collapsed' => FALSE,
+ );
+
+ $form['donate_page'][DONATION_PAGE_TITLE] = array(
+ '#type' => 'textfield',
+ '#title' => t('Title for the donate page'),
+ '#default_value' => variable_get(DONATION_PAGE_TITLE, DONATION_DEFAULT_PAGE_TITLE),
+ '#description' => t('This text will be used as the Title for the donate page.'),
+ );
+
+ $form['donate_page'][DONATION_DONATE_MESSAGE] = array(
+ '#type' => 'textarea',
+ '#title' => t('Introductory text for the donate page'),
+ '#default_value' => variable_get(DONATION_DONATE_MESSAGE, DONATION_DONATE_MESSAGE_DEFAULT_TEXT),
+ '#description' => t('This text will be displayed to the user after they come back from Paypal.'),
+ );
+
+ $form['donate_page'][DONATION_CURRENCY_TEXT] = array(
+ '#type' => 'textfield',
+ '#title' => t('Description text for the currency field'),
+ '#default_value' => variable_get(DONATION_CURRENCY_TEXT, DONATION_CURRENCY_DEFAULT_TEXT),
+ '#description' => t('This text will be displayed as the description for the currency field on the donate page.'),
+ );
+
+ $form['donate_page'][DONATION_AMOUNT_TEXT] = array(
+ '#type' => 'textfield',
+ '#title' => t('Description text for the amount field'),
+ '#default_value' => variable_get(DONATION_AMOUNT_TEXT, DONATION_AMOUNT_DEFAULT_TEXT),
+ '#description' => t('This text will be displayed as the description for the amount field on the donate page.'),
+ );
+
+ $form['donate_page'][DONATION_SUBMIT_TEXT] = array(
+ '#type' => 'textfield',
+ '#title' => t('Text for the Submit button'),
+ '#default_value' => variable_get(DONATION_SUBMIT_TEXT, DONATION_SUBMIT_DEFAULT_TEXT),
+ '#description' => t('This text will be displayed on the Submit button of the donate page.'),
+ );
+
+ $form['misc'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Miscellaneous'),
+ '#collapsible' => TRUE,
+ '#collapsed' => FALSE,
+ );
+
+ $form['misc'][DONATION_DONORS_TEXT] = array(
'#type' => 'textarea',
'#title' => t('Text for the donors list page'),
'#default_value' => variable_get(DONATION_DONORS_TEXT, DONATION_DONORS_DEFAULT_TEXT),
'#description' => t('This text will be displayed at the top of the donors list page.'),
);
- $form[DONATION_THANKS_TEXT] = array(
+ $form['misc'][DONATION_THANKS_TITLE] = array(
+ '#type' => 'textfield',
+ '#title' => t('Title for the donations thank you page'),
+ '#default_value' => variable_get(DONATION_THANKS_TITLE, DONATION_THANKS_DEFAULT_TITLE),
+ '#description' => t('This text will be the Title of the page the user sees after they come back from Paypal.'),
+ );
+
+ $form['misc'][DONATION_THANKS_TEXT] = array(
'#type' => 'textarea',
'#title' => t('Text for the donations thank you page'),
'#default_value' => variable_get(DONATION_THANKS_TEXT, DONATION_THANKS_DEFAULT_TEXT),
@@ -149,10 +233,16 @@ function donation_settings() {
return system_settings_form($form);
}
-function donation_edit($mode) {
+/**
+ * FAPI definition for the donation edit form.
+ *
+ * @ingroup forms
+ * @see donation_edit_submit()
+ */
+function donation_edit(&$form_state, $mode) {
$timestamp = format_date(time(), 'custom', 'Y-m-d H:i O');
- switch($mode) {
+ switch ($mode) {
case 'edit':
case 'delete':
$did = (int)arg(4);
@@ -241,49 +331,52 @@ function donation_edit($mode) {
'#value' => $did,
);
- return($form);
+ return ($form);
}
-function donation_edit_submit($form_id, $form = NULL) {
- $mode = $form['mode'];
+/**
+ * Submit handler for donation edit form
+ */
+function donation_edit_submit($form, &$form_state) {
+ $mode = $form_state['values']['mode'];
- if ($form['delete'] == t('Delete')) {
+ if ($form_state['values']['delete'] == t('Delete')) {
$mode = 'delete';
}
- switch($mode) {
+ switch ($mode) {
case 'add':
db_query("INSERT INTO {donations} (timestamp, uid, name, mail, amount, currency, status) VALUES
(%d, %d, '%s', '%s', '%s', '%s', %d)",
- strtotime($form['timestamp']),
- $form['uid'],
- $form['name'],
- $form['mail'],
- $form['amount'],
- $form['currency'],
- $form['status']);
+ strtotime($form_state['values']['timestamp']),
+ $form_state['values']['uid'],
+ $form_state['values']['name'],
+ $form_state['values']['mail'],
+ $form_state['values']['amount'],
+ $form_state['values']['currency'],
+ $form_state['values']['status']);
drupal_set_message(t('The donation has been added.'));
break;
case 'edit':
- if ($form['did']) {
+ if ($form_state['values']['did']) {
db_query("UPDATE {donations}
SET timestamp = %d, uid = %d, name = '%s', mail = '%s', amount = %f, currency = '%s', status = %d WHERE did = %d",
- strtotime($form['timestamp']),
- $form['uid'],
- $form['name'],
- $form['mail'],
- $form['amount'],
- $form['currency'],
- $form['status'],
- $form['did']);
+ strtotime($form_state['values']['timestamp']),
+ $form_state['values']['uid'],
+ $form_state['values']['name'],
+ $form_state['values']['mail'],
+ $form_state['values']['amount'],
+ $form_state['values']['currency'],
+ $form_state['values']['status'],
+ $form_state['values']['did']);
drupal_set_message(t('The donation has been updated.'));
}
break;
case 'delete':
- if ($form['did']) {
- db_query("DELETE FROM {donations} WHERE did = %d", $form['did']);
+ if ($form_state['values']['did']) {
+ db_query("DELETE FROM {donations} WHERE did = %d", $form_state['values']['did']);
drupal_set_message(t('The donation has been deleted.'));
}
break;
@@ -292,6 +385,12 @@ function donation_edit_submit($form_id,
drupal_goto('admin/build/donations');
}
+/**
+ * FAPI definition for the donation import form.
+ *
+ * @ingroup forms
+ * @see donate_form_edit_submit()
+ */
function donation_import($form = NULL) {
$form = array(
'#value' => t('Paypal lets you export your payment history to a CSV file. Copy/paste the contents of the file (or parts thereof) in the form below to mass import your Paypal history into Drupal. Note that the import routine does not check for duplicate entries.'),
@@ -312,15 +411,15 @@ function donation_import($form = NULL) {
return $form;
}
-function donation_import_submit($form_id, $form = NULL) {
- $lines = explode("\n", $form['data']);
+function donation_import_submit($form, &$form_state) {
+ $lines = explode("\n", $form_state['values']['data']);
foreach ($lines as $line) {
list($date, $time, $timezone, $name, $type, $status, $currency, $gross, $fee, $net, $from_email,
$to_email, $tid, $cp_status, $shipping_address, $address_status, $item_title, $item_id, $sh_amount,
$insurance_amount, $sales_tax, $opt_1_name, $opt_1_value, $opt_2_name, $opt_2_value, $auction_site,
$buyer_id, $item_url, $closing_date, $escrow_id, $invoice_id, $ref_txn_id, $invoice_number,
$custom_number, $receipt_id, $contact_phone_number ) = explode('","', $line);
- if ($to_email == variable_get(DONATION_EMAIL, 'donations@drupal.org') && $name && $net) {
+ if ($to_email == variable_get(DONATION_EMAIL, DONATION_DEFAULT_EMAIL) && $name && $net) {
// We need to swap the day and month in Paypal's date format:
list($month, $day, $year) = explode('/', substr($date, 1), 3);
@@ -355,7 +454,7 @@ function donation_admin() {
array('data' => t('Operations'), 'colspan' => '2')
);
- $sql = 'SELECT d.* FROM {donations} d' . tablesort_sql($header);
+ $sql = 'SELECT d.* FROM {donations} d'. tablesort_sql($header);
$result = pager_query($sql, DONATION_PAGER, 0, NULL);
while ($donation = db_fetch_object($result)) {
$rows[] = array(format_date($donation->timestamp, 'small'),
@@ -381,7 +480,7 @@ function donation_public_page() {
array('data' => t('Date'), 'field' => 'timestamp', 'sort' => 'desc'),
);
- $sql = 'SELECT d.* FROM {donations} d WHERE d.status = %d' . tablesort_sql($header);
+ $sql = 'SELECT d.* FROM {donations} d WHERE d.status = %d'. tablesort_sql($header);
$result = pager_query($sql, DONATION_PAGER, 0, NULL, DONATION_PUBLIC);
while ($donation = db_fetch_object($result)) {
@@ -405,7 +504,7 @@ function donation_public_page() {
print theme('page', $output);
}
-function donation_thanks () {
+function donation_thanks() {
print theme('page', variable_get(DONATION_THANKS_TEXT, DONATION_THANKS_DEFAULT_TEXT));
}
@@ -416,7 +515,7 @@ function donation_ipn() {
return;
}
- if ($_POST['business'] != variable_get(DONATION_EMAIL, 'donations@drupal.org')) {
+ if ($_POST['business'] != variable_get(DONATION_EMAIL, DONATION_DEFAULT_EMAIL)) {
// Payment is not for the email address configured
return;
}
@@ -439,12 +538,12 @@ function donation_ipn() {
$amount,
$currency,
variable_get(DONATION_STATE, DONATION_PUBLIC));
- watchdog('donation', t('Donation from @name (@mail) amount of @amount @currency.', array(
+ watchdog('donation', 'Donation from @name (@mail) amount of @amount @currency.', array(
'@name' => $name,
'@mail' => $payer_email,
'@amount' => $amount,
'@currency' => $currency,
- )));
+ ));
}
/**
@@ -456,28 +555,21 @@ function donation_form() {
function donation_form_build() {
global $user;
- if (!$user->uid) {
- $form['body'] = array(
- '#value' => t('You do not need to register to donate. However, if you do, there will be a link to your user profile from the donors page. If you want that, then please login or register and then return back to this page.', array(
- '!login' => url('user/login', drupal_get_destination()),
- '!register' => url('user/register', drupal_get_destination())
- ))
- );
- }
+
$form['#action'] = simple_paypal_get_url();
$form['pre'] = array(
- '#value' => 'Please complete the form below and then you will be directed through the Paypal donation process.
');
+ '#value' => variable_get(DONATION_DONATE_MESSAGE, DONATION_DONATE_MESSAGE_DEFAULT_TEXT));
$form['business'] = array(
'#type' => 'hidden',
'#name' => 'business',
- '#value' => variable_get(DONATION_EMAIL, 'donations@drupal.org'));
+ '#value' => variable_get(DONATION_EMAIL, DONATION_DEFAULT_EMAIL));
$form['cmd'] = array(
'#type' => 'hidden',
'#value' => '_xclick',
'#name' => 'cmd');
$form['item_name'] = array(
'#type' => 'hidden',
- '#value' => 'Donation to the Drupal Association',
+ '#value' => variable_get(DONATION_MEMO_TEXT, DONATION_MEMO_DEFAULT_TEXT),
'#name' => 'item_name');
$form['no_shipping'] = array(
'#type' => 'hidden',
@@ -485,19 +577,19 @@ function donation_form_build() {
'#name' => 'no_shipping');
$form['return'] = array(
'#type' => 'hidden',
- '#value' => url('donation/thanks', NULL, NULL, TRUE),
+ '#value' => url('donation/thanks', array('absolute' => TRUE)),
'#name' => 'return');
$form['currency_code'] = array(
'#type' => 'select',
'#title' => t('Currency'),
'#options' => simple_paypal_get_currencies(),
'#name' => 'currency_code',
- '#description' => t('The Drupal Association accepts payments in these two currencies.'),
+ '#description' => variable_get(DONATION_CURRENCY_TEXT, DONATION_CURRENCY_DEFAULT_TEXT),
);
$form['amount'] = array(
'#type' => 'textfield',
'#title' => t('Amount'),
- '#description' => t('Drupal loves you. Enter the amount you wish to donate.'),
+ '#description' => variable_get(DONATION_AMOUNT_TEXT, DONATION_AMOUNT_DEFAULT_TEXT),
'#size' => 40,
'#required' => TRUE,
'#maxlength' => 255,
@@ -505,7 +597,7 @@ function donation_form_build() {
);
$form['notify_url'] = array(
'#type' => 'hidden',
- '#value' => url('ipn/donation', NULL, NULL, TRUE),
+ '#value' => url('ipn/donation', array('absolute' => TRUE)),
'#name' => 'notify_url',
);
$form['custom'] = array(
@@ -515,9 +607,10 @@ function donation_form_build() {
);
$form['submit'] = array(
'#type' => 'submit',
- '#value' => t('Proceed to paypal.com for payment'),
+ '#value' => variable_get(DONATION_SUBMIT_TEXT, DONATION_SUBMIT_DEFAULT_TEXT),
'#name' => 'submit',
);
return $form;
}
+