Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.

Commit

Permalink
* Fixed node body is not compatible with wysiwyg module.
Browse files Browse the repository at this point in the history
* Fixed block update function is not work properly when choose disable block.
  • Loading branch information
aimakun committed Mar 15, 2011
1 parent 5290634 commit a602061
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions paypal_donate.module
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function paypal_donate_form(&$node) {
'#required' => FALSE,
'#weight' => 1
);
$form['body_filter']['filter'] = filter_form($node->format);
$form['body_filter']['format'] = filter_form($node->format);

$form['account'] = array(
'#type' => 'textfield',
Expand All @@ -205,6 +205,7 @@ function paypal_donate_form(&$node) {
'#title' => t('Create block for this page'),
'#default_value' => $donate_block,
'#options' => array(1 => t('Enable'), 0 => t('Disable')),
'#weight' => 3,
);

return $form;
Expand Down Expand Up @@ -266,8 +267,9 @@ function paypal_donate_delete($node) {
}

function paypal_donate_block_update($node) {
if ($node->donate_block) {
if (isset($node->donate_block)) {
$blocks = variable_get('paypal_donate_block', array());

if ($node->donate_block == 1) {
$blocks[$node->nid] = TRUE;
}
Expand Down

0 comments on commit a602061

Please sign in to comment.