| 1 |
<?php |
<?php |
| 2 |
// $Id: createcontentblock.module,v 1.1.2.3 2007/12/18 20:53:22 douggreen Exp $ |
// $Id: createcontentblock.module,v 1.1.2.5 2007/12/19 00:09:27 douggreen Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 100 |
} |
} |
| 101 |
|
|
| 102 |
if (count($init['options'])) { |
if (count($init['options'])) { |
|
$init['destination'] = theme('destination', $init); |
|
| 103 |
return $init; |
return $init; |
| 104 |
} |
} |
| 105 |
} |
} |
| 106 |
|
|
| 107 |
function createcontentblock_form($init) { |
function createcontentblock_form($init) { |
| 108 |
$form = array(); |
$form = array(); |
| 109 |
if ($init['destination']) { |
if (isset($init['group_nid'])) { |
| 110 |
$form['dest'] = array( |
$form['dest'] = array( |
| 111 |
'#type' => 'hidden', |
'#type' => 'hidden', |
| 112 |
'#value' => $init['destination'], |
'#value' => 'node/'. $init['group_nid'], |
| 113 |
); |
); |
| 114 |
} |
} |
| 115 |
if (isset($init['group_nid'])) { |
if (isset($init['group_nid'])) { |
| 139 |
return $form; |
return $form; |
| 140 |
} |
} |
| 141 |
|
|
|
/** |
|
|
* Use a theme overridable function so that the site developer can hook the |
|
|
* this process and specify an alternate destination URL. |
|
|
* |
|
|
* The default behavior is to not set the destination. |
|
|
*/ |
|
|
function theme_destination($init) { |
|
|
//return $_GET['q']; |
|
|
} |
|
|
|
|
| 142 |
function createcontentblock_form_submit($form_id, &$form) { |
function createcontentblock_form_submit($form_id, &$form) { |
| 143 |
$fragment = array(); |
$fragment = array(); |
| 144 |
if (isset($form['dest'])) { |
if (isset($form['dest'])) { |